All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: gregkh@linuxfoundation.org
Cc: ross.zwisler@linux.intel.com, dan.j.williams@intel.com,
	snitzer@redhat.com, toshi.kani@hpe.com, stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] dm: prevent DAX mounts if not supported" failed to apply to 4.9-stable tree
Date: Thu, 5 Jul 2018 15:57:33 -0600	[thread overview]
Message-ID: <20180705215733.GA16352@linux.intel.com> (raw)
In-Reply-To: <1530455145138164@kroah.com>

On Sun, Jul 01, 2018 at 04:25:45PM +0200, gregkh@linuxfoundation.org wrote:
> 
> The patch below does not apply to the 4.9-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
> 
> thanks,
> 
> greg k-h
> 
> ------------------ original commit in Linus's tree ------------------
> 
> From dbc626597c39b24cefce09fbd8e9dea85869a801 Mon Sep 17 00:00:00 2001
> From: Ross Zwisler <ross.zwisler@linux.intel.com>
> Date: Tue, 26 Jun 2018 16:30:41 -0600
> Subject: [PATCH] dm: prevent DAX mounts if not supported
> 
> Currently device_supports_dax() just checks to see if the QUEUE_FLAG_DAX
> flag is set on the device's request queue to decide whether or not the
> device supports filesystem DAX.  Really we should be using
> bdev_dax_supported() like filesystems do at mount time.  This performs
> other tests like checking to make sure the dax_direct_access() path works.
> 
> We also explicitly clear QUEUE_FLAG_DAX on the DM device's request queue if
> any of the underlying devices do not support DAX.  This makes the handling
> of QUEUE_FLAG_DAX consistent with the setting/clearing of most other flags
> in dm_table_set_restrictions().
> 
> Now that bdev_dax_supported() explicitly checks for QUEUE_FLAG_DAX, this
> will ensure that filesystems built upon DM devices will only be able to
> mount with DAX if all underlying devices also support DAX.

Hey Greg,

It turns out that this series isn't needed for the v4.9-stable tree.  The
outcome we want with this series is to prevent DM devices made of one
DAX-capable namespace and one DAX-incapable block device from using DAX.

We needed patches to prevent this from happening in v4.14-stable and
v4.17-stable, but v4.9-stable already does the correct thing.

For those interested in the details, the DM device doesn't have QUEUE_FLAG_DAX
set per the check in dm_setup_md_queue(), and we notice that in
bdev_direct_access() via the blk_queue_dax() check.  This causes the
filesystem to see that DAX isn't supported.

So, it looks like the bug was introduced when that check was removed from
bdev_direct_access(), not back when DAX support was initially introduced in DM
like I thought previously.

Thanks,
- Ross

      reply	other threads:[~2018-07-05 21:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-01 14:25 FAILED: patch "[PATCH] dm: prevent DAX mounts if not supported" failed to apply to 4.9-stable tree gregkh
2018-07-05 21:57 ` Ross Zwisler [this message]

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=20180705215733.GA16352@linux.intel.com \
    --to=ross.zwisler@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=snitzer@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=toshi.kani@hpe.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.