1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-11 20:58:50 +03:00
lvm2/lib/metadata
Heming Zhao 13c254fc05 fix dev_unset_last_byte after write error
dev_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 09:36:58 -06:00
..
2019-10-25 14:08:59 -05:00
2016-01-21 12:11:37 +01:00
2018-06-08 14:36:56 +02:00
2019-10-31 15:31:30 +01:00
2018-06-05 16:23:18 +02:00
2018-11-06 14:18:41 -06:00
2019-08-26 15:32:19 +02:00
2019-06-07 15:54:04 -05:00