From: Eryu Guan <eguan@redhat.com>
To: fstests@vger.kernel.org
Cc: Eryu Guan <eguan@redhat.com>
Subject: [PATCH] ltp/fsx: really skip fallocate keep_size calls when replaying ops
Date: Sat, 18 Nov 2017 14:19:06 +0800 [thread overview]
Message-ID: <20171118061906.11227-1-eguan@redhat.com> (raw)
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@redhat.com>
---
Note that generic/469 hasn't been pushed to upstream yet. Will do in
this week's update.
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
next reply other threads:[~2017-11-18 6:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-18 6:19 Eryu Guan [this message]
2017-11-23 7:08 ` [PATCH] ltp/fsx: really skip fallocate keep_size calls when replaying ops Eryu Guan
2017-11-23 8:05 ` Amir Goldstein
2017-11-23 8:28 ` Eryu Guan
2017-11-23 8:50 ` Amir Goldstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171118061906.11227-1-eguan@redhat.com \
--to=eguan@redhat.com \
--cc=fstests@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox