[lvm-devel] [PATCH 06/24] lv_info handle udev_sync

Milan Broz mbroz at redhat.com
Sun Jan 30 20:17:44 UTC 2011


On 01/30/2011 01:57 PM, Zdenek Kabelac wrote:

> NoteII: locking_is_clustered() is needed to detect in which context
> lv_info() is called as we cannot use sync_local_dev_names() when
> locking is not defined.

hmmmm. I probably confused you here:)

I don't think locking_is_clustered() can be used insinde clvmd
(it is "locking implementation" itself).

Or you mean it that in clvmd should run fs_unlock() and in local
code (lvm command) should run sync_local_dev_names(cmd) (with cluster locking)?

> +	/*
> +	 * 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 */
> +	}

this is really ugly...

Milan




More information about the lvm-devel mailing list