Re: [PATCH 3/8] block: add new genhd flag GENHD_FL_NVMEM

From: Bart Van Assche
Date: Fri Mar 22 2024 - 13:50:19 EST


On 3/21/24 12:33, Daniel Golle wrote:
Add new flag to destinguish block devices which may act as an NVMEM
provider.

Signed-off-by: Daniel Golle <daniel@xxxxxxxxxxxxxx>
---
include/linux/blkdev.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index c3e8f7cf96be9..f2c4f280d7619 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -81,11 +81,13 @@ struct partition_meta_info {
* ``GENHD_FL_NO_PART``: partition support is disabled. The kernel will not
* scan for partitions from add_disk, and users can't add partitions manually.
*
+ * ``GENHD_FL_NVMEM``: the block device should be considered as NVMEM provider.
*/
enum {
GENHD_FL_REMOVABLE = 1 << 0,
GENHD_FL_HIDDEN = 1 << 1,
GENHD_FL_NO_PART = 1 << 2,
+ GENHD_FL_NVMEM = 1 << 3,
};

What would break if this flag wouldn't exist?

Thanks,

Bart.