Skip to content

util: modify flbas rsvd bits to be used#164

Merged
igaw merged 1 commit intolinux-nvme:masterfrom
sc108-lee:add/flbas_to_lbaf_inuse
Jan 19, 2022
Merged

util: modify flbas rsvd bits to be used#164
igaw merged 1 commit intolinux-nvme:masterfrom
sc108-lee:add/flbas_to_lbaf_inuse

Conversation

@sc108-lee
Copy link
Copy Markdown
Contributor

flbas Bits 6:5 indicate the most significant 2 bits of
the Format Index of the supported LBA Format indicated
in this data structure that was used to format the namespace

@igaw
Copy link
Copy Markdown
Collaborator

igaw commented Jan 14, 2022

Can you please have a look at:

ninja: Entering directory `.build'
[15/27] Compiling C object src/libnvme.so.1.0.0.p/nvme_tree.c.o
../src/nvme/tree.c: In function ‘nvme_ns_init’:
../src/nvme/tree.c:1679:50: warning: passing argument 2 of ‘nvme_id_ns_flbas_to_lbaf_inuse’ from incompatible pointer type [-Wincompatible-pointer-types]
 1679 |         nvme_id_ns_flbas_to_lbaf_inuse(ns.flbas, &flbas);
      |                                                  ^~~~~~
      |                                                  |
      |                                                  int *
In file included from ../src/nvme/tree.h:21,
                 from ../src/nvme/filters.h:13,
                 from ../src/nvme/tree.c:29:
../src/nvme/util.h:367:69: note: expected ‘__u8 *’ {aka ‘unsigned char *’} but argument is of type ‘int *’
  367 | static inline void nvme_id_ns_flbas_to_lbaf_inuse(__u8 flbas, __u8 *lbaf_inuse)
      |                                                               ~~~~~~^~~~~~~~~~
[27/27] Linking target libnvme/_nvme.cpython-38-x86_64-linux-gnu.so

Thanks!

@sc108-lee sc108-lee force-pushed the add/flbas_to_lbaf_inuse branch from 0fe277f to e5f50bb Compare January 17, 2022 02:51
@sc108-lee
Copy link
Copy Markdown
Contributor Author

it was unsaved :( haha, thanks for the checking.
rebased and fixed :)

@sc108-lee sc108-lee force-pushed the add/flbas_to_lbaf_inuse branch 2 times, most recently from 458443f to 563cc59 Compare January 19, 2022 02:52
@sc108-lee
Copy link
Copy Markdown
Contributor Author

@igaw I modified the names, and masking order as you recommended :)

flbas Bits 6:5 indicate the most significant 2 bits of
the Format Index of the supported LBA Format indicated
in this data structure that was used to format the namespace

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
@igaw igaw merged commit 014c8e9 into linux-nvme:master Jan 19, 2022
@igaw
Copy link
Copy Markdown
Collaborator

igaw commented Jan 19, 2022

Thanks!

@igaw
Copy link
Copy Markdown
Collaborator

igaw commented Jan 20, 2022

@sc108-lee, could send a fix/update for nvme-cli as well?

@igaw
Copy link
Copy Markdown
Collaborator

igaw commented Jan 20, 2022

Never mind, found the PR for nvme-cli. It just needs a refresh.

@sc108-lee sc108-lee deleted the add/flbas_to_lbaf_inuse branch September 5, 2023 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants