1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-21 02:50:41 +03:00
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
..
2016-04-29 19:47:15 +01:00
2018-04-30 16:55:02 -05:00
2019-04-10 13:30:34 +02:00
2016-01-21 12:11:37 +01:00
2016-01-21 12:11:37 +01:00
2018-07-04 13:41:08 +02:00
2016-01-21 12:11:37 +01:00
2018-05-31 10:23:03 -05:00
2018-06-26 12:15:44 +02:00
2016-10-03 17:49:56 +02:00