mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Not detecing label on disc is not error, remove <backtrace> from debug log
and report it only if device cannot be read.
This commit is contained in:
parent
8695f2cecb
commit
2380eaf981
@ -119,7 +119,7 @@ static struct labeller *_find_labeller(struct device *dev, char *buf,
|
|||||||
if (!dev_read(dev, scan_sector << SECTOR_SHIFT,
|
if (!dev_read(dev, scan_sector << SECTOR_SHIFT,
|
||||||
LABEL_SCAN_SIZE, readbuf)) {
|
LABEL_SCAN_SIZE, readbuf)) {
|
||||||
log_debug("%s: Failed to read label area", dev_name(dev));
|
log_debug("%s: Failed to read label area", dev_name(dev));
|
||||||
goto out;
|
goto_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Scan a few sectors for a valid label */
|
/* Scan a few sectors for a valid label */
|
||||||
@ -284,7 +284,7 @@ int label_read(struct device *dev, struct label **result,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(l = _find_labeller(dev, buf, §or, scan_sector)))
|
if (!(l = _find_labeller(dev, buf, §or, scan_sector)))
|
||||||
goto_out;
|
goto out;
|
||||||
|
|
||||||
if ((r = (l->ops->read)(l, dev, buf, result)) && result && *result)
|
if ((r = (l->ops->read)(l, dev, buf, result)) && result && *result)
|
||||||
(*result)->sector = sector;
|
(*result)->sector = sector;
|
||||||
@ -361,7 +361,7 @@ int label_verify(struct device *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(l = _find_labeller(dev, buf, §or, UINT64_C(0))))
|
if (!(l = _find_labeller(dev, buf, §or, UINT64_C(0))))
|
||||||
goto_out;
|
goto out;
|
||||||
|
|
||||||
r = l->ops->verify ? l->ops->verify(l, buf, sector) : 1;
|
r = l->ops->verify ? l->ops->verify(l, buf, sector) : 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user