1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-31 14:50:37 +03:00

locking: trace errors from dir creation

This commit is contained in:
Zdenek Kabelac 2016-06-16 11:54:24 +02:00
parent dc8c5c1886
commit fa69ed0bc8
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.158 -
=================================
Log system error when locking dir cannot be accessed.
Preserve monitoring status when updating thin-pool metadata.
Rerurn 0 (inactive) when status cannot be queried in _lv_active().
Switch to log_warn() for failing activation status query.

View File

@ -158,11 +158,13 @@ int init_file_locking(struct locking_type *locking, struct cmd_context *cmd,
(void) dm_prepare_selinux_context(NULL, 0);
if (!r)
return 0;
return_0;
/* Trap a read-only file system */
if ((access(_lock_dir, R_OK | W_OK | X_OK) == -1) && (errno == EROFS))
if ((access(_lock_dir, R_OK | W_OK | X_OK) == -1) && (errno == EROFS)) {
log_sys_error("access", _lock_dir);
return 0;
}
return 1;
}