public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: agk@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2 ./WHATS_NEW tools/lvconvert.c Date: Mon, 14 Jan 2008 21:11:00 -0000 [thread overview] Message-ID: <20080114211147.9451.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2008-01-14 21:11:47 Modified files: . : WHATS_NEW tools : lvconvert.c Log message: lvconvert waits for initial completion by default Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.758&r2=1.759 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.53&r2=1.54 --- LVM2/WHATS_NEW 2008/01/11 07:02:34 1.758 +++ LVM2/WHATS_NEW 2008/01/14 21:11:47 1.759 @@ -1,5 +1,6 @@ Version 2.02.30 - =================================== + lvconvert waits for completion of initial sync by default. Refactor vgcreate for parameter validation and add tests. Add new convert_lv field to lvs output. Print warning when lvm tools are running as non-root. --- LVM2/tools/lvconvert.c 2008/01/10 18:35:51 1.53 +++ LVM2/tools/lvconvert.c 2008/01/14 21:11:47 1.54 @@ -24,7 +24,8 @@ const char *lv_name; const char *lv_name_full; const char *vg_name; - int wait_daemon; + int wait_completion; + int need_polling; uint32_t chunk_size; uint32_t region_size; @@ -116,6 +117,9 @@ return 0; } + if (!arg_count(cmd, background_ARG)) + lp->wait_completion = 1; + if (arg_count(cmd, snapshot_ARG)) lp->snapshot = 1; @@ -374,7 +378,7 @@ /* If called with no argument, try collapsing the resync layers */ if (!arg_count(cmd, mirrors_ARG) && !arg_count(cmd, mirrorlog_ARG) && !arg_count(cmd, corelog_ARG)) { - lp->wait_daemon = 1; + lp->need_polling = 1; return 1; } @@ -476,6 +480,8 @@ corelog ? 0U : 1U, lp->pvh, lp->alloc, MIRROR_BY_LV)) return_0; + if (lp->wait_completion) + lp->need_polling = 1; goto commit_changes; } @@ -549,7 +555,7 @@ MIRROR_BY_LV)) return_0; lv->status |= CONVERTING; - lp->wait_daemon = 1; + lp->need_polling = 1; } else { /* Reduce number of mirrors */ if (!lv_remove_mirrors(cmd, lv, existing_mirrors - lp->mirrors, @@ -584,7 +590,7 @@ return 0; } - if (!lp->wait_daemon) + if (!lp->need_polling) log_print("Logical volume %s converted.", lv->name); return 1; @@ -740,13 +746,13 @@ error: unlock_vg(cmd, lp.vg_name); - if (ret == ECMD_PROCESSED && lp.wait_daemon) { + if (ret == ECMD_PROCESSED && lp.need_polling) { if (!lv_info(cmd, lvl->lv, &info, 1, 0) || !info.exists) { log_print("Conversion starts after activation"); return ret; } ret = lvconvert_poll(cmd, lp.lv_name_full, - arg_count(cmd, background_ARG) ? 1U : 0); + lp.wait_completion ? 0 : 1U); } return ret;
next reply other threads:[~2008-01-14 21:11 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-01-14 21:11 agk [this message] -- strict thread matches above, loose matches on Subject: below -- 2012-03-30 8:58 prajnoha 2012-02-22 17:18 jbrassow 2011-06-01 12:24 prajnoha 2011-01-05 23:18 jbrassow 2011-01-05 20:02 jbrassow 2010-07-30 17:50 taka 2010-07-06 17:02 jbrassow 2010-04-26 18:32 agk 2010-02-05 21:49 jbrassow 2009-10-23 1:24 agk 2009-06-26 9:04 agk 2009-06-15 13:43 mbroz 2009-06-15 12:09 mbroz 2008-06-26 21:38 agk 2008-04-18 12:50 agk 2008-02-12 13:29 agk 2008-02-12 13:26 agk 2007-08-22 20:03 agk 2007-08-22 19:32 agk 2007-08-10 13:33 wysochanski 2005-08-15 14:10 agk
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080114211147.9451.qmail@sourceware.org \ --to=agk@sourceware.org \ --cc=lvm-devel@redhat.com \ --cc=lvm2-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).