Blame SOURCES/xfsprogs-4.14.0-db-increase-metadump-s-default-overly-long-extent-di.patch

e59f31
From 921c30674e9bc719e7c2747deb6deb04be2adb4b Mon Sep 17 00:00:00 2001
e59f31
From: "Darrick J. Wong" <darrick.wong@oracle.com>
e59f31
Date: Thu, 9 Nov 2017 11:35:22 -0600
e59f31
Subject: [PATCH] db: increase metadump's default overly long extent discard 
e59f31
 threshold
e59f31
e59f31
Back in 88b8e1d6d7 ("Make xfs_metadump more robust against bad data"),
e59f31
metadump grew the ability to ignore a directory extent if it was longer
e59f31
than 20 blocks.  Presumably this was to protect metadump from dumping
e59f31
absurdly long extents resulting from bmbt corruption, but it's certainly
e59f31
possible to create a directory with an extent longer than 20 blocks.
e59f31
Hilariously, the discards happen with no warning unless the caller
e59f31
explicitly set -w.
e59f31
e59f31
This was raised to 1000 blocks in 7431d134fe8 ("Increase default maximum
e59f31
extent size for xfs_metadump when copying..."), but it's still possible
e59f31
to create a directory with an extent longer than 1000 blocks.
e59f31
e59f31
Increase the threshold to MAXEXTLEN blocks because it's totally valid
e59f31
for the filesystem to create extents up to that length.
e59f31
e59f31
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
e59f31
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
e59f31
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
e59f31
---
e59f31
 db/metadump.c           | 2 +-
e59f31
 man/man8/xfs_metadump.8 | 2 +-
e59f31
 2 files changed, 2 insertions(+), 2 deletions(-)
e59f31
e59f31
Index: xfsprogs-4.5.0/db/metadump.c
e59f31
===================================================================
e59f31
--- xfsprogs-4.5.0.orig/db/metadump.c
e59f31
+++ xfsprogs-4.5.0/db/metadump.c
e59f31
@@ -32,7 +32,7 @@
e59f31
 #include "field.h"
e59f31
 #include "dir2.h"
e59f31
 
e59f31
-#define DEFAULT_MAX_EXT_SIZE	1000
e59f31
+#define DEFAULT_MAX_EXT_SIZE	MAXEXTLEN
e59f31
 
e59f31
 /*
e59f31
  * It's possible that multiple files in a directory (or attributes
e59f31
Index: xfsprogs-4.5.0/man/man8/xfs_metadump.8
e59f31
===================================================================
e59f31
--- xfsprogs-4.5.0.orig/man/man8/xfs_metadump.8
e59f31
+++ xfsprogs-4.5.0/man/man8/xfs_metadump.8
e59f31
@@ -114,7 +114,7 @@ copied.
e59f31
 .B \-m
e59f31
 Set the maximum size of an allowed metadata extent.  Extremely large metadata
e59f31
 extents are likely to be corrupt, and will be skipped if they exceed
e59f31
-this value.  The default size is 1000 blocks.
e59f31
+this value.  The default size is 2097151 blocks.
e59f31
 .TP
e59f31
 .B \-o
e59f31
 Disables obfuscation of file names and extended attributes.