mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-26 14:04:15 +03:00
Add some stack traces for dev_close error paths
This commit is contained in:
parent
535fbc2256
commit
fdc31c7a8a
@ -179,7 +179,8 @@ static int _passes_lvm_type_device_filter(struct dev_filter *f __attribute__((un
|
||||
ret = 1;
|
||||
|
||||
out:
|
||||
dev_close(dev);
|
||||
if (!dev_close(dev))
|
||||
stack;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -1357,8 +1357,10 @@ static int _text_pv_write(const struct format_type *fmt, struct physical_volume
|
||||
return_0;
|
||||
|
||||
if (!label_write(pv->dev, label)) {
|
||||
dev_close(pv->dev);
|
||||
return_0;
|
||||
stack;
|
||||
if (!dev_close(pv->dev))
|
||||
stack;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1460,10 +1460,12 @@ static int _pvcreate_write(struct cmd_context *cmd, struct pv_to_create *pvc)
|
||||
|
||||
if (!dev_set(dev, UINT64_C(0), (size_t) 2048, 0)) {
|
||||
log_error("%s not wiped: aborting", pv_name);
|
||||
dev_close(dev);
|
||||
if (!dev_close(dev))
|
||||
stack;
|
||||
return 0;
|
||||
}
|
||||
dev_close(dev);
|
||||
if (!dev_close(dev))
|
||||
stack;
|
||||
}
|
||||
|
||||
log_error("Writing physical volume data to disk \"%s\"",
|
||||
|
Loading…
x
Reference in New Issue
Block a user