* [PATCH] db: increase metadump's default overly long extent discard threshold
@ 2017-09-27 1:02 Darrick J. Wong
2017-09-27 2:21 ` Eric Sandeen
0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2017-09-27 1:02 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs
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>
---
db/metadump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/db/metadump.c b/db/metadump.c
index c179480..c8eb8f0 100644
--- a/db/metadump.c
+++ b/db/metadump.c
@@ -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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] db: increase metadump's default overly long extent discard threshold
2017-09-27 1:02 [PATCH] db: increase metadump's default overly long extent discard threshold Darrick J. Wong
@ 2017-09-27 2:21 ` Eric Sandeen
2017-09-27 2:31 ` Darrick J. Wong
0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2017-09-27 2:21 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: xfs
On 9/26/17 8:02 PM, Darrick J. Wong wrote:
> 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>
This is documented in the manpage as being 1000, so that needs an update
as well.
And should the warning be made unconditional, if that's what burned
you?
-Eric
> ---
> db/metadump.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/db/metadump.c b/db/metadump.c
> index c179480..c8eb8f0 100644
> --- a/db/metadump.c
> +++ b/db/metadump.c
> @@ -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
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] db: increase metadump's default overly long extent discard threshold
2017-09-27 2:21 ` Eric Sandeen
@ 2017-09-27 2:31 ` Darrick J. Wong
0 siblings, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2017-09-27 2:31 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs
On Tue, Sep 26, 2017 at 09:21:37PM -0500, Eric Sandeen wrote:
> On 9/26/17 8:02 PM, Darrick J. Wong wrote:
> > 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>
>
> This is documented in the manpage as being 1000, so that needs an update
> as well.
Ok.
> And should the warning be made unconditional, if that's what burned
> you?
Nah, since most of the other warnings in metadump are about things that
look like bad metadata.
--D
>
> -Eric
>
> > ---
> > db/metadump.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/db/metadump.c b/db/metadump.c
> > index c179480..c8eb8f0 100644
> > --- a/db/metadump.c
> > +++ b/db/metadump.c
> > @@ -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
> >
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-27 2:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-27 1:02 [PATCH] db: increase metadump's default overly long extent discard threshold Darrick J. Wong
2017-09-27 2:21 ` Eric Sandeen
2017-09-27 2:31 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox