All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix a regression in '--nosync' option for mirrored LV
@ 2008-01-18 21:44 Jun'ichi Nomura
  0 siblings, 0 replies; only message in thread
From: Jun'ichi Nomura @ 2008-01-18 21:44 UTC (permalink / raw)
  To: lvm-devel

'--nosync' option of lvcreate is for skipping initial sync
of mirrors.
The option was implemented by passing the option to
create_mirror_log() function to control the initialization.
However, the new lv_add_mirrors() API didn't have a corresponding
option. So the option doesn't work properly.

This patch fixes it by adding a new flag for lv_add_mirrors(),
MIRROR_SKIP_INIT_SYNC, to skip initial sync.

Expected behavior is:
  * Default
      "Copy %" starts from 0 on create.
      "Copy %" resumes from the last status on reactivation.
  * '--corelog' only
      "Copy %" starts from 0 on create.
      "Copy %" starts from 0 on reactivation.
  * '--nosync' only
      "Copy %" starts from 100 on create.
      "Copy %" resumes from the last status on reactivation.
  * '--corelog' + '--nosync'
      "Copy %" starts from 100 on create.
      "Copy %" starts from 0 on reactivation.

Also attached is a test script for these combinations.
(Not in a 'make check' format as the script won't work on
 loopback devices which completes synchronization too fast.)

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-lvcreate-nosync.patch
Type: text/x-patch
Size: 2638 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20080118/2fd07ed9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nosync-test.sh
Type: application/x-sh
Size: 1243 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20080118/2fd07ed9/attachment.sh>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-18 21:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-18 21:44 [PATCH] Fix a regression in '--nosync' option for mirrored LV Jun'ichi Nomura

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.