linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@linux.intel.com>
To: "Martin K. Petersen" <mkp@mkp.net>, Theodore Ts'o <tytso@mit.edu>,
	Dave Chinner <david@fromorbit.com>, Chris Mason <clm@fb.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Write atomicity guarantees
Date: Thu, 24 Apr 2014 13:39:09 -0400	[thread overview]
Message-ID: <20140424173909.GB5886@linux.intel.com> (raw)


NVMe allows the drive to tell the host what atomicity guarantees it
provides for a write command.  At the moment, I don't think Linux has
a way for the driver to pass that information up to the filesystem.

The value that is most interesting to report is Atomic Write Unit Power
Fail ("if you send a write no larger than this, the drive guarantees to
write all of it or none of it"), minimum value 1 sector. [1]

There's a proposal before the NVMe workgroup to add a boundary size/offset
to modify AWUPF ("except if you cross this boundary, then AWUPF is not
guaranteed").  Think RAID stripe crossing.

So, three questions.  Is there somewhere already to pass boundary
information up to the filesystem?  Can filesystems make use of a larger
atomic write unit than a single sector?  And, if the device is internally
a RAID device, is knowing the boundary size/offset useful?


[1] There is also Atomic Write Unit Normal ("if you send two writes,
neither of which is larger than this, subsequent reads will get either
one or the other, not a mixture of both"), which I don't think we care
about because the page cache prevents us from sending two writes which
overlap with each other.


             reply	other threads:[~2014-04-24 17:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-24 17:39 Matthew Wilcox [this message]
2014-04-24 18:03 ` Write atomicity guarantees Chris Mason
2014-04-24 18:23   ` Dan Williams
2014-04-24 18:50     ` Chris Mason
2014-04-24 19:27       ` Dave Chinner
     [not found]   ` <CAN7X1U=yjcxW16C8H9G5WWEOj1S5Wh0O26WpE5QrC38biRShtw@mail.gmail.com>
2014-04-24 18:25     ` Matthew Wilcox
2014-04-24 18:44       ` Chris Mason

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=20140424173909.GB5886@linux.intel.com \
    --to=willy@linux.intel.com \
    --cc=clm@fb.com \
    --cc=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mkp@mkp.net \
    --cc=tytso@mit.edu \
    /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 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).