1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib/metadata
David Teigland c32d7fed4f writecache: use two step detach
When detaching a writecache, use the cleaner setting
by default to writeback data prior to suspending the
lv to detach the writecache.  This avoids potentially
blocking for a long period with the device suspended.

Detaching a writecache first sets the cleaner option, waits
for a short period of time (less than a second), and checks
if the writecache has quickly become clean.  If so, the
writecache is detached immediately.  This optimizes the case
where little writeback is needed.

If the writecache does not quickly become clean, then the
detach command leaves the writecache attached with the
cleaner option set.  This leaves the LV in the same state
as if the user had set the cleaner option directly with
lvchange --cachesettings cleaner=1 LV.

After leaving the LV with the cleaner option set, the
detach command will wait and watch the writeback progress,
and will finally detach the writecache when the writeback
is finished.  The detach command does not need to wait
during the writeback phase, and can be canceled, in which
case the LV will remain with the writecache attached and
the cleaner option set.  When the user runs the detach
command again it will complete the detach.

To detach a writecache directly, without using the cleaner
step (which has been the approach previously), add the
option --cachesettings cleaner=0 to the detach command.
2020-10-01 11:33:02 -05:00
..
cache_manip.c cache: simplier signal handling 2020-09-14 00:15:14 +02:00
integrity_manip.c wipe: zeroing of 8 sectors is granted 2020-09-15 22:52:25 +02:00
lv_alloc.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lv_manip.c lvmlockd vdo: add support 2020-09-29 14:43:27 -05:00
lv.c writecache: show error in lv_health_status and lv_attr 2020-06-10 12:13:48 -05:00
lv.h Remove unused clvm variations for active LVs 2018-06-07 16:17:04 +01:00
merge.c vdo: extend vdo segment validation 2020-09-22 23:25:16 +02:00
metadata-exported.h writecache: use two step detach 2020-10-01 11:33:02 -05:00
metadata.c metadata: open rw fd before closing ro fd 2020-09-18 15:10:11 -05:00
metadata.h pass cmd struct through more functions 2020-04-21 10:58:05 -05:00
mirror.c wipe: convert zero_value to uint8_t 2020-09-15 22:52:25 +02:00
pool_manip.c thin: no delete message for device_id 0 2020-09-25 22:54:07 +02:00
pv_alloc.h doc: change fsf address 2016-01-21 12:11:37 +01:00
pv_list.c move pv_list code into lib 2020-04-13 10:04:14 -05:00
pv_manip.c pvresize: add missing return 2018-06-08 14:36:56 +02:00
pv_map.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
pv_map.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
pv.c lvmcache: renaming functions and variables 2019-08-16 13:26:11 -05:00
pv.h metadata: import device name hint from metadata 2019-09-30 11:38:10 -05:00
raid_manip.c Revert "lvconvert: display warning if raid1 LV image count does not change" 2020-09-28 17:14:03 +02:00
segtype.c segtype: add linear 2018-06-05 16:23:18 +02:00
segtype.h Revert "lvdisplay: dispaly correct status when underlying devs missing" 2020-08-28 13:28:15 -05:00
snapshot_manip.c writecache: allow snapshot of LV with writecache 2020-06-10 12:18:00 -05:00
takeover_matrix.h lvconvert: add infrastructure for RaidLV reshaping support 2017-02-24 05:20:58 +01:00
thin_manip.c active: fix compilation without devmapper 2020-09-29 10:43:56 +02:00
vdo_manip.c lvcreate: change error message 2020-09-15 22:52:25 +02:00
vg.c gcc: use apropriate type for reading and printing values 2020-08-28 21:43:03 +02:00
vg.h metadata: include description with command in metadata areas 2019-06-20 16:09:05 -05:00
writecache_manip.c writecache: use two step detach 2020-10-01 11:33:02 -05:00