All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <mason@suse.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-fsdevel@vger.kernel.org,
	OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Subject: Re: [PATCH] add -o flush for fat
Date: Tue, 8 Aug 2006 04:05:14 -0400	[thread overview]
Message-ID: <20060808080514.GH26133@watt.suse.com> (raw)
In-Reply-To: <20060807165820.67e3417d.akpm@osdl.org>

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@suse.com> 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

      reply	other threads:[~2006-08-08  8:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-04 19:27 [PATCH] add -o flush for fat Chris Mason
2006-08-05  1:31 ` Andrew Morton
2006-08-05 12:26   ` Chris Mason
2006-08-05 19:12     ` Andrew Morton
2006-08-05 20:54       ` OGAWA Hirofumi
2006-08-07 20:23       ` Chris Mason
2006-08-07 23:58         ` Andrew Morton
2006-08-08  8:05           ` Chris Mason [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060808080514.GH26133@watt.suse.com \
    --to=mason@suse.com \
    --cc=akpm@osdl.org \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.