1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

Fix loading of persistent cache if cache_dir is used. (2.02.23)

Move lstat warning in _compare_paths to verbose output only.
This commit is contained in:
Milan Broz 2007-07-23 10:45:49 +00:00
parent 622703467c
commit 8a0de6c333
3 changed files with 8 additions and 3 deletions

View File

@ -1,4 +1,6 @@
Version 2.02.28 - Version 2.02.28 -
================================
Fix loading of persistent cache if cache_dir is used. (2.02.23)
Eliminate uses of strdup+basename. Use last_path_component instead. Eliminate uses of strdup+basename. Use last_path_component instead.
Use gcc's printf attribute wherever possible. Use gcc's printf attribute wherever possible.
In _line_append, use "sizeof buf - 1" rather than equivalent "4095" In _line_append, use "sizeof buf - 1" rather than equivalent "4095"

View File

@ -611,7 +611,10 @@ static int _init_filters(struct cmd_context *cmd, unsigned load_persistent_cache
return 0; return 0;
} }
if (!(f4 = persistent_filter_create(f3, dev_cache ? : cache_file))) { if (!dev_cache)
dev_cache = cache_file;
if (!(f4 = persistent_filter_create(f3, dev_cache))) {
log_error("Failed to create persistent device filter"); log_error("Failed to create persistent device filter");
return 0; return 0;
} }

View File

@ -205,11 +205,11 @@ static int _compare_paths(const char *path0, const char *path1)
*s1 = '\0'; *s1 = '\0';
} }
if (lstat(p0, &stat0)) { if (lstat(p0, &stat0)) {
log_sys_error("lstat", p0); log_sys_very_verbose("lstat", p0);
return 1; return 1;
} }
if (lstat(p1, &stat1)) { if (lstat(p1, &stat1)) {
log_sys_error("lstat", p1); log_sys_very_verbose("lstat", p1);
return 0; return 0;
} }
if (S_ISLNK(stat0.st_mode) && !S_ISLNK(stat1.st_mode)) if (S_ISLNK(stat0.st_mode) && !S_ISLNK(stat1.st_mode))