RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 873474 - ktarget: automatically expose backstore block size in exported LUN
Summary: ktarget: automatically expose backstore block size in exported LUN
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kernel
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andy Grover
QA Contact: Bruno Goncalves
URL:
Whiteboard:
: 895312 902863 (view as bug list)
Depends On: 747510
Blocks: 732980 737672 767187
TreeView+ depends on / blocked
 
Reported: 2012-11-05 23:48 UTC by Andy Grover
Modified: 2014-06-18 05:47 UTC (History)
5 users (show)

Fixed In Version: kernel-3.10.0-99.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 747510
Environment:
Last Closed: 2014-06-13 13:10:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 1 Andy Grover 2012-11-05 23:51:50 UTC
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

Comment 2 Andy Grover 2013-01-15 19:59:36 UTC
bug 895312 may be related to this? Not sure.

Comment 3 Andy Grover 2013-10-10 23:46:03 UTC
*** Bug 895312 has been marked as a duplicate of this bug. ***

Comment 4 Andy Grover 2013-10-11 22:29:42 UTC
fix posted upstream

Comment 5 Andy Grover 2013-11-20 20:50:20 UTC
fix accepted upstream, likely will be in 3.13.

Comment 6 Andy Grover 2014-02-11 01:31:20 UTC
*** Bug 902863 has been marked as a duplicate of this bug. ***

Comment 8 Jarod Wilson 2014-03-03 13:57:35 UTC
Patch(es) available on kernel-3.10.0-99.el7

Comment 10 Bruno Goncalves 2014-03-04 16:16:08 UTC
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

Comment 12 Ludek Smid 2014-06-13 13:10:54 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.