From 8dd3453814fd488f4beae89ad6de58d15a8af42d Mon Sep 17 00:00:00 2001 From: Tim Shimmin Date: Thu, 21 Sep 2006 15:50:04 +0000 Subject: [PATCH] Update xfsprogs so that the libdisk/md.c code sets stripe width using number of raid-disks and doesn't include spare disks. Make xfsprogs get its __u32 & friends types from if it exists. Merge of master-melb:xfs-cmds:27016a by kenmcd. Bump to 2.8.13. --- VERSION | 2 +- configure.in | 1 + doc/CHANGES | 10 ++++++++-- include/platform_defs.h.in | 5 +++++ libdisk/md.c | 6 +++--- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index 4d924ef87..612208390 100644 --- a/VERSION +++ b/VERSION @@ -3,5 +3,5 @@ # PKG_MAJOR=2 PKG_MINOR=8 -PKG_REVISION=12 +PKG_REVISION=13 PKG_BUILD=1 diff --git a/configure.in b/configure.in index 809046e79..b451d7bf5 100644 --- a/configure.in +++ b/configure.in @@ -57,6 +57,7 @@ AC_HAVE_GETMNTINFO AC_TYPE_PSINT AC_TYPE_PSUNSIGNED +AC_CHECK_TYPES(__u32,,,[#include ]) AC_SIZEOF_POINTERS_AND_LONG AC_MANUAL_FORMAT diff --git a/doc/CHANGES b/doc/CHANGES index 04a7c6ac7..f7fc8545c 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -1,7 +1,13 @@ -xfsprogs-2.8.x +xfsprogs-2.8.13 (21 September 2006) - Fix v2 directory checking with holes and unreadable blocks. - Fix a memory leak in dir2 checking. - + - Update libdisk/md support to work out the stripe width + based on (# raid-disks - # parity disks) which + doesn't include any spare disks (which we mistakenly did before). + Thanks to Shailendra Tripathi's suggestions. + - Get the kernel int types of __u32 and friends from + if we can, otherwise define them ourselves. + xfsprogs-2.8.12 (29 August 2006) - Multi-thread modifications to xfs_repair. - Updated Polish translation, thanks to Jakub Bogusz. diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in index 09f7fea7b..64dc9a9fa 100644 --- a/include/platform_defs.h.in +++ b/include/platform_defs.h.in @@ -31,6 +31,10 @@ #include #include +#undef HAVE___U32 +#ifdef HAVE___U32 +#include +#else typedef unsigned char __u8; typedef signed char __s8; typedef unsigned short __u16; @@ -39,6 +43,7 @@ typedef unsigned int __u32; typedef signed int __s32; typedef unsigned long long int __u64; typedef signed long long int __s64; +#endif typedef __u16 __be16; typedef __u32 __be32; diff --git a/libdisk/md.c b/libdisk/md.c index 9b3ff5f4d..b7f348a09 100644 --- a/libdisk/md.c +++ b/libdisk/md.c @@ -61,11 +61,11 @@ md_get_subvol_stripe( */ switch (md.level) { case 6: - md.nr_disks--; + md.raid_disks--; /* fallthrough */ case 5: case 4: - md.nr_disks--; + md.raid_disks--; /* fallthrough */ case 1: case 0: @@ -77,7 +77,7 @@ md_get_subvol_stripe( /* Update sizes */ *sunit = md.chunk_size >> 9; - *swidth = *sunit * md.nr_disks; + *swidth = *sunit * md.raid_disks; *sectalign = (md.level == 4 || md.level == 5 || md.level == 6); return 1; -- 2.47.2