1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

label: add stack trace for failing dev_set_last_byte

Temporarily add check for failure, but whole function
needs to be likely traced for error result.

FIXME
This commit is contained in:
Zdenek Kabelac 2018-11-02 22:19:47 +01:00 committed by David Teigland
parent 7dcc884c50
commit 7ac14e3d32

View File

@ -1341,7 +1341,11 @@ void dev_set_last_byte(struct device *dev, uint64_t offset)
unsigned int phys_block_size = 0; unsigned int phys_block_size = 0;
unsigned int block_size = 0; unsigned int block_size = 0;
dev_get_block_size(dev, &phys_block_size, &block_size); if (!dev_get_block_size(dev, &phys_block_size, &block_size)) {
stack;
/* FIXME ASSERT or regular error testing is missing */
return;
}
bcache_set_last_byte(scan_bcache, dev->bcache_fd, offset, phys_block_size); bcache_set_last_byte(scan_bcache, dev->bcache_fd, offset, phys_block_size);
} }