From: Jon Derrick <jonathan.derrick@intel.com>
To: linux-block@vger.kernel.org
Cc: Jon Derrick <jonathan.derrick@intel.com>,
"Jens Axboe" <axboe@fb.com>,
"Alexander Viro" <viro@zeniv.linux.org.uk>,
linux-fsdevel@vger.kernel.org,
"Dan Williams" <dan.j.williams@intel.com>,
"Jeff Moyer" <jmoyer@redhat.com>,
"Stephen Bates" <stephen.bates@microsemi.com>,
"Keith Busch" <keith.busch@intel.com>,
linux-nvme@lists.infradead.org,
"Christoph Hellwig" <hch@infradead.org>
Subject: [RFC 1/2] block: allow other bd i_node flags when DAX is disabled
Date: Thu, 12 May 2016 11:43:05 -0600 [thread overview]
Message-ID: <1463074986-3070-2-git-send-email-jonathan.derrick@intel.com> (raw)
In-Reply-To: <1463074986-3070-1-git-send-email-jonathan.derrick@intel.com>
When DAX is not compiled into the kernel or the device does not support
direct-access, the block device file's inode flags are fully cleared.
This patch changes it to only clear the S_DAX flag when DAX is disabled.
This reverts to i_flags behavior prior to
bbab37ddc20bae4709bca8745c128c4f46fe63c5
Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
---
fs/block_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 20a2c02..d4fa725 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1208,7 +1208,7 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
if (IS_ENABLED(CONFIG_BLK_DEV_DAX) && disk->fops->direct_access)
bdev->bd_inode->i_flags = S_DAX;
else
- bdev->bd_inode->i_flags = 0;
+ bdev->bd_inode->i_flags &= ~S_DAX;
if (!partno) {
ret = -ENXIO;
--
1.8.3.1
WARNING: multiple messages have this Message-ID (diff)
From: jonathan.derrick@intel.com (Jon Derrick)
Subject: [RFC 1/2] block: allow other bd i_node flags when DAX is disabled
Date: Thu, 12 May 2016 11:43:05 -0600 [thread overview]
Message-ID: <1463074986-3070-2-git-send-email-jonathan.derrick@intel.com> (raw)
In-Reply-To: <1463074986-3070-1-git-send-email-jonathan.derrick@intel.com>
When DAX is not compiled into the kernel or the device does not support
direct-access, the block device file's inode flags are fully cleared.
This patch changes it to only clear the S_DAX flag when DAX is disabled.
This reverts to i_flags behavior prior to
bbab37ddc20bae4709bca8745c128c4f46fe63c5
Signed-off-by: Jon Derrick <jonathan.derrick at intel.com>
---
fs/block_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 20a2c02..d4fa725 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1208,7 +1208,7 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
if (IS_ENABLED(CONFIG_BLK_DEV_DAX) && disk->fops->direct_access)
bdev->bd_inode->i_flags = S_DAX;
else
- bdev->bd_inode->i_flags = 0;
+ bdev->bd_inode->i_flags &= ~S_DAX;
if (!partno) {
ret = -ENXIO;
--
1.8.3.1
next prev parent reply other threads:[~2016-05-12 17:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-12 17:43 [RFC 0/2] Support for high-priority block device flag Jon Derrick
2016-05-12 17:43 ` Jon Derrick
2016-05-12 17:43 ` Jon Derrick [this message]
2016-05-12 17:43 ` [RFC 1/2] block: allow other bd i_node flags when DAX is disabled Jon Derrick
2016-05-13 9:18 ` Carlos Maiolino
2016-05-13 13:25 ` Dan Williams
2016-05-13 13:25 ` Dan Williams
2016-05-13 17:33 ` Jeff Moyer
2016-05-13 17:33 ` Jeff Moyer
2016-05-13 17:53 ` Dan Williams
2016-05-13 17:53 ` Dan Williams
2016-05-13 18:01 ` Jon Derrick
2016-05-13 18:01 ` Jon Derrick
2016-05-12 17:43 ` [RFC 2/2] block: Introduce S_HIPRI inode flag Jon Derrick
2016-05-12 17:43 ` Jon Derrick
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=1463074986-3070-2-git-send-email-jonathan.derrick@intel.com \
--to=jonathan.derrick@intel.com \
--cc=axboe@fb.com \
--cc=dan.j.williams@intel.com \
--cc=hch@infradead.org \
--cc=jmoyer@redhat.com \
--cc=keith.busch@intel.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=stephen.bates@microsemi.com \
--cc=viro@zeniv.linux.org.uk \
/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.