Re: [PATCH] add -o flush for fat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 07, 2006 at 04:58:20PM -0700, Andrew Morton wrote:
> On Mon, 7 Aug 2006 16:23:55 -0400
> Chris Mason <mason@xxxxxxxx> wrote:
> 
> > Fat is commonly used on removable media. Mounting with -o flush tells the
> > FS to write things to disk as quickly as possible.  It is like -o sync, but
> > much faster (and not as safe).
> > 
> 
> OK, so it's now fat-specific.  That makes it easier, and still useful.
> 
> > @@ -112,6 +113,16 @@ int fat_generic_ioctl(struct inode *inod
> >  	}
> >  }
> >  
> > +static int fat_file_release(struct inode *inode, struct file *filp)
> > +{
> > +	if ((filp->f_mode & FMODE_WRITE) &&
> > +	     MSDOS_SB(inode->i_sb)->options.flush) {
> > +		fat_flush_inodes(inode->i_sb, inode, NULL);
> > +		blk_congestion_wait(WRITE, HZ/10);
> > +	}
> > +	return 0;
> > +}
> 
> What's the blk_congestion_wait() for?

It's just some black magic to throttle.  For sufficiently large files we
really want to throttle during the write, but for most average cases it
helps the stick keep up.

You still need to watch the blinking lights either way.

-chris
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux