[PATCH 11/13] SQUASHME pnfs_submit: remove layout_name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andy Adamson <andros@xxxxxxxxxx>

Use the pnfs_curr_ld name field.

Signed-off-by: Andy Adamson <andros@xxxxxxxxxx>
---
 fs/nfs/super.c |   22 +++-------------------
 1 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 7cec8e5..8366ad9 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -662,29 +662,13 @@ void show_sessions(struct seq_file *m, struct nfs_server *server) {}
 #endif
 
 #ifdef CONFIG_NFS_V4_1
-char *layout_name(u32 layouttype)
-{
-	switch (layouttype) {
-	case LAYOUT_NFSV4_FILES:
-		return "files";
-	case LAYOUT_OSD2_OBJECTS:
-		return "objects";
-	case LAYOUT_BLOCK_VOLUME:
-		return "blocks";
-	default:
-		return NULL;
-	}
-}
-
 void show_pnfs(struct seq_file *m, struct nfs_server *server)
 {
-	char *name = layout_name(server->pnfs_curr_ld->id);
-
 	seq_printf(m, ",pnfs=");
-	if (name)
-		seq_printf(m, "%s", name);
+	if (server->pnfs_curr_ld)
+		seq_printf(m, "%s", server->pnfs_curr_ld->name);
 	else
-		seq_printf(m, "unknown(%d)", server->pnfs_curr_ld->id);
+		seq_printf(m, "not configured");
 }
 #else  /* CONFIG_NFS_V4_1 */
 void show_pnfs(struct seq_file *m, struct nfs_server *server) {}
-- 
1.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux