From: Daniel Wagner Date: Fri, 19 Jan 2024 12:07:42 +0000 (+0100) Subject: tree: use logical block size for lba X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=50848852008ffa7fb74ed536cb259023dd8653d9;p=users%2Fsagi%2Flibnvme.git 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: 7959f52960fd ("tree: read all attributes from sysfs when available") Signed-off-by: Daniel Wagner --- diff --git a/src/nvme/tree.c b/src/nvme/tree.c index 97bd3ef4..4d588454 100644 --- a/src/nvme/tree.c +++ b/src/nvme/tree.c @@ -2437,7 +2437,7 @@ static int nvme_ns_init(const char *path, struct nvme_ns *ns) struct sysfs_attr_table base[] = { { &ns->nsid, nvme_strtou32, true, "nsid" }, { &ns->lba_count, nvme_strtou64, true, "size" }, - { &ns->lba_size, nvme_strtou64, true, "queue/physical_block_size" }, + { &ns->lba_size, nvme_strtou64, true, "queue/logical_block_size" }, { ns->eui64, nvme_strtoeuid, false, "eui" }, { ns->nguid, nvme_strtouuid, false, "nguid" }, { ns->uuid, nvme_strtouuid, false, "uuid" }