ensure LIO kernel target is also exposing this stuff for block and pscsi backstores: 1) READ CAPACITY(16) provides the block sizes and alignment offset: LOGICAL BLOCK LENGTH IN BYTES: /sys/block/<disk>/queue/physical_block_size LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT is used to derive: /sys/block/<disk>/queue/logical_block_size LOWEST ALIGNED LOGICAL BLOCK ADDRESS: /sys/block/<disk>/alignment_offset /sys/block/<disk>/<partition>/alignment_offset 2) BLOCK LIMITS VPD provides the "I/O hints": OPTIMAL TRANSFER LENGTH GRANULARITY and OPTIMAL TRANSFER LENGTH are used to derive: /sys/block/<disk>/queue/minimum_io_size /sys/block/<disk>/queue/optimal_io_size
bug 895312 may be related to this? Not sure.
*** Bug 895312 has been marked as a duplicate of this bug. ***
fix posted upstream
fix accepted upstream, likely will be in 3.13.
*** Bug 902863 has been marked as a duplicate of this bug. ***
Patch(es) available on kernel-3.10.0-99.el7
Verified using: # rpm -q targetcli targetcli-2.1.fb34-1.el7.noarch # uname -r 3.10.0-99.el7.x86_64 modprobe scsi_debug num_parts=1 sector_size=4096 lowest_aligned=7 physblk_exp=3 dev_size_mb=10 # sg_inq -p 0xb0 /dev/sdb VPD INQUIRY: Block limits page (SBC) Maximum compare and write length: 0 blocks Optimal transfer length granularity: 8 blocks Maximum transfer length: 2560 blocks Optimal transfer length: 64 blocks Maximum prefetch, xdread, xdwrite transfer length: 0 blocks Maximum unmap LBA count: 0 Maximum unmap block descriptor count: 0 Optimal unmap granularity: 1 Unmap granularity alignment valid: 0 Unmap granularity alignment: 0 # sg_inq -p 0xb0 /dev/sdc VPD INQUIRY: Block limits page (SBC) Maximum compare and write length: 0 blocks Optimal transfer length granularity: 8 blocks Maximum transfer length: 8192 blocks Optimal transfer length: 64 blocks Maximum prefetch, xdread, xdwrite transfer length: 0 blocks # cat /sys/block/sdb/queue/physical_block_size 32768 # cat /sys/block/sdc/queue/physical_block_size 32768 # cat /sys/block/sdb/queue/logical_block_size 4096 # cat /sys/block/sdc/queue/logical_block_size 4096 # cat /sys/block/sdb/sdb1/alignment_offset 28672 # cat /sys/block/sdc/sdc1/alignment_offset 28672 # cat /sys/block/sdb/alignment_offset 28672 # cat /sys/block/sdc/alignment_offset 28672 # cat /sys/block/sdb/queue/minimum_io_size 32768 # cat /sys/block/sdc/queue/minimum_io_size 32768 # cat /sys/block/sdb/queue/optimal_io_size 262144 # cat /sys/block/sdc/queue/optimal_io_size 262144
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request.