All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Jens Axboe <axboe@suse.de>, Linux Kernel <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>,
	Linux RAID Mailing List <linux-raid@vger.kernel.org>
Subject: Getting 'sync' to flush disk cache?
Date: Mon, 14 Aug 2006 14:39:47 -0400	[thread overview]
Message-ID: <44E0C373.6060008@garzik.org> (raw)

So...  has anybody given any thought to enabling fsync(2), fdatasync(2), 
and sync_file_range(2) issuing a [FLUSH|SYNCHRONIZE] CACHE command?

This has bugged me for _years_, that Linux does not do this.  Looking at 
forums on the web, it bugs a lot of other people too.

My suggestion would be to add a FLUSH op alongside the existing READ and 
WRITE[_SYNC] ops, rather than passing down WRITE_SYNC.  Why?  Doing so 
maintains a 1-1 translation between requests and disk commands, and it 
would allow MD and DM more flexibility in handling this operation.

But that's just a guess.  I'm open to suggestions.

	Jeff



             reply	other threads:[~2006-08-14 18:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-14 18:39 Jeff Garzik [this message]
2006-08-14 19:34 ` Getting 'sync' to flush disk cache? Arjan van de Ven
2006-08-14 20:15   ` Jens Axboe
2006-08-14 21:04     ` Jeff Garzik
     [not found] <fa.W0uMWcngieRXsM23OSdM5c2wdZI@ifi.uio.no>
     [not found] ` <fa.qZ/OWlxPTq6xK9TZx+9e39itX9k@ifi.uio.no>
     [not found]   ` <fa.PWNfC1odploxRBgLE1vdR69UF9s@ifi.uio.no>
2006-08-14 23:09     ` Robert Hancock
2006-08-15  5:45       ` Jens Axboe

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=44E0C373.6060008@garzik.org \
    --to=jeff@garzik.org \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=linux-scsi@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.