summaryrefslogtreecommitdiff
path: root/scripts/livepatch
diff options
context:
space:
mode:
authorHungyu Lin <dennylin0707@gmail.com>2026-10-23 15:36:45 +0000
committerJens Axboe <axboe@kernel.dk>2026-11-03 07:07:13 -0700
commit57cd1a08717690e5ea01d7ac7a96bb33a2dca117 (patch)
tree40eda92c1da514b7520cc2d01320ccadd59d3ba8 /scripts/livepatch
parent6c6dec7883f8eb10b326bc9d109a4990c885d949 (diff)
block: Return the soft block size for compat BLKBSZGET
BLKBSZGET returns the block device's soft block size, while BLKSSZGET returns its logical sector size. The compat BLKBSZGET_32 handler uses bdev_logical_block_size(), so it returns the wrong value when these sizes differ. For example, on an x86_64 kernel a native query of a RAM or loop device with 512-byte logical sectors returns the initial soft block size of 4096 bytes, but an i386 process gets 512 bytes. This makes 32-bit blockdev --getbsz and the BSZ column of --report disagree with native queries, even without a preceding BLKBSZSET. Use block_size() as the native handler and the pre-regression compat handler do, and correct the case comment to describe the soft size. Fixes: 9b81648cb5e3 ("compat_ioctl: simplify up block/ioctl.c") Cc: stable@vger.kernel.org Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20261023153645.37546-1-dennylin0707@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/livepatch')
0 files changed, 0 insertions, 0 deletions