Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types: Define NS_FLBAS MASK and SHIFT to use NVME_GET #662

Merged
merged 2 commits into from
Sep 22, 2023

Conversation

ikegami-t
Copy link
Contributor

No description provided.

@ikegami-t
Copy link
Contributor Author

Changes for the issue #148 .

@ikegami-t
Copy link
Contributor Author

Rebased and fixed the NVME_NS_FLBAS_META_EXT macro definition.

src/nvme/types.h Outdated
};

#define NVME_NS_FLBAS_LOWER(flbas) NVME_GET(flbas, NS_FLBAS_LOWER)
#define NVME_NS_FLBAS_META_EXT(flbas) NVME_GET(flbas, NS_FLBAS_META_EXT)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change of NVME_NS_FLBAS_META_EXT from a simple define to a macro will break existing users. While for nvme-cli that might be okay as we have to update the minimum dependency to libnvme anyway, it's not so easy to tell about other users. I am aware of that the udisk and nvme-stats project is using libnvme but not this define.

So what we can do is merge it but if someone complains we are reverting it. What do you think?

@igaw
Copy link
Collaborator

igaw commented Sep 20, 2023

BTW, the build fails due to kdoc test failing:

src/nvme/types.h:1880: warning: Enum value 'NVME_NS_FLBAS_LOWER_SHIFT' not described in enum 'nvme_id_ns_flbas'
src/nvme/types.h:1880: warning: Enum value 'NVME_NS_FLBAS_META_EXT_SHIFT' not described in enum 'nvme_id_ns_flbas'
src/nvme/types.h:1880: warning: Enum value 'NVME_NS_FLBAS_HIGHER_SHIFT' not described in enum 'nvme_id_ns_flbas'

@ikegami-t
Copy link
Contributor Author

Thanks for your review comments. Changed the patch to remain existing macro definitions and add also additional macro definitions for a simple macro define.

@igaw
Copy link
Collaborator

igaw commented Sep 21, 2023

It looks like kdoc is not able to figure out that it should ignore the right handside of the enum definition. I couldn't figure out how fix address this.

@ikegami-t
Copy link
Contributor Author

Sorry for the kernel-doc warnings. Fixed as remaining the original definitions.

@igaw
Copy link
Collaborator

igaw commented Sep 22, 2023

No problem. It seems that this version also avoids breakage. Nice.

@igaw igaw merged commit 3edef73 into linux-nvme:master Sep 22, 2023
13 checks passed
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