diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2011-01-10 14:02:30 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2011-01-10 14:02:30 +0000 |
commit | 937a21f0d23edbc47fb618a86339cd35006e801f (patch) | |
tree | c23ee8a28a17d968cfa32f50835af69fcaa0f19e /lib/locking/file_locking.c | |
parent | f6fdfd56e408e81a8f035beba92fa59f2986b453 (diff) | |
download | lvm2-937a21f0d23edbc47fb618a86339cd35006e801f.tar.gz lvm2-937a21f0d23edbc47fb618a86339cd35006e801f.tar.xz lvm2-937a21f0d23edbc47fb618a86339cd35006e801f.zip |
Speedup consequent activation calls
Stop calling fs_unlock() from lv_de/activate().
Start using internal lvm fs cookie for dm_tree.
Stop directly calling dm_udev_wait() and
dm_tree_set/get_cookie() from activate code -
it's now called through fs_unlock() function.
Add lvm_do_fs_unlock()
Call fs_unlock() when unlocking vg where implicit unlock solves the
problem also for cluster - thus no extra command for clustering
environment is required - only lvm_do_fs_unlock() function is added
to call lvm's fs_unlock() while holding lvm_lock mutex in clvmd.
Add fs_unlock() also to set_lv() so the command waits until devices
are ready for regular open (i.e. wiping its begining).
Move fs_unlock() prototype to activation.h to keep fs.h private
in lib/activate dir and not expose other functions from this header.
Diffstat (limited to 'lib/locking/file_locking.c')
-rw-r--r-- | lib/locking/file_locking.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/locking/file_locking.c b/lib/locking/file_locking.c index d74bfd18..434bd92b 100644 --- a/lib/locking/file_locking.c +++ b/lib/locking/file_locking.c @@ -215,6 +215,7 @@ static int _lock_file(const char *file, uint32_t flags) state = 'W'; break; case LCK_UNLOCK: + fs_unlock(); /* Wait until devices are available */ return _release_lock(file, 1); default: log_error("Unrecognised lock type: %d", flags & LCK_TYPE_MASK); |