linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boaz Harrosh <boaz@plexistor.com>
To: Jeff Moyer <jmoyer@redhat.com>,
	"Wilcox, Matthew R" <matthew.r.wilcox@intel.com>
Cc: "linda.knippers@hp.com" <linda.knippers@hp.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: Re: regression introduced by "block: Add support for DAX reads/writes to block devices"
Date: Mon, 10 Aug 2015 10:42:13 +0300	[thread overview]
Message-ID: <55C855D5.1070001@plexistor.com> (raw)
In-Reply-To: <x49bneiygpl.fsf@segfault.boston.devel.redhat.com>

On 08/07/2015 11:41 PM, Jeff Moyer wrote:
<>
> 
>> We need to cope with the case where the end of a partition isn't on a
>> page boundary though.
> 
> Well, that's usually done by falling back to buffered I/O.  I gave that
> a try and panicked the box.  :)  I'll keep looking into it, but probably
> won't have another patch until next week.
> 

lets slow down for a sec, please.

We have all established that an unaligned partition start is BAD and not supported?
(If we want to also support this, which is possible then all the below is mute)

Well we do know that any real pmem device will actually be 128M aligned because of
how the DIMM thing work. So any start-aligned partition means length aligned as well.
(Emulated pmem is 4k aligned as well)

That said, you might want to protect against unaligned start / length. Even though
we have the 4k physical sector patch, a forced fdisk could produce such a partition.

I would suggest that for such un-aligned partitions the code in bdev that sets
IS_DAX on the bdev-inode should only do so if the start / length is aligned.
Else it becomes a !IS_DAX inode and all is fine.
Users will learn soon enough that for dax you need to keep the recommended 4k
alignments.

In the DAX filesystem case the start-un-aligned case is fatal and the FS would
not mount (dax enabled) . The length-un-aligned case is not a problem because
the 4k block size mandatory for dax will trim the device length to an FS block
boundary.

So it is only a problem with RAW bdev inodes and I would just not let it be
IS_DAX in the un-aligned case. (or trim its size)

Thanks
Boaz

> Cheers,
> Jeff



  reply	other threads:[~2015-08-10  7:42 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-05 20:19 regression introduced by "block: Add support for DAX reads/writes to block devices" Jeff Moyer
2015-08-05 22:01 ` Dave Chinner
2015-08-06  1:42   ` Linda Knippers
2015-08-06  3:24     ` Dave Chinner
2015-08-06  7:52       ` Boaz Harrosh
2015-08-06 20:34         ` Dave Chinner
2015-08-09  8:52           ` Boaz Harrosh
2015-08-10 16:32             ` Linda Knippers
2015-08-10 21:27               ` Dave Chinner
2015-08-10 23:04                 ` Linda Knippers
2015-08-06 14:21 ` Wilcox, Matthew R
2015-08-06 15:33   ` Jeff Moyer
2015-08-06 15:51     ` Wilcox, Matthew R
2015-08-06 21:30   ` Jeff Moyer
2015-08-07 18:11     ` Wilcox, Matthew R
2015-08-07 20:41       ` Jeff Moyer
2015-08-10  7:42         ` Boaz Harrosh [this message]
2015-08-12 21:11           ` Jeff Moyer
2015-08-13  5:32             ` Boaz Harrosh
2015-08-13 14:00               ` Jeff Moyer
2015-08-13 16:42                 ` Linda Knippers
2015-08-13 17:14                   ` Jeff Moyer
2015-08-13 17:52                     ` Linda Knippers
2015-08-13 18:19                       ` Jeff Moyer
2015-08-13 19:32                         ` Wilcox, Matthew R
2015-08-14 16:28                           ` Dan Williams

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=55C855D5.1070001@plexistor.com \
    --to=boaz@plexistor.com \
    --cc=jmoyer@redhat.com \
    --cc=linda.knippers@hp.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.r.wilcox@intel.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 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).