static int _readonly_lock_resource(struct cmd_context *cmd, const char *resource, uint32_t flags) { if ((flags & LCK_TYPE_MASK) == LCK_WRITE && (flags & LCK_SCOPE_MASK) == LCK_VG && !(flags & LCK_CACHE) && strcmp(resource, VG_GLOBAL)) { log_error("Write locks are prohibited with --ignorelockingfailure."); return 0; } return _no_lock_resource(cmd, resource, flags); }
static int _readonly_lock_resource(struct cmd_context *cmd, const char *resource, uint32_t flags, struct logical_volume *lv) { if ((flags & LCK_TYPE_MASK) == LCK_WRITE && (flags & LCK_SCOPE_MASK) == LCK_VG && !(flags & LCK_CACHE) && strcmp(resource, VG_GLOBAL)) { log_error("Read-only locking type set. " "Write locks are prohibited."); return 0; } return _no_lock_resource(cmd, resource, flags, lv); }