b3ba9dc0aa
- adjust fs size to correct size (bnc#744593) - man page documentation updates - do not package obsolete utilities - mkfs: store correct size of device in superblock (bnc#730103) - updated restriper/balance commands to match kernel version - device scanning fixes for dm and multipath (bnc#749540) OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=121
43 lines
1.0 KiB
Diff
43 lines
1.0 KiB
Diff
From 273488299effe9a9182fffc1a7cd9639b68a0da4 Mon Sep 17 00:00:00 2001
|
|
From: David Sterba <dsterba@suse.cz>
|
|
Date: Fri, 17 Feb 2012 11:44:03 +0100
|
|
Subject: [PATCH] btrfs-progs: mkfs: disallow uneven data/metadata blocksize
|
|
for mixed
|
|
|
|
With support for bigger metadata blocks, we must avoid different
|
|
block size for mixed block groups, this causes corruption
|
|
(xfstests/083).
|
|
|
|
Signed-off-by: David Sterba <dsterba@suse.cz>
|
|
---
|
|
mkfs.c | 13 +++++++++++++
|
|
1 files changed, 13 insertions(+), 0 deletions(-)
|
|
|
|
diff --git a/mkfs.c b/mkfs.c
|
|
index e3ced19..e02efcc 100644
|
|
--- a/mkfs.c
|
|
+++ b/mkfs.c
|
|
@@ -1313,6 +1313,19 @@ int main(int ac, char **av)
|
|
"profiles must be the same\n");
|
|
exit(1);
|
|
}
|
|
+
|
|
+ if (leafsize != nodesize) {
|
|
+ fprintf(stderr, "With mixed block groups node and leaf "
|
|
+ "block sizes must be the same\n");
|
|
+ exit(1);
|
|
+ }
|
|
+
|
|
+ if (sectorsize != nodesize) {
|
|
+ fprintf(stderr, "With mixed block groups data and metadata "
|
|
+ "block sizes must be the same\n");
|
|
+ exit(1);
|
|
+ }
|
|
+
|
|
}
|
|
|
|
blocks[0] = BTRFS_SUPER_INFO_OFFSET;
|
|
--
|
|
1.7.6.233.gd79bc
|
|
|