mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
cov: add missing error path check for label_scan_open
This commit is contained in:
parent
b57e73a0f1
commit
84f00f5058
@ -1067,7 +1067,11 @@ int label_read_sector(struct device *dev, uint64_t read_sector)
|
|||||||
block_sector = block_num * BCACHE_BLOCK_SIZE_IN_SECTORS;
|
block_sector = block_num * BCACHE_BLOCK_SIZE_IN_SECTORS;
|
||||||
start_sector = read_sector % BCACHE_BLOCK_SIZE_IN_SECTORS;
|
start_sector = read_sector % BCACHE_BLOCK_SIZE_IN_SECTORS;
|
||||||
|
|
||||||
label_scan_open(dev);
|
if (!label_scan_open(dev)) {
|
||||||
|
log_error("Error opening device %s for prefetch %llu sector.",
|
||||||
|
dev_name(dev), (unsigned long long)block_num);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bcache_prefetch(scan_bcache, dev->bcache_fd, block_num);
|
bcache_prefetch(scan_bcache, dev->bcache_fd, block_num);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user