file-posix: Make auto-read-only dynamic
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest10 patches 12 repliesIn review
- v18 patches 3 repliesSuperseded
Changes in v2 from the cover letter
- Added test for and fixed snapshot=on,read-only=on regression [Berto]
- Added test for and fixed commit regression [Peter]
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | tests/virtio-blk-test: Disable auto-read-onlytests/ | +1 | 1 reply | |
| 2/10 | qemu-iotests: commit to backing file with auto-read-onlytests/ tests/ | +51 | 1 reply | |
| 3/10 | block: Avoid useless local_errblock.c | +1 | 2 replies | |
| 4/10 | block: Make permission changes in reopen less wrongblock.c | +24 | 0 replies | |
| 5/10 | file-posix: Fix bdrv_open_flags() for snapshot=onblock.c tests/ tests/ +1 more | +25 | 0 replies | |
| 6/10 | file-posix: Factor out raw_reconfigure_getfd()block/ | +62 | 0 replies | |
| 7/10 | file-posix: Store BDRVRawState.reopen_state during reopenblock/ | +10 | 0 replies | |
| 8/10 | file-posix: Lock new fd in raw_reopen_prepare()block/ | +16 | 0 replies | |
| 9/10 | file-posix: Prepare permission code for fd switchingblock/ | +85 | 0 replies | |
| 10/10 | file-posix: Make auto-read-only dynamicblock/ tests/ | +23 | 7 replies |
Reviews trailers per patch
3 of 10 patches have a Reviewed-by or Acked-by.
| Patch | Eric Blake |
|---|---|
| 1/10 | R-b |
| 2/10 | R-b |
| 3/10 | R-b |
| 4/10 | |
| 5/10 | |
| 6/10 | |
| 7/10 | |
| 8/10 | |
| 9/10 | |
| 10/10 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH v2 00/10] file-posix: Make auto-read-only dynamic
We introduced the auto-read-only option to fix the problem that block jobs that reopen a backing file read-write don't work any more when all nodes are created individually with -blockdev. The reason is that bs->file of these backing files doesn't inherit the read-only option from the format layer node any more if it's created separately.
The way auto-read-only was designed to fix this is that it just always opens the file node read-write if it can, so reopening the format layer node is enough to make the backing file writable when necessary.
This works in principle, but not when libvirt uses sVirt: Then QEMU doesn't even have the permissions to open the image file read-write until libvirt performs an operation where write access is needed.
This series changes auto-read-only so that it works dynamically and automatically reopens the file read-only or read-write depending on the permissions that users attached to the node requested.
See also: https://bugzilla.redhat.com/show_bug.cgi?id=1685989
v2:
- Added test for and fixed snapshot=on,read-only=on regression [Berto]
- Added test for and fixed commit regression [Peter]
Kevin Wolf (10):
tests/virtio-blk-test: Disable auto-read-only
qemu-iotests: commit to backing file with auto-read-only
block: Avoid useless local_err
block: Make permission changes in reopen less wrong
file-posix: Fix bdrv_open_flags() for snapshot=on
file-posix: Factor out raw_reconfigure_getfd()
file-posix: Store BDRVRawState.reopen_state during reopen
file-posix: Lock new fd in raw_reopen_prepare()
file-posix: Prepare permission code for fd switching
file-posix: Make auto-read-only dynamic
block.c | 46 ++++--- block/file-posix.c | 248 ++++++++++++++++++++++++---------- tests/virtio-blk-test.c | 2 +- tests/qemu-iotests/051 | 7 + tests/qemu-iotests/051.out | 9 ++ tests/qemu-iotests/051.pc.out | 9 ++ tests/qemu-iotests/232 | 31 +++++ tests/qemu-iotests/232.out | 32 ++++- 8 files changed, 284 insertions(+), 100 deletions(-)
Signature · 1 line
2.20.1