1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-25 01:34:38 +03:00
lvm2/lib
Heming Zhao 245d7fcd59 fix dev_unset_last_byte after write error
ev_unset_last_byte() must be called while the fd is still valid.
After a write error, dev_unset_last_byte() must be called before
closing the dev and resetting the fd.

In the write error path, dev_unset_last_byte() was being called
after label_scan_invalidate() which meant that it would not unset
the last_byte values.

After a write error, dev_unset_last_byte() is now called in
dev_write_bytes() before label_scan_invalidate(), instead of by
the caller of dev_write_bytes().

In the common case of a successful write, the sequence is still:
dev_set_last_byte(); dev_write_bytes(); dev_unset_last_byte();

Signed-off-by: Zhao Heming <heming.zhao@suse.com>
2019-11-13 11:28:22 -06:00
..
activate cov: ensure read_ahead is available 2019-11-08 13:04:45 +01:00
cache lvmcache: free resource on error path 2019-11-08 15:11:50 +01:00
cache_segtype build: remove --with-{snapshots,mirrors,raid,thin,cache} options from ./configure 2018-04-30 10:11:23 +01:00
commands Revert "Revert "vgcreate/vgextend: restrict PVs with mixed block sizes"" 2019-10-24 10:01:12 -05:00
config config: allow_mixed_block_sizes set version 2.02.187 2019-10-24 10:26:33 -05:00
datastruct datastruct: Add str_list_wipe. 2016-04-29 19:47:15 +01:00
device debug: avoid to slashes in debug message 2019-10-26 00:29:44 +02:00
display Remove lvm1 and pool disk formats 2018-04-30 16:55:02 -05:00
error activate: Use macros for target and module names. 2016-03-22 17:46:15 +00:00
filters gcc: cleanup const warning 2019-04-10 13:30:34 +02:00
format_text fix dev_unset_last_byte after write error 2019-11-13 11:28:22 -06:00
freeseg doc: change fsf address 2016-01-21 12:11:37 +01:00
label fix dev_unset_last_byte after write error 2019-11-13 11:28:22 -06:00
locking lvmlockd: do not allow mirror LV to be activated shared 2019-05-21 15:06:37 -05:00
log cleanup: explicitely ignore result code 2018-02-28 21:15:55 +01:00
lvmpolld doc: change fsf address 2016-01-21 12:11:37 +01:00
metadata fix dev_unset_last_byte after write error 2019-11-13 11:28:22 -06:00
mirror lvmlockd: do not allow mirror LV to be activated shared 2019-05-21 15:06:37 -05:00
misc gcc: cleanup warning of shawhing a global dclr 2019-07-06 01:24:28 +02:00
mm memlock: extend exception list 2018-07-04 13:41:08 +02:00
notify dbus: also recognize error state for missing service that comes from original D-Bus 2016-11-15 10:09:11 +01:00
properties doc: change fsf address 2016-01-21 12:11:37 +01:00
raid build: remove --with-{snapshots,mirrors,raid,thin,cache} options from ./configure 2018-04-30 10:11:23 +01:00
report vgs: add report field for shared 2018-05-31 10:23:03 -05:00
snapshot build: remove --with-{snapshots,mirrors,raid,thin,cache} options from ./configure 2018-04-30 10:11:23 +01:00
striped segtype: add linear 2018-06-26 12:15:44 +02:00
thin build: remove --with-{snapshots,mirrors,raid,thin,cache} options from ./configure 2018-04-30 10:11:23 +01:00
unknown gcc: remove warns about free of const 2018-02-13 19:56:02 +01:00
uuid cleanup :drop unneeded header file 2016-10-03 17:49:56 +02:00
zero activate: Use macros for target and module names. 2016-03-22 17:46:15 +00:00
Makefile.in bcache: Move the utils to a separate file. 2018-05-03 09:34:41 +01:00