[pnfs] [Fwd: [PATCH 08/13] pnfs: add lo_inodes to struct nfs_inode]

Benny Halevy bhalevy at panasas.com
Wed Jan 23 05:47:49 EST 2008


Resending since previous message didn't get to the mailing list.

On Jan. 22, 2008, 21:33 +0200, Benny Halevy <bhalevy at panasas.com> wrote:

lo_inodes is used to link all inodes having layout
to the respective cl_lo_inodes list.

Signed-off-by: Benny Halevy <bhalevy at panasas.com>
---
 fs/nfs/inode.c         |    1 +
 include/linux/nfs_fs.h |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 12c60c4..8b662ac 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1172,6 +1172,7 @@ struct inode *nfs_alloc_inode(struct super_block *sb)
 	nfsi->nfs4_acl = NULL;
 #endif /* CONFIG_NFS_V4 */
 #ifdef CONFIG_PNFS
+	INIT_LIST_HEAD(&nfsi->lo_inodes);
 	nfsi->pnfs_layout_state = 0;
 	nfsi->current_layout = NULL;
 	nfsi->layoutcommit_ctx = NULL;
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 99dfe9c..0477a4c 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -176,6 +176,9 @@ struct nfs_inode {
 
 	/* pNFS layout information */
 #if defined(CONFIG_PNFS)
+	/* Inodes having layouts */
+	struct list_head	lo_inodes;
+
 	unsigned long pnfs_layout_state;
 #define NFS_INO_LAYOUT_FAILED	0x0001	/* get layout failed, stop trying */
 #define NFS_INO_LAYOUT_ALLOC	0x0002	/* get layout failed, stop trying */
-- 
1.5.3.3


-- 
Benny Halevy
Software Architect
Tel/Fax: +972-3-647-8340
Mobile: +972-54-802-8340
US:      +1-412-203-3187
bhalevy at panasas.com
 
Panasas, Inc.
The Leader in Parallel Storage
www.panasas.com


More information about the pNFS mailing list