On Sat, Nov 18, 2017 at 02:19:06PM +0800, Eryu Guan wrote: > On start up, fsx checks for various fallocate(2) operation support > status and disables unsupported operations. But when replaying > operations from a log, fsx failed to skip KEEP_SIZE fallocate(2) > calls if underlying filesystem doesn't support it. For example, > NFSv4.2 supports fallocate(2) but not KEEP_SIZE, and this causes > generic/469 fails on NFSv4.2. > > Fix it by taking 'keep_size_calls' into consideration when replaying > ops from log file. > > Signed-off-by: Eryu Guan <eguan@xxxxxxxxxx> > --- > > Note that generic/469 hasn't been pushed to upstream yet. Will do in > this week's update. generic/469 is upstream now, still need some reviews on this patch. Thanks, Eryu > > ltp/fsx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ltp/fsx.c b/ltp/fsx.c > index 9c358f27bd92..fc1381e60f09 100644 > --- a/ltp/fsx.c > +++ b/ltp/fsx.c > @@ -1469,7 +1469,7 @@ test(void) > offset = log_entry.args[0]; > size = log_entry.args[1]; > closeopen = !!(log_entry.flags & FL_CLOSE_OPEN); > - keep_size = !!(log_entry.flags & FL_KEEP_SIZE); > + keep_size = !!((log_entry.flags & FL_KEEP_SIZE) && keep_size_calls); > goto have_op; > } > return 0; > -- > 2.14.3 > -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html