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 fs.c fs.h Date: Thu, 03 Feb 2011 01:16:00 -0000 [thread overview] Message-ID: <20110203011636.13491.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-02-03 01:16:35 Modified files: lib/activate : activate.c fs.c fs.h Log message: Synchronize with udev for lv_info In case the open_count is requested via lv_info - check if there are any udev operations in-progress - and wait for them before checking for lv_info Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/activate.c.diff?cvsroot=lvm2&r1=1.186&r2=1.187 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/fs.c.diff?cvsroot=lvm2&r1=1.56&r2=1.57 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/fs.h.diff?cvsroot=lvm2&r1=1.16&r2=1.17 --- LVM2/lib/activate/activate.c 2011/01/13 14:51:33 1.186 +++ LVM2/lib/activate/activate.c 2011/02/03 01:16:35 1.187 @@ -460,6 +460,18 @@ if (!activation()) return 0; + /* + * If open_count info is requested and we have to be sure our own udev + * transactions are finished + * For non-clustered locking type we are only interested for non-delete operation + * in progress - as only those could lead to opened files + */ + if (with_open_count) { + if (locking_is_clustered()) + sync_local_dev_names(cmd); /* Wait to have udev in sync */ + else if (fs_has_non_delete_ops()) + fs_unlock(); /* For non clustered - wait if there are non-delete ops */ + } if (!dev_manager_info(lv->vg->cmd->mem, lv, origin_only ? "real" : NULL, with_open_count, with_read_ahead, &dminfo, &info->read_ahead)) --- LVM2/lib/activate/fs.c 2011/01/12 20:42:50 1.56 +++ LVM2/lib/activate/fs.c 2011/02/03 01:16:35 1.57 @@ -422,3 +422,8 @@ { _fs_cookie = cookie; } + +int fs_has_non_delete_ops(void) +{ + return _other_fs_ops(FS_DEL); +} --- LVM2/lib/activate/fs.h 2011/01/10 14:02:31 1.16 +++ LVM2/lib/activate/fs.h 2011/02/03 01:16:35 1.17 @@ -32,5 +32,6 @@ /* void fs_unlock(void); moved to activate.h */ uint32_t fs_get_cookie(void); void fs_set_cookie(uint32_t cookie); +int fs_has_non_delete_ops(void); #endif
reply other threads:[~2011-02-03 1:16 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20110203011636.13491.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).