public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: zkabelac@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/lib/activate activate.c activate.h Date: Wed, 21 Dec 2011 13:10:00 -0000 [thread overview] Message-ID: <20111221131007.18990.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-12-21 13:10:06 Modified files: lib/activate : activate.c activate.h Log message: Thin add lv_thin_pool_percent Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.225&r2=1.226 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.h.diff?cvsroot=lvm2&r1=1.89&r2=1.90 --- LVM2/lib/activate/activate.c 2011/12/21 13:08:13 1.225 +++ LVM2/lib/activate/activate.c 2011/12/21 13:10:05 1.226 @@ -689,6 +689,30 @@ return lv_mirror_percent(lv->vg->cmd, lv, 0, percent, NULL); } +/* + * Returns 1 if percent set, else 0 on failure. + */ +int lv_thin_pool_percent(const struct logical_volume *lv, percent_t *percent) +{ + int r; + struct dev_manager *dm; + + if (!activation()) + return 0; + + log_debug("Checking thin pool percent for LV %s/%s", lv->vg->name, lv->name); + + if (!(dm = dev_manager_create(lv->vg->cmd, lv->vg->name, 1))) + return_0; + + if (!(r = dev_manager_thin_pool_percent(dm, lv, percent))) + stack; + + dev_manager_destroy(dm); + + return r; +} + static int _lv_active(struct cmd_context *cmd, struct logical_volume *lv) { struct lvinfo info; --- LVM2/lib/activate/activate.h 2011/11/28 20:37:51 1.89 +++ LVM2/lib/activate/activate.h 2011/12/21 13:10:06 1.90 @@ -100,6 +100,7 @@ int lv_mirror_percent(struct cmd_context *cmd, const struct logical_volume *lv, int wait, percent_t *percent, uint32_t *event_nr); int lv_raid_percent(const struct logical_volume *lv, percent_t *percent); +int lv_thin_pool_percent(const struct logical_volume *lv, percent_t *percent); /* * Return number of LVs in the VG that are active.
next reply other threads:[~2011-12-21 13:10 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-12-21 13:10 zkabelac [this message] -- strict thread matches above, loose matches on Subject: below -- 2011-11-11 15:14 mbroz 2008-04-10 21:34 wysochanski 2004-03-26 19:52 agk 2004-03-26 15:35 agk 2004-03-08 18:54 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=20111221131007.18990.qmail@sourceware.org \ --to=zkabelac@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).