[PATCH] nvmet: make 'tsas' attribute idempotent for RDMA
Christoph Hellwig
hch at lst.de
Fri Jun 14 09:49:29 PDT 2024
> + if (port->disc_addr.trtype == NVMF_TRTYPE_RDMA) {
> + for (i = 0; i < ARRAY_SIZE(nvmet_addr_tsas_rdma); i++) {
> + u8 qptype;
> +
> + if (sysfs_streq(page, nvmet_addr_tsas_rdma[i].name)) {
> + qptype = nvmet_addr_tsas_rdma[i].type;
> + if (qptype == port->disc_addr.tsas.rdma.qptype)
> + return count;
> + }
> + }
> + }
> if (port->disc_addr.trtype != NVMF_TRTYPE_TCP)
> return -EINVAL;
Sounds like this should switch on the transport types and have helpers
for each.
More information about the Linux-nvme
mailing list