Max Reitz
d0bc9e5d5e
block/file-posix: Generalize raw_regular_truncate
...
Currently, raw_regular_truncate() is intended for setting the size of a
newly created file. However, we also want to use it for truncating an
existing file in which case only the newly added space (when growing)
should be preallocated.
This also means that if resizing failed, we should try to restore the
original file size. This is important when using preallocation.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20170613202107.10125-8-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2017-07-11 17:45:01 +02:00
..
2017-06-16 07:55:00 +08:00
2017-07-10 13:18:07 +02:00
2017-07-11 17:45:01 +02:00
2017-06-26 14:54:46 +02:00
2017-06-26 14:54:46 +02:00
2017-07-11 17:45:01 +02:00
2017-04-24 15:09:33 -04:00
2017-04-24 15:09:33 -04:00
2017-07-11 17:45:01 +02:00
2017-07-11 17:45:01 +02:00
2017-07-11 17:44:56 +02:00
2017-05-16 10:34:50 -04:00
2017-07-11 17:44:59 +02:00
2016-10-07 14:14:06 +02:00
2017-04-24 15:09:33 -04:00
2016-10-07 14:14:06 +02:00
2017-07-11 17:45:01 +02:00
2017-07-11 17:45:01 +02:00
2017-07-11 17:45:01 +02:00
2017-07-11 17:44:58 +02:00
2017-01-27 18:07:58 +01:00
2017-07-11 17:45:01 +02:00
2017-02-21 11:39:39 +00:00
2017-07-11 17:44:57 +02:00
2017-07-11 17:45:01 +02:00
2017-07-04 14:30:03 +02:00
2017-06-26 14:54:46 +02:00
2017-06-26 14:54:46 +02:00
2017-07-11 17:45:01 +02:00
2017-05-09 09:13:51 +02:00
2017-07-11 17:45:01 +02:00
2017-07-11 17:44:56 +02:00
2017-07-11 17:44:59 +02:00
2016-11-25 13:51:30 +01:00
2017-07-11 17:44:56 +02:00
2017-07-11 17:45:01 +02:00
2017-05-11 14:28:07 +02:00
2017-07-11 17:45:01 +02:00
2017-07-11 17:44:59 +02:00
2017-07-11 17:45:01 +02:00
2016-06-07 18:19:24 +03:00
2017-06-26 14:51:15 +02:00
2016-01-20 13:36:23 +01:00
2017-06-26 14:51:14 +02:00
2017-07-11 17:45:01 +02:00
2017-06-26 14:51:15 +02:00
2017-06-20 14:31:31 +02:00
2017-07-11 17:45:01 +02:00
2017-07-11 17:45:01 +02:00
2017-07-10 13:18:07 +02:00
2017-07-11 17:45:01 +02:00
2017-05-09 09:13:51 +02:00
2017-06-26 14:54:46 +02:00
2017-07-10 13:18:07 +02:00
2017-06-26 14:51:13 +02:00
2017-07-10 13:18:06 +02:00
2017-07-11 17:45:01 +02:00
2016-09-23 11:42:52 +08:00
2017-07-11 17:45:01 +02:00
2017-07-11 17:45:01 +02:00
2014-12-12 15:42:22 +00:00
2017-07-11 17:45:01 +02:00
2017-07-11 17:45:01 +02:00
2017-07-10 13:18:07 +02:00
2017-05-09 09:13:51 +02:00
2017-02-21 11:39:39 +00:00
2016-10-07 13:34:07 +02:00