]> sourceware.org Git - lvm2.git/commitdiff
Don't merge unchanged persistent cache file before dumping if tool scanned.
authorAlasdair Kergon <agk@redhat.com>
Tue, 1 Jun 2010 19:02:12 +0000 (19:02 +0000)
committerAlasdair Kergon <agk@redhat.com>
Tue, 1 Jun 2010 19:02:12 +0000 (19:02 +0000)
WHATS_NEW
lib/filters/filter-persistent.c

index 3d58d83cc2a649dcb18fa78772b5217c6aa89ae6..556d6c0e206fb48a28e4c827fe549a79b039e638 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.67 -
 ===============================
+  Don't merge unchanged persistent cache file before dumping if tool scanned.
   Fix incorrect memory pool deallocation while using vg_read for files.
   Add --type parameter description to the lvcreate man page.
   Replace strncmp kernel version number checks with proper ones.
index 4cb0d7db365107b8fcf9cc279fd80da6f770e0f3..6574d6983fb9c15b4fedce23149f59abc25c5f75 100644 (file)
@@ -295,6 +295,7 @@ struct dev_filter *persistent_filter_create(struct dev_filter *real,
 {
        struct pfilter *pf;
        struct dev_filter *f = NULL;
+       struct stat info;
 
        if (!(pf = dm_malloc(sizeof(*pf))))
                return_NULL;
@@ -314,6 +315,10 @@ struct dev_filter *persistent_filter_create(struct dev_filter *real,
        if (!(f = dm_malloc(sizeof(*f))))
                goto_bad;
 
+       /* Only merge cache file before dumping it if it changed externally. */
+       if (!stat(pf->file, &info))
+               pf->ctime = info.st_ctime;
+
        f->passes_filter = _lookup_p;
        f->destroy = _persistent_destroy;
        f->private = pf;
This page took 0.048985 seconds and 5 git commands to generate.