public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/lib/activate activate.c fs.c fs.h
@ 2011-02-03 1:16 zkabelac
0 siblings, 0 replies; only message in thread
From: zkabelac @ 2011-02-03 1:16 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-03 1:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-03 1:16 LVM2/lib/activate activate.c fs.c fs.h zkabelac
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).