Skip to contentSkip to conversation

bcache patches for Linux v5.13 - 3rd wave

PATCH In review Coly Li 2 participants 4 messages Apr 20, 2021

Subsystems (2)
lore
Share & tools
lore

Coly Li

author
#0 lore raw

cover bcache patches for Linux v5.13 - 3rd wave

HI Jens,

Here are the current bcache fixes for already merged patches in linux-next for Linux v5.13.

Thank you in advance for taking them.

Coly Li
---

Colin Ian King (1):
bcache: Set error return err to -ENOMEM on allocation failure

Coly Li (1):
bcache: Kconfig dependence fix for NVDIMM support

 drivers/md/bcache/Kconfig     | 4 ++--
 drivers/md/bcache/nvm-pages.c | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
2.26.2
author
#1 lore raw

PATCH 1/2 bcache: Kconfig dependence fix for NVDIMM support

In drivers/md/bcache/Kconfig, setting BCACHE_NVM_PAGES to "selected" LIBNVDIMM and DAX is improper. This patch changes to Kconfig dependance from "selected" to "depends on" for LIBNVDIMM and DAX.

---
 drivers/md/bcache/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/md/bcache/Kconfig +2 -2
index 0996e366ad0b..59999f24d89e 100644
@@ -40,7 +40,7 @@ config BCACHE_NVM_PAGES
 	bool "NVDIMM support for bcache (EXPERIMENTAL)"
 	depends on BCACHE
 	depends on PHYS_ADDR_T_64BIT
-	select LIBNVDIMM
-	select DAX
+	depends on LIBNVDIMM
+	depends on DAX
 	help
 	nvm pages allocator for bcache.
Signature · 1 line
2.26.2
Acked-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] bcache: Kconfig dependence fix for NVDIMM support

Quoted 7 lines · Coly Li

In drivers/md/bcache/Kconfig, setting BCACHE_NVM_PAGES to "selected" LIBNVDIMM and DAX is improper. This patch changes to Kconfig dependance from "selected" to "depends on" for LIBNVDIMM and DAX.

Thanks.

Quoted 19 lines
---
 drivers/md/bcache/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/md/bcache/Kconfig +2 -2
index 0996e366ad0b..59999f24d89e 100644
@@ -40,7 +40,7 @@ config BCACHE_NVM_PAGES
 	bool "NVDIMM support for bcache (EXPERIMENTAL)"
 	depends on BCACHE
 	depends on PHYS_ADDR_T_64BIT
-	select LIBNVDIMM
-	select DAX
+	depends on LIBNVDIMM
+	depends on DAX
 	help
 	nvm pages allocator for bcache.
Signature · 1 line
~Randy
author
#3 lore raw

PATCH 2/2 bcache: Set error return err to -ENOMEM on allocation failure

In reply to Coly Li

From: Colin Ian King <[email protected]>

Currently when ns fails to be allocated the error return path returns an uninitialized return code in variable 'err'. Fix this by setting err to -ENOMEM.

Addresses-Coverity: ("Uninitialized scalar variable")

Fixes 688330711e9a ("bcache: initialize the nvm pages allocator")
---
 drivers/md/bcache/nvm-pages.c | 1 +
 1 file changed, 1 insertion(+)
drivers/md/bcache/nvm-pages.c +1 -0
index 08cd45e90481..2e124d546099 100644
@@ -584,6 +584,7 @@ struct bch_nvm_namespace *bch_register_namespace(const char *dev_path)
 		return ERR_PTR(PTR_ERR(bdev));
 	}
 
+	err = -ENOMEM;
 	ns = kzalloc(sizeof(struct bch_nvm_namespace), GFP_KERNEL);
 	if (!ns)
 		goto bdput;
Signature · 1 line
2.26.2