Message ID | 20200107165542.70108-2-josef@toxicpanda.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Some fsx improvements | expand |
On Tue, Jan 07, 2020 at 11:55:40AM -0500, Josef Bacik wrote: > I was running down a i_size problem and was missing the failure until > the next iteration of fsx operations because we do the file size check > _after_ the closeopen operation. Move it after the closeopen operation I think you mean "_before_" here? And that's why we move it _after_ closeopen? Thanks, Eryu > so we can catch problems where the file gets messed up on disk. > > Signed-off-by: Josef Bacik <josef@toxicpanda.com> > --- > ltp/fsx.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/ltp/fsx.c b/ltp/fsx.c > index 00001117..c74b13c2 100644 > --- a/ltp/fsx.c > +++ b/ltp/fsx.c > @@ -2211,10 +2211,10 @@ have_op: > check_contents(); > > out: > - if (sizechecks && testcalls > simulatedopcount) > - check_size(); > if (closeopen) > docloseopen(); > + if (sizechecks && testcalls > simulatedopcount) > + check_size(); > return 1; > } > > -- > 2.23.0 >
diff --git a/ltp/fsx.c b/ltp/fsx.c index 00001117..c74b13c2 100644 --- a/ltp/fsx.c +++ b/ltp/fsx.c @@ -2211,10 +2211,10 @@ have_op: check_contents(); out: - if (sizechecks && testcalls > simulatedopcount) - check_size(); if (closeopen) docloseopen(); + if (sizechecks && testcalls > simulatedopcount) + check_size(); return 1; }
I was running down a i_size problem and was missing the failure until the next iteration of fsx operations because we do the file size check _after_ the closeopen operation. Move it after the closeopen operation so we can catch problems where the file gets messed up on disk. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- ltp/fsx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)