diff mbox series

[v4,65/68] btrfs: inode: require page alignement for direct io

Message ID 20201021062554.68132-66-wqu@suse.com
State New, archived
Headers show
Series btrfs: add basic rw support for subpage sector size | expand

Commit Message

Qu Wenruo Oct. 21, 2020, 6:25 a.m. UTC
For incoming subpage support, we still can only submit full page write,
thus the requirement for direct IO alignment should still be page size,
not sector size.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 fs/btrfs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 0da6c91db0bc..625950258c87 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -7894,7 +7894,7 @@  static ssize_t check_direct_IO(struct btrfs_fs_info *fs_info,
 {
 	int seg;
 	int i;
-	unsigned int blocksize_mask = fs_info->sectorsize - 1;
+	unsigned int blocksize_mask = PAGE_SIZE - 1;
 	ssize_t retval = -EINVAL;
 
 	if (offset & blocksize_mask)