[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180809180450.5091-7-naota@elisp.net>
Date: Fri, 10 Aug 2018 03:04:39 +0900
From: Naohiro Aota <naota@...sp.net>
To: David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org
Cc: Chris Mason <clm@...com>, Josef Bacik <jbacik@...com>,
linux-kernel@...r.kernel.org, Hannes Reinecke <hare@...e.com>,
Damien Le Moal <damien.lemoal@....com>,
Bart Van Assche <bart.vanassche@....com>,
Matias Bjorling <mb@...htnvm.io>,
Naohiro Aota <naota@...sp.net>
Subject: [RFC PATCH 06/17] btrfs: disable direct IO in HMZONED mode
Direct write I/Os can be directed at existing extents that have already
been written. Such write requests are prohibited on host-managed zoned
block devices. So disable direct IO support for a volume with HMZONED mode
enabled.
Signed-off-by: Naohiro Aota <naota@...sp.net>
---
fs/btrfs/inode.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 212fa71317d6..05f5e05ccf37 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8523,6 +8523,9 @@ static ssize_t check_direct_IO(struct btrfs_fs_info *fs_info,
unsigned int blocksize_mask = fs_info->sectorsize - 1;
ssize_t retval = -EINVAL;
+ if (btrfs_fs_incompat(fs_info, HMZONED))
+ goto out;
+
if (offset & blocksize_mask)
goto out;
--
2.18.0
Powered by blists - more mailing lists