]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
common/rc: Add _sysfs_queue_path helper with partition support
authorOjaswin Mujoo <ojaswin@linux.ibm.com>
Fri, 10 Apr 2026 06:36:02 +0000 (12:06 +0530)
committerZorro Lang <zlang@kernel.org>
Mon, 13 Apr 2026 17:42:41 +0000 (01:42 +0800)
commit2c002c3a86c03155e6129fea77c1b2c29a43b18a
treeb3b4e871b9dba098e5ee22c92c05cc30a88fd029
parentea4d04e7b6766118bbf0cbe596de2e41a325119c
common/rc: Add _sysfs_queue_path helper with partition support

Add a generic helper function to get the sysfs queue path for block
devices, properly handling partitions. Partitions don't have their own
queue directory in sysfs - they inherit from their parent device.

This helper checks if a device is a partition and returns the parent
device's queue path accordingly, making it easier to access queue
attributes for both whole disks and partitions.

Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/rc