All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Christoph Hellwig <hch@lst.de>
Cc: hughd@google.com, hirofumi@mail.parknet.co.jp,
	chris.mason@oracle.com, swhiteho@redhat.com,
	linux-fsdevel@vger.kernel.org, jaxboe@fusionio.com,
	martin.petersen@oracle.com
Subject: Re: discard and barriers
Date: Sat, 14 Aug 2010 10:14:51 -0400	[thread overview]
Message-ID: <20100814141451.GB14960@thunk.org> (raw)
In-Reply-To: <20100814115625.GA15902@lst.de>

On Sat, Aug 14, 2010 at 01:56:25PM +0200, Christoph Hellwig wrote:
> 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.

In no journal mode we don't actually wait, but nothing is guaranteed
in w/o a journal mode with respect to what happens after a crash, so I
think we're good.  For all file systems that use journalling, we have
to make sure transaction which freed the blocks is safely committed on
the disk platters before we can call trim, so what you're asking
should be guaranteed if the file system is otherwise correct wrt to
journalling --- or am I missing something?

Also, to be clear, the block layer will guarantee that a trim/discard
of block 12345 will not be reordered with respect to a write block
12345, correct?

And on SATA devices, where discard requests are not queued requests,
the ata layer will have to do a queue flush *before* the discard is
sent, right?  But things should be a tiny bit better even with SATA
because we won't need to wait for the barrier to be acknowledged
before sending more write requests to the device.  If I understand
things correctly, the main place where this will have benefit will be
for more advanced interfaces like SAS?

       	       	    	  	      	  	    - Ted

  reply	other threads:[~2010-08-14 14:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-14 11:56 discard and barriers Christoph Hellwig
2010-08-14 14:14 ` Ted Ts'o [this message]
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

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=20100814141451.GB14960@thunk.org \
    --to=tytso@mit.edu \
    --cc=chris.mason@oracle.com \
    --cc=hch@lst.de \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=hughd@google.com \
    --cc=jaxboe@fusionio.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=swhiteho@redhat.com \
    /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.