Skip to content

Commit 5084885

Browse files
dwsuseigaw
authored andcommitted
tree: use logical block size for lba
The kernel export the LBA size via the logical_block_size sysfs entry not the physical_block_size. Fixes: 7959f52 ("tree: read all attributes from sysfs when available") Signed-off-by: Daniel Wagner <[email protected]>
1 parent 53e3a65 commit 5084885

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/nvme/tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2437,7 +2437,7 @@ static int nvme_ns_init(const char *path, struct nvme_ns *ns)
24372437
struct sysfs_attr_table base[] = {
24382438
{ &ns->nsid, nvme_strtou32, true, "nsid" },
24392439
{ &ns->lba_count, nvme_strtou64, true, "size" },
2440-
{ &ns->lba_size, nvme_strtou64, true, "queue/physical_block_size" },
2440+
{ &ns->lba_size, nvme_strtou64, true, "queue/logical_block_size" },
24412441
{ ns->eui64, nvme_strtoeuid, false, "eui" },
24422442
{ ns->nguid, nvme_strtouuid, false, "nguid" },
24432443
{ ns->uuid, nvme_strtouuid, false, "uuid" }

0 commit comments

Comments
 (0)