mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
writecache: check if cachevol is writable
before trying to initialize it (since wipe_lv does not return an error if it fails to write.)
This commit is contained in:
parent
892a182975
commit
cba06012ac
@ -5351,6 +5351,11 @@ static int _writecache_zero(struct cmd_context *cmd, struct logical_volume *lv)
|
||||
};
|
||||
int ret;
|
||||
|
||||
if (!(lv->status & LVM_WRITE)) {
|
||||
log_error("Cannot initialize readonly LV %s", display_lvname(lv));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (test_mode())
|
||||
return 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user