mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
device: if BLKPBSZGET is unavailable, enforce 512
If there is no define for BLKPBSZGET - we have hard time how to decrypt physical block size - we can't use here block_size, since this is usually 4k while we need to use 512b. FIXME: find some better way, until that enforce value 512. Eventually we could also try to put in: +#ifndef BLKPBSZGET +# define BLKPBSZGET _IO(0x12,123) +#endif but this will still not work well on old kernels.
This commit is contained in:
parent
434d95cef3
commit
3c818c8946
@ -157,7 +157,8 @@ int dev_get_block_size(struct device *dev, unsigned int *physical_block_size, un
|
||||
}
|
||||
#else
|
||||
/* if we can't get physical block size, just use logical block size instead */
|
||||
dev->phys_block_size = dev->block_size;
|
||||
// FIXME block_size is typically 4096b while phys_block_size is 512b
|
||||
dev->phys_block_size = 512;// dev->block_size;
|
||||
log_debug_devs("%s: physical block size can't be determined, using logical "
|
||||
"block size of %u bytes instead", name, dev->phys_block_size);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user