Skip to contentSkip to conversation

nbd: automatically load module on genl access

PATCH Superseded Thomas Weißschuh 1 participant 4 messages Nov 10, 2022 – Apr 27, 2023

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nbd: automatically load module on genl access

Instead of forcing the user to manually load the module do it automatically.

---
 drivers/block/nbd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/block/nbd.c +1 -0
index 5cffd96ef2d7..1c38a7ea9531 100644
@@ -2328,6 +2328,7 @@ static struct genl_family nbd_genl_family __ro_after_init = {
 	.mcgrps		= nbd_mcast_grps,
 	.n_mcgrps	= ARRAY_SIZE(nbd_mcast_grps),
 };
+MODULE_ALIAS_GENL_FAMILY(NBD_GENL_FAMILY_NAME);
 
 static int populate_nbd_status(struct nbd_device *nbd, struct sk_buff *reply)
 {

base-commit: f67dd6ce0723ad013395f20a3f79d8a437d3f455

Signature · 1 line
2.38.1
#1 lore raw

Hi,

Quoted 21 lines · Thomas Weißschuh

Instead of forcing the user to manually load the module do it automatically.

---
 drivers/block/nbd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/block/nbd.c +1 -0
index 5cffd96ef2d7..1c38a7ea9531 100644
@@ -2328,6 +2328,7 @@ static struct genl_family nbd_genl_family __ro_after_init = {
 	.mcgrps		= nbd_mcast_grps,
 	.n_mcgrps	= ARRAY_SIZE(nbd_mcast_grps),
 };
+MODULE_ALIAS_GENL_FAMILY(NBD_GENL_FAMILY_NAME);
 
 static int populate_nbd_status(struct nbd_device *nbd, struct sk_buff *reply)
 {
Quoted 4 lines

base-commit: f67dd6ce0723ad013395f20a3f79d8a437d3f455

Signature · 1 line
2.38.1

Any feedback on the patch?

Thanks,
Thomas

#2 lore raw
In reply to Thomas Weißschuh

Hi Josef, Jens,

could you take a look at this patch?

Thanks,
Thomas

Quoted 25 lines · Thomas Weißschuh

Instead of forcing the user to manually load the module do it automatically.

---
 drivers/block/nbd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/block/nbd.c +1 -0
index 5cffd96ef2d7..1c38a7ea9531 100644
@@ -2328,6 +2328,7 @@ static struct genl_family nbd_genl_family __ro_after_init = {
 	.mcgrps		= nbd_mcast_grps,
 	.n_mcgrps	= ARRAY_SIZE(nbd_mcast_grps),
 };
+MODULE_ALIAS_GENL_FAMILY(NBD_GENL_FAMILY_NAME);
 
 static int populate_nbd_status(struct nbd_device *nbd, struct sk_buff *reply)
 {

base-commit: f67dd6ce0723ad013395f20a3f79d8a437d3f455

Signature · 1 line
2.38.1
#3 lore raw
In reply to Thomas Weißschuh

Hi Josef,

could you take a look at this?

... ping

Thanks,
Thomas

Quoted 25 lines · Thomas Weißschuh

Instead of forcing the user to manually load the module do it automatically.

---
 drivers/block/nbd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/block/nbd.c +1 -0
index 5cffd96ef2d7..1c38a7ea9531 100644
@@ -2328,6 +2328,7 @@ static struct genl_family nbd_genl_family __ro_after_init = {
 	.mcgrps		= nbd_mcast_grps,
 	.n_mcgrps	= ARRAY_SIZE(nbd_mcast_grps),
 };
+MODULE_ALIAS_GENL_FAMILY(NBD_GENL_FAMILY_NAME);
 
 static int populate_nbd_status(struct nbd_device *nbd, struct sk_buff *reply)
 {

base-commit: f67dd6ce0723ad013395f20a3f79d8a437d3f455

Signature · 1 line
2.38.1