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
2018-11-13 10:47:59 +00:00
2018-06-08 14:39:24 -03: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
2018-10-24 19:03:37 +01:00
2018-07-02 15:41:17 +02:00
2018-07-02 15:41:17 +02:00
2019-01-17 21:10:57 -05:00
2019-01-22 05:14:32 +01:00
2018-06-08 13:17:39 -04:00
2019-03-12 16:07:14 +11:00
2019-02-22 09:32:32 +00:00
2018-08-15 08:12:19 +02:00
2018-11-19 10:08:19 -06:00
2019-03-07 22:05:54 +01:00
2019-01-24 15:20:59 +01:00
2018-05-04 08:27:53 +02:00
2018-05-04 08:27:53 +02:00
2018-05-04 08:27:53 +02:00
2018-05-04 08:27:53 +02:00
2018-07-28 09:09:58 +02:00
2018-12-11 15:45:22 -02:00
2018-10-05 16:27:09 +04:00
2018-07-28 09:09:58 +02:00
2018-12-20 11:19:12 -05:00
2018-07-03 13:04:38 +01:00
2018-07-03 13:04:38 +01:00
2018-07-24 17:33:39 +01:00
2018-10-19 12:26:57 +01:00
2018-08-23 18:46:25 +02: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
2018-08-23 18:46:25 +02:00
2018-08-15 12:50:39 +02: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
2018-08-16 08:42:06 +02: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
2018-08-16 08:42:06 +02:00
2019-03-07 17:28:46 +01:00
2018-06-08 13:15:32 +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-10-19 13:44:03 +02:00
2018-07-09 14:51:34 +01: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-08-31 09:53:10 +02:00
2018-12-12 10:28:27 +01:00
2018-08-23 18:46:23 +02:00
2019-03-07 17:28:24 +01:00
2018-03-12 16:12:47 +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
2018-03-13 18:06:06 +00:00
2018-03-13 18:06:06 +00: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
2018-03-27 13:05:28 +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
2018-03-02 18:39:07 +01:00
2019-02-01 13:46:44 +01:00
2018-09-25 15:31:15 +02:00
2018-09-25 15:50:15 +02: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
2018-10-19 12:26:57 +01:00
2019-02-26 15:32:19 +00:00
2018-10-24 19:03:37 +01: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
2018-11-12 17:46:57 +01:00
2019-01-24 12:23:35 +00:00
2019-02-26 15:32:19 +00:00
2018-03-06 10:19:05 +00:00
2018-07-02 15:41:10 +02:00
2018-05-04 08:27:53 +02:00
2019-01-07 16:18:42 +04:00
2018-07-02 15:41:10 +02:00
2018-08-31 09:53:10 +02:00
2019-03-11 16:33:49 +01:00
2018-09-26 08:55:54 -07: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-08-23 18:46:25 +02:00
2018-08-23 18:46:25 +02:00
2018-10-01 19:13:55 +02:00
2018-12-13 19:10:06 +01:00
2018-05-20 08:48:13 +03:00
2019-02-26 15:25:58 +00:00
2018-07-23 14:00:03 +02:00
2018-05-04 08:27:53 +02:00
2019-01-23 15:51:47 +00:00
2018-08-23 18:46:25 +02:00
2018-06-08 13:15:32 +01:00
2018-06-06 15:44:07 -04:00
2018-09-07 16:37:47 -04:00
2018-09-07 16:37:47 -04:00
2018-09-07 16:37:47 -04:00
2018-11-14 16:12:24 -05:00
2018-06-06 15:44:07 -04:00
2018-06-06 15:44:12 -04:00
2018-09-07 16:37:47 -04:00
2018-10-30 13:53:15 -04: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-08-16 08:42:06 +02:00
2018-08-16 08:42:06 +02: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
2018-08-23 13:32:50 +02: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
2018-05-04 08:27:53 +02:00