summaryrefslogtreecommitdiff
path: root/fs/btrfs/disk-io.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-06-16 02:48:05 +0300
committerDavid Sterba <dsterba@suse.com>2017-08-16 17:12:04 +0300
commit9f6d251033bc5bd0115c23fae8b6aac5f6263c2c (patch)
treeae3c17550189c0f83634bd65d2586030a5c90d2d /fs/btrfs/disk-io.h
parentabbb3b8ebfec577390873d33076d56bc6e758939 (diff)
downloadlinux-9f6d251033bc5bd0115c23fae8b6aac5f6263c2c.tar.xz
btrfs: use named constant for bdev blocksize
Superblock is read and written using buffer heads, we need to set the bdev blocksize. The magic constant has been hardcoded in several places, so replace it with a named constant. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.h')
-rw-r--r--fs/btrfs/disk-io.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h
index b5d0c4cef819..7f7c35d6347a 100644
--- a/fs/btrfs/disk-io.h
+++ b/fs/btrfs/disk-io.h
@@ -25,6 +25,14 @@
#define BTRFS_SUPER_MIRROR_MAX 3
#define BTRFS_SUPER_MIRROR_SHIFT 12
+/*
+ * Fixed blocksize for all devices, applies to specific ways of reading
+ * metadata like superblock. Must meet the set_blocksize requirements.
+ *
+ * Do not change.
+ */
+#define BTRFS_BDEV_BLOCKSIZE (4096)
+
enum btrfs_wq_endio_type {
BTRFS_WQ_ENDIO_DATA = 0,
BTRFS_WQ_ENDIO_METADATA = 1,