linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* discard and barriers
@ 2010-08-14 11:56 Christoph Hellwig
  2010-08-14 14:14 ` Ted Ts'o
  2010-08-23 16:42 ` Christoph Hellwig
  0 siblings, 2 replies; 14+ messages in thread
From: Christoph Hellwig @ 2010-08-14 11:56 UTC (permalink / raw)
  To: hughd, hirofumi, tytso, chris.mason, swhiteho
  Cc: linux-fsdevel, jaxboe, martin.petersen

Currently all filesystems submit their discard requests as
BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER type requests.  That is they
both wait for completion synchronously, and submit them as a barrier.

For those not part of the current barrier discussion the barrier flag
has two implications:

 (a) it prevents reordering of the request with any previous or later
     one
 (b) it causes a cache flush before the request and ensures the request
     is on disk when it returns, which at least for typical SATA
     requests means another flush request as we don't able the FUA
     bit (which isn't applicable to TRIM or UNMAP anyway)

(a) is something we are planning to get rid of in the block layer
completely, so we'll need to figure out a way how to deal with it for
discards.  (b) doesn't actually seem to be nessecary for discards from
my research - given that discards are an optimization for the storage
device we don't care if it actually hits the disk or not in case of
a crash.  And given that the definition of SYNCHRONIZE_CACHE only deals
with data it's not even defined that it affects discard commands.

Can you guys review you rely on a) in your filesystem and if yes help
me to figure out a good way to replace it?  All the callers look like
they do not actually rely on it because they seem to wait for the
actual block freeing metadata I/O beforehand, but I'm not sure.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-08-23 16:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-14 11:56 discard and barriers Christoph Hellwig
2010-08-14 14:14 ` Ted Ts'o
2010-08-14 14:52   ` Christoph Hellwig
2010-08-14 15:46     ` Chris Mason
2010-08-14 17:22       ` Christoph Hellwig
2010-08-14 20:11       ` Hugh Dickins
2010-08-15 17:39     ` Ted Ts'o
2010-08-15 19:02       ` Christoph Hellwig
2010-08-15 21:25         ` Ted Ts'o
2010-08-15 21:30           ` Christoph Hellwig
2010-08-16  9:41     ` Steven Whitehouse
2010-08-16 11:26       ` Christoph Hellwig
2010-08-17 10:59         ` Steven Whitehouse
2010-08-23 16:42 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).