]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
db: increase metadump's default overly long extent discard threshold
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 9 Nov 2017 17:35:22 +0000 (11:35 -0600)
committerEric Sandeen <sandeen@redhat.com>
Thu, 9 Nov 2017 17:35:22 +0000 (11:35 -0600)
Back in 88b8e1d6d7 ("Make xfs_metadump more robust against bad data"),
metadump grew the ability to ignore a directory extent if it was longer
than 20 blocks.  Presumably this was to protect metadump from dumping
absurdly long extents resulting from bmbt corruption, but it's certainly
possible to create a directory with an extent longer than 20 blocks.
Hilariously, the discards happen with no warning unless the caller
explicitly set -w.

This was raised to 1000 blocks in 7431d134fe8 ("Increase default maximum
extent size for xfs_metadump when copying..."), but it's still possible
to create a directory with an extent longer than 1000 blocks.

Increase the threshold to MAXEXTLEN blocks because it's totally valid
for the filesystem to create extents up to that length.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/metadump.c
man/man8/xfs_metadump.8

index dd6bef0d671a2f05c706b4969bcf7d5271297e8a..9d62958bb28aedcb697937de4db180656f290b81 100644 (file)
@@ -32,7 +32,7 @@
 #include "field.h"
 #include "dir2.h"
 
-#define DEFAULT_MAX_EXT_SIZE   1000
+#define DEFAULT_MAX_EXT_SIZE   MAXEXTLEN
 
 /*
  * It's possible that multiple files in a directory (or attributes
index 81748816df369bc5f8772e2959fb4cf80af34d37..7cda0dafb939a04cd4558cd972ceb5b8c33a71f4 100644 (file)
@@ -130,7 +130,7 @@ copied.
 .B \-m
 Set the maximum size of an allowed metadata extent.  Extremely large metadata
 extents are likely to be corrupt, and will be skipped if they exceed
-this value.  The default size is 1000 blocks.
+this value.  The default size is 2097151 blocks.
 .TP
 .B \-o
 Disables obfuscation of file names and extended attributes.