1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 18:55:19 +03:00
lvm2/lib
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
..
activate debug: update debug message 2020-09-29 10:43:56 +02:00
cache tests: add case for metadata checksum differences 2020-09-28 13:25:57 -05:00
cache_segtype cachevol: move flag setting after taking archive 2019-10-17 13:03:50 +02:00
commands hints: free hint structs on exit 2020-05-13 17:20:16 -05:00
config config: drop reading file with mmap 2020-08-28 21:43:02 +02:00
datastruct build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
device debug: remove stacktrace on regular path 2020-09-29 10:43:56 +02:00
display thin: use lv_status_thin and lv_status_thin_pool 2020-09-29 10:43:56 +02:00
error device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
filters devs: rename dev_is_md dev_is_md_component 2019-05-21 11:44:39 -05:00
format_text gcc: zero-sized array to fexlible array C99 2020-09-01 17:57:50 +02:00
freeseg device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
integrity Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
label scanning: keep open an lvm device with scanning problem 2020-09-28 13:25:57 -05:00
locking lvmlockd vdo: add support 2020-09-29 14:43:27 -05:00
log logging: remove unused code 2019-02-28 10:30:54 -06:00
lvmpolld device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
metadata writecache: use two step detach 2020-10-01 11:33:02 -05:00
mirror pvmove: remove some cmirror related code 2019-10-11 11:31:42 -05:00
misc Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
mm lvm: add readline alternative editline 2020-09-29 10:13:24 +02:00
notify build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
properties build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
raid active: fix compilation without devmapper 2020-09-29 10:43:56 +02:00
report thin: use lv_status_thin and lv_status_thin_pool 2020-09-29 10:43:56 +02:00
snapshot Merge branch '2018-06-04-data-structs' 2018-06-08 14:21:07 +01:00
striped device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
thin thin: remove unneeded code test 2020-09-29 10:43:56 +02:00
unknown device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
uuid build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
vdo vdo: allow passing renamed vdopool name to kernel 2020-09-23 13:20:28 +02:00
writecache writecache: use two step detach 2020-10-01 11:33:02 -05:00
zero device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
Makefile.in Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00