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

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