Kevin Wolf
23dece19da
file-posix: Make auto-read-only dynamic
...
Until now, with auto-read-only=on we tried to open the file read-write
first and if that failed, read-only was tried. This is actually not good
enough for libvirt, which gives QEMU SELinux permissions for read-write
only as soon as it actually intends to write to the image. So we need to
be able to switch between read-only and read-write at runtime.
This patch makes auto-read-only dynamic, i.e. the file is opened
read-only as long as no user of the node has requested write
permissions, but it is automatically reopened read-write as soon as the
first writer is attached. Conversely, if the last writer goes away, the
file is reopened read-only again.
bs->read_only is no longer set for auto-read-only=on files even if the
file descriptor is opened read-only because it will be transparently
upgraded as soon as a writer is attached. This changes the output of
qemu-iotests 232.
Signed-off-by: Kevin Wolf <kwolf@redhat.com >
2019-03-12 20:30:14 +01:00
..
2019-02-22 14:07:01 -05:00
2019-03-08 12:26:45 +01:00
2019-02-22 09:32:32 +00:00
2019-02-26 14:08:03 +00:00
2019-03-07 17:28:46 +01:00
2019-02-22 14:07:01 -05:00
2019-03-08 12:26:45 +01:00
2019-03-05 14:43:11 +01:00
2019-03-12 20:30:14 +01:00
2019-03-11 12:45:36 +01:00
2019-02-21 12:28:41 -05:00
2019-02-22 14:07:01 -05:00
2019-03-05 14:43:11 +01:00
2019-03-07 17:28:46 +01:00
2019-01-17 21:10:57 -05:00
2019-01-17 21:10:57 -05:00
2019-03-07 17:28:07 +01:00
2019-01-14 14:52:30 +00:00
2019-01-14 14:52:30 +00:00
2019-01-17 21:10:57 -05:00
2019-01-22 05:14:32 +01:00
2019-03-12 16:07:14 +11:00
2019-02-22 09:32:32 +00:00
2019-03-07 22:05:54 +01:00
2019-01-24 15:20:59 +01:00
2018-12-11 15:45:22 -02:00
2018-12-20 11:19:12 -05:00
2019-02-26 09:21:25 +11:00
2019-01-11 11:45:00 +01:00
2019-03-07 17:28:45 +01:00
2019-03-07 17:28:47 +01:00
2019-03-07 17:28:26 +01:00
2019-03-07 17:28:47 +01:00
2019-01-22 05:14:32 +01:00
2019-03-07 17:28:46 +01:00
2019-03-06 10:10:36 +01:00
2019-01-22 06:26:32 +01:00
2019-03-07 16:50:04 +01:00
2019-03-07 17:28:07 +01:00
2019-03-06 10:10:36 +01:00
2019-03-06 10:10:36 +01:00
2019-03-07 17:28:46 +01:00
2019-03-07 22:16:22 +01:00
2019-02-12 17:35:56 +01:00
2019-03-07 17:28:41 +01:00
2019-03-07 22:16:22 +01:00
2018-12-17 15:36:40 +01:00
2019-03-09 14:43:39 +00:00
2019-03-07 17:28:47 +01:00
2019-02-01 15:32:17 +00:00
2019-03-07 22:16:22 +01:00
2019-03-07 17:28:46 +01:00
2019-03-07 17:28:46 +01:00
2019-03-07 17:28:25 +01:00
2019-03-07 17:28:46 +01:00
2019-03-12 14:33:05 +11:00
2019-03-12 16:07:14 +11:00
2018-12-17 15:36:40 +01:00
2019-03-12 16:07:14 +11:00
2019-03-07 16:50:04 +01:00
2019-01-14 14:52:30 +00:00
2018-12-12 10:28:27 +01:00
2019-03-07 17:28:24 +01:00
2019-02-22 14:07:01 -05:00
2019-03-07 17:28:07 +01:00
2019-03-07 22:16:22 +01:00
2019-03-08 16:31:34 +00:00
2019-03-07 17:28:25 +01:00
2019-03-07 17:28:46 +01:00
2019-03-07 16:50:04 +01:00
2019-03-07 22:16:22 +01:00
2019-03-05 11:27:41 +08:00
2018-12-14 13:30:54 +00:00
2019-02-26 15:32:18 +00:00
2019-02-26 15:32:18 +00:00
2019-02-26 15:32:19 +00:00
2019-02-26 15:25:58 +00:00
2019-02-26 19:04:47 +00:00
2019-02-25 15:03:19 +01:00
2019-02-01 13:46:44 +01:00
2019-03-07 16:50:04 +01:00
2019-03-05 14:43:11 +01:00
2019-03-07 22:16:22 +01:00
2018-12-12 11:16:49 +00:00
2019-01-11 13:57:25 +01:00
2019-02-26 15:32:19 +00:00
2018-12-13 19:10:06 +01:00
2019-02-04 16:03:20 +00:00
2019-02-12 17:35:56 +01:00
2019-01-15 18:26:50 -05:00
2019-03-05 11:27:41 +08:00
2019-01-24 12:23:35 +00:00
2019-02-26 15:32:19 +00:00
2019-01-07 16:18:42 +04:00
2019-03-11 16:33:49 +01:00
2019-03-05 14:43:11 +01:00
2019-02-18 14:44:04 +01:00
2019-03-05 14:43:11 +01:00
2019-03-05 14:43:11 +01:00
2019-01-11 15:46:55 +01:00
2018-12-13 19:10:06 +01:00
2019-02-26 15:25:58 +00:00
2019-01-23 15:51:47 +00:00
2018-12-20 10:29:08 +01:00
2019-03-07 16:50:04 +01:00
2019-03-07 17:28:46 +01:00
2018-12-20 10:29:08 +01:00
2019-03-08 16:31:34 +00:00
2019-03-07 17:28:27 +01:00
2019-03-12 20:30:13 +01:00
2019-03-07 17:28:42 +01:00
2019-03-07 17:28:27 +01:00
2019-03-07 17:28:42 +01:00
2019-03-07 17:28:27 +01:00
2019-03-07 17:28:26 +01:00
2019-02-01 13:46:45 +01:00
2019-03-07 17:28:46 +01:00