-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to run '--verify_only' workload on a read-only filesystem even though this is a read-only workload #1681
Comments
You still set |
Yes. Which is the correct thing to do. The point of '--verify_only' is that you pass all the options of the job that created the data and it verifies that what was written matches what would have been written by that job. If I changed that to --rw=read then it would be thinking that I was trying to verify the output of a job which is all reads, i.e. nothing, which would make no sense to do. From the man page:
|
It seems reasonable to omit the
|
If readonly is set, then we should be safe and never open the device for read/write at all. Just as a safe guard in case there's a bug that does make it issue a write. I think it'd be saner to clear this differently, eg if verify-only is set, then clear any write flags in data direction? |
If read only is set then the condition will fail and the RDWR flag won't get set (which is the same behavior as before). The change just makes it so that RDWR gets set only if both readonly iand verifyonly are not set. |
The above patch did take some effort to convince myself that it does the right thing. And your suggestion is easier to think about. So I will go with your suggestion. |
Ah yeah I'm blind, it does do the right thing! |
@GavinPLucas Can you try the patch below?
Also available at https://github.com/vincentkfu/fio/commits/1681/ |
@vincentkfu Many thanks! I'll give it a go as soon as I can and get back to you. |
@vincentkfu I've had one of my team re-test with a build I made that includes the patch, and I can confirm that it works for us. Many thanks! |
Please acknowledge the following before creating a ticket
Description of the bug:
Verify_only workloads are, by definition, read only. However fio throws an error "error=Read-only file system" when running a verify_only workload on a read-only filesystem.
When the '--verify_only' flag is used, fio should ignore the checks for a read-only filesystem, even if '--rw=write' is used, since this workload will not actually perform any write operations, just read and verify the data that would have been written by this workload.
I may be wrong, but I'm guessing that it's still trying to open the file read/write, the same as the original workload, even though this is actually a read only workload.
The point of trying to do this is that I'm attempting to verify data written by a previous fio job on a read-only snapshot of the filesystem. Unfortunately this isn't possible due to this issue.
Environment: Debian 11.8
fio version: fio-3.36-19-gbdf99
Reproduction steps
EXPECTED OUTCOME:
The fio job should read and verify the contents of the file that was created by the original workload.
ACTUTAL OUTCOME:
fio throws 'error=Read-only file system' even though this is, by definition, a read-only job:
The text was updated successfully, but these errors were encountered: