]> sourceware.org Git - lvm2.git/commit
udev_sync: cookie_set=1 on each dm_task_set_cookie call
authorPeter Rajnoha <prajnoha@redhat.com>
Tue, 23 Oct 2012 09:40:53 +0000 (11:40 +0200)
committerPeter Rajnoha <prajnoha@redhat.com>
Tue, 23 Oct 2012 11:23:35 +0000 (13:23 +0200)
commita820a68619c10108666f8093545837233c954046
tree228558386403e8ca722221b2644b10c915b635ea
parentfc849a9eebecf77c75d016fad2b83fd3b2950474
udev_sync: cookie_set=1 on each dm_task_set_cookie call

cookie_set variable found in the struct dm_task should be always
set to 1 after dm_task_set_cookie_call, even if udev_sync is disabled
as the cookie itself carries synchronization informations *as well as*
extra flags to control other aspects of udev support.

For example, one could disable the synchronization itself, but still
direct the libdm code to disable library fallback via
DM_UDEV_DISABLE_LIBRARY_FALLBACK flag. These extra flags still need
to be carried out!

A concrete example:
  $ dmsetup create test --table "0 1 zero" --noudevsync

This disables synchronization with udev. As the --verifyudev option is
not used, we don't want to do any corrections. In other words, we
need DM_UDEV_DISABLE_LIBRARY_FALLBACK flag to be used. However,
with --noudevsync this was not the case - the flag was ignored!

This patch fixes the case when noudevsync is used but there are still
some extra flags passed within the cookie flag part. The synchronization
part of the cookie stays zero (which is ok as dm_udev_wait call on such a
cookie is simply a NOOP).
WHATS_NEW_DM
libdm/libdm-common.c
This page took 0.037511 seconds and 5 git commands to generate.