1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00
lvm2/tools
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
..
.exported_symbols generate liblvm2cmd exported symbols too 2010-06-25 18:23:10 +00:00
.gitignore tools: add generated headers to .gitignore 2017-03-10 13:13:41 +00:00
args.h lvcreate: new cache or writecache lv with single command 2020-06-16 13:46:51 -05:00
cmdnames.h doc: change fsf address 2016-01-21 12:11:37 +01:00
command-lines.in writecache: use two step detach 2020-10-01 11:33:02 -05:00
command.c cov: explicitely ignore function result 2020-09-01 17:57:50 +02:00
command.h fix command definition for pvchange -a 2019-06-10 13:43:20 -05:00
commands.h lvpoll: don't use hints 2020-09-28 13:25:57 -05:00
dumpconfig.c lvmconfig: Add options to produce file preamble 2017-08-05 16:23:34 +01:00
errors.h tools: Introduce exit code EINIT_FAILED. 2017-07-26 23:18:03 +01:00
formats.c doc: change fsf address 2016-01-21 12:11:37 +01:00
license.inc pre-release 2017-03-28 16:11:35 +01:00
lv_props.h Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
lv_types.h Allow dm-integrity to be used for raid images 2020-04-15 12:10:32 -05:00
lvchange.c writecache: add settings cleaner and max_age 2020-06-10 12:15:50 -05:00
lvconvert_poll.c lvconvert_poll: ensure LV has snapshot type 2020-09-11 21:47:34 +02:00
lvconvert_poll.h build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvconvert.c writecache: use two step detach 2020-10-01 11:33:02 -05:00
lvcreate.c cleanup: user force_t enums instead of ints 2020-09-01 17:57:50 +02:00
lvdisplay.c process_each_lv: add check_single_lv function 2017-02-13 08:20:10 -06:00
lvextend.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm2cmd-static.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvm2cmd.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvm2cmd.h tools: Introduce exit code EINIT_FAILED. 2017-07-26 23:18:03 +01:00
lvm2cmdline.h commands: fix memory debug for cmd defs 2017-05-01 15:27:14 -05:00
lvm-static.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm.c lvm: add readline alternative editline 2020-09-29 10:13:24 +02:00
lvmcmdlib.c headers: remove unused headers 2020-09-14 00:15:14 +02:00
lvmcmdline.c lvm: add readline alternative editline 2020-09-29 10:13:24 +02:00
lvmdiskscan.c remove unused full filter 2018-12-04 14:06:46 -06:00
lvpoll.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
lvreduce.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvremove.c process_each_lv: add check_single_lv function 2017-02-13 08:20:10 -06:00
lvrename.c toollib: make it possible to also process internal VGs, add 'include_internal' switch to process_each_vg fn 2016-06-20 11:33:42 +02:00
lvresize.c lvextend: refresh shared LV remotely using dlm/corosync 2019-03-21 12:38:20 -05:00
lvscan.c Remove lvmetad 2018-07-11 11:26:42 -05:00
Makefile.in lvm: add readline alternative editline 2020-09-29 10:13:24 +02:00
polldaemon.c improve reading and repairing vg metadata 2019-06-07 15:54:04 -05:00
pvchange.c lvmcache: renaming functions and variables 2019-08-16 13:26:11 -05:00
pvck.c pvck: repair should clear hints 2020-09-02 14:21:17 -05:00
pvcreate.c move the setting of use_full_md_check flag 2019-05-21 11:51:58 -05:00
pvdisplay.c add device hints to reduce scanning 2019-01-15 10:23:47 -06:00
pvmove_poll.c pvmove: add missing synchronization 2019-08-20 12:44:39 +02:00
pvmove_poll.h doc: change fsf address 2016-01-21 12:11:37 +01:00
pvmove.c pvmove: check return value of top_level_lv_name() 2020-09-11 21:43:08 +02:00
pvremove.c pvcreate: call label scan prior to pvcreate_each_device 2019-04-30 14:10:27 -05:00
pvresize.c exported vg handling 2019-06-25 15:39:08 -05:00
pvscan.c pass cmd struct through more functions 2020-04-21 10:58:05 -05:00
reporter.c cleanup: matching declaration order 2020-09-01 17:57:50 +02:00
segtypes.c doc: change fsf address 2016-01-21 12:11:37 +01:00
stub.h Remove vgconvert 2018-06-13 14:14:03 -05:00
tags.c doc: change fsf address 2016-01-21 12:11:37 +01:00
tool.h configure: avoid repeative inclusion of configure.h 2018-12-21 19:19:50 +01:00
toollib.c pvcreate/pvremove: reimplement device checks 2020-10-01 10:09:09 -05:00
toollib.h writecache: cachesettings in lvchange and lvs 2020-06-10 12:14:00 -05:00
tools.h integrity: always default to journal mode 2020-09-01 17:12:28 -05:00
vals.h Revert "pvck: dump headers_only to skip metadata text" 2020-05-29 13:26:43 -05:00
vgcfgbackup.c improve reading and repairing vg metadata 2019-06-07 15:54:04 -05:00
vgcfgrestore.c locking: unify global lock for flock and lockd 2019-04-29 13:01:05 -05:00
vgchange.c cov: check for deactivation failure 2020-05-20 15:55:39 +02:00
vgck.c vgck: fix updatemetadata writing different descriptions 2019-10-11 12:57:32 -05:00
vgcreate.c vgcreate/vgextend: restrict PVs with mixed block sizes 2019-08-01 10:06:47 -05:00
vgdisplay.c tidy: Add missing underscores to statics. 2017-10-18 15:58:13 +01:00
vgexport.c lvmlockd: primarily use vg_is_shared 2018-06-01 13:15:22 -05:00
vgextend.c cleanup: add spaces between literals 2020-09-01 17:57:50 +02:00
vgimport.c exported vg handling 2019-06-25 15:39:08 -05:00
vgimportclone.c use refresh_filters only where needed 2020-04-22 14:08:54 -05:00
vgmerge.c remove vg_read_error 2020-04-24 11:14:29 -05:00
vgmknodes.c process_each_lv: add check_single_lv function 2017-02-13 08:20:10 -06:00
vgreduce.c add suggestion message for mirror LVs 2020-01-15 09:46:54 -06:00
vgremove.c exported vg handling 2019-06-25 15:39:08 -05:00
vgrename.c vgrename: fix error value when name exists 2020-04-21 09:33:56 -05:00
vgscan.c locking: unify global lock for flock and lockd 2019-04-29 13:01:05 -05:00
vgsplit.c vgsplit: support for VDO volumes 2020-09-25 22:51:50 +02:00