Skip to contentSkip to conversation

master - dev-cache: skip double stat() call on each _insert

PATCH Zdenek Kabelac 1 participant 1 message Dec 12, 2013

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6c0e44d5a2e82aa160d48e83992e7ca342bc4bdf
Commit:        6c0e44d5a2e82aa160d48e83992e7ca342bc4bdf
Parent:        7c5feaed3be5c26f5782e4e891ba99862f1e968f
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Nov 25 10:01:37 2011 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Thu Dec 12 13:42:28 2013 +0100

dev-cache: skip double stat() call on each _insert

When the device is inserted in dev_name_confirmed() stat() is called twice as _insert() has it's own stat() call.

Extend _insert() parameter with struct stat* - which could be used if it has been just obtained. When NULL is passed code is doing its own stat() call as before.

---
 WHATS_NEW              |    1 +
 lib/device/dev-cache.c |   49 ++++++++++++++++++++++++++++++-----------------
 2 files changed, 32 insertions(+), 18 deletions(-)
WHATS_NEW +1 -0
index 704d0be..78657dd 100644
@@ -1,5 +1,6 @@
 Version 2.02.105 -
 =====================================
+  Optimize double call of stat() for cached devices.
   Enable support for thin provisioning for default configuration.
   Improve process_each_lv_in_vg() tag processing.
   Reodered and simplified logging code.
lib/device/dev-cache.c +31 -18

119 lines not on this page · raw message