Skip to contentSkip to conversation

dax: Get rid of fs_dax_get_by_host() helper

PATCH Vivek Goyal 3 participants 4 messages Jan 6, 2020 – Jan 16, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Looks like nobody is using fs_dax_get_by_host() except fs_dax_get_by_bdev() and it can easily use dax_get_by_host() instead.

IIUC, fs_dax_get_by_host() was only introduced so that one could compile with CONFIG_FS_DAX=n and CONFIG_DAX=m. fs_dax_get_by_bdev() achieves the same purpose and hence it looks like fs_dax_get_by_host() is not needed anymore.

---
 drivers/dax/super.c |    2 +-
 include/linux/dax.h |   10 ----------
 2 files changed, 1 insertion(+), 11 deletions(-)
drivers/dax/super.c +1 -1
Index: rhvgoyal-linux-fuse/drivers/dax/super.c
===================================================================
@@ -61,7 +61,7 @@ struct dax_device *fs_dax_get_by_bdev(st
 {
 	if (!blk_queue_dax(bdev->bd_queue))
 		return NULL;
-	return fs_dax_get_by_host(bdev->bd_disk->disk_name);
+	return dax_get_by_host(bdev->bd_disk->disk_name);
 }
 EXPORT_SYMBOL_GPL(fs_dax_get_by_bdev);
 #endif
include/linux/dax.h +0 -10
Index: rhvgoyal-linux-fuse/include/linux/dax.h
===================================================================
@@ -129,11 +129,6 @@ static inline bool generic_fsdax_support
 			sectors);
 }
 
-static inline struct dax_device *fs_dax_get_by_host(const char *host)
-{
-	return dax_get_by_host(host);
-}
-
 static inline void fs_put_dax(struct dax_device *dax_dev)
 {
 	put_dax(dax_dev);
@@ -160,11 +155,6 @@ static inline bool generic_fsdax_support
 	return false;
 }
 
-static inline struct dax_device *fs_dax_get_by_host(const char *host)
-{
-	return NULL;
-}
-
 static inline void fs_put_dax(struct dax_device *dax_dev)
 {
 }
Reviewed-by
#1 lore raw
Quoted 9 lines · Vivek Goyal

Looks like nobody is using fs_dax_get_by_host() except fs_dax_get_by_bdev() and it can easily use dax_get_by_host() instead.

IIUC, fs_dax_get_by_host() was only introduced so that one could compile with CONFIG_FS_DAX=n and CONFIG_DAX=m. fs_dax_get_by_bdev() achieves the same purpose and hence it looks like fs_dax_get_by_host() is not needed anymore.

Looks good,

_______________________________________________
Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]

#2 lore raw
In reply to Vivek Goyal
Quoted 9 lines · Vivek Goyal

Looks like nobody is using fs_dax_get_by_host() except fs_dax_get_by_bdev() and it can easily use dax_get_by_host() instead.

IIUC, fs_dax_get_by_host() was only introduced so that one could compile with CONFIG_FS_DAX=n and CONFIG_DAX=m. fs_dax_get_by_bdev() achieves the same purpose and hence it looks like fs_dax_get_by_host() is not needed anymore.

Hi Dan,

Ping for this patch. How does it look to you. If you don't have concerns, can you please take it in your tree.

Thanks
Vivek

Quoted 46 lines
---
 drivers/dax/super.c |    2 +-
 include/linux/dax.h |   10 ----------
 2 files changed, 1 insertion(+), 11 deletions(-)

Index: rhvgoyal-linux-fuse/drivers/dax/super.c
===================================================================

drivers/dax/super.c +1 -1
@@ -61,7 +61,7 @@ struct dax_device *fs_dax_get_by_bdev(st
 {
 	if (!blk_queue_dax(bdev->bd_queue))
 		return NULL;
-	return fs_dax_get_by_host(bdev->bd_disk->disk_name);
+	return dax_get_by_host(bdev->bd_disk->disk_name);
 }
 EXPORT_SYMBOL_GPL(fs_dax_get_by_bdev);
 #endif

Index: rhvgoyal-linux-fuse/include/linux/dax.h
===================================================================

include/linux/dax.h +0 -10
@@ -129,11 +129,6 @@ static inline bool generic_fsdax_support
 			sectors);
 }
 
-static inline struct dax_device *fs_dax_get_by_host(const char *host)
-{
-	return dax_get_by_host(host);
-}
-
 static inline void fs_put_dax(struct dax_device *dax_dev)
 {
 	put_dax(dax_dev);
@@ -160,11 +155,6 @@ static inline bool generic_fsdax_support
 	return false;
 }
 
-static inline struct dax_device *fs_dax_get_by_host(const char *host)
-{
-	return NULL;
-}
-
 static inline void fs_put_dax(struct dax_device *dax_dev)
 {
 }
#3 lore raw
Quoted 10 lines · Vivek Goyal
Quoted 8 lines · Vivek Goyal

Looks like nobody is using fs_dax_get_by_host() except fs_dax_get_by_bdev() and it can easily use dax_get_by_host() instead.

IIUC, fs_dax_get_by_host() was only introduced so that one could compile with CONFIG_FS_DAX=n and CONFIG_DAX=m. fs_dax_get_by_bdev() achieves the same purpose and hence it looks like fs_dax_get_by_host() is not needed anymore.

Quoted 6 lines
Quoted 1 line

Hi Dan,

Ping for this patch. How does it look to you. If you don't have concerns, can you please take it in your tree.

Yes, looks good and applied.
_______________________________________________
Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]