On Jun. 14, 2010, 21:46 -0400, Fred Isaman <iisaman@xxxxxxxxxx> wrote: > From: Andy Adamson <andros@xxxxxxxxxx> > > Note: This should be avoided by passing struct inode instead of struct > pnfs_layout_type in all layoutdriver_io_operaitons.(which i suggest we do) > > In preparation to changing the nfs_inode->layout to be a pointer to > struct pnfs_layout_type and allocate it in the alloc_layout layoutdriver io > operation. > We've already been there and decided to embed the layout in the struct nfs_inode What has changed? > -->Andy Adamson <andros@xxxxxxxxxx> Should that be Andy's sign-off? :-) Benny > > Signed-off-by: Fred Isaman <iisaman@xxxxxxxxxx> > --- > fs/nfs/inode.c | 1 + > include/linux/nfs4_pnfs.h | 4 ++-- > include/linux/nfs_fs.h | 1 + > 3 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c > index cdec539..be25ffc 100644 > --- a/fs/nfs/inode.c > +++ b/fs/nfs/inode.c > @@ -1423,6 +1423,7 @@ static void pnfs_init_once(struct nfs_inode *nfsi) > INIT_LIST_HEAD(&nfsi->layout.segs); > nfsi->layout.refcount = 0; > nfsi->layout.ld_data = NULL; > + nfsi->layout.lo_inode = &nfsi->vfs_inode; > #endif /* CONFIG_NFS_V4_1 */ > } > > diff --git a/include/linux/nfs4_pnfs.h b/include/linux/nfs4_pnfs.h > index a88cd69..9dac941 100644 > --- a/include/linux/nfs4_pnfs.h > +++ b/include/linux/nfs4_pnfs.h > @@ -35,13 +35,13 @@ struct pnfs_layoutdriver_type { > static inline struct nfs_inode * > PNFS_NFS_INODE(struct pnfs_layout_type *lo) > { > - return container_of(lo, struct nfs_inode, layout); > + return NFS_I(lo->lo_inode); > } > > static inline struct inode * > PNFS_INODE(struct pnfs_layout_type *lo) > { > - return &PNFS_NFS_INODE(lo)->vfs_inode; > + return lo->lo_inode; > } > > static inline struct nfs_server * > diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h > index 41026cb..95d8d53 100644 > --- a/include/linux/nfs_fs.h > +++ b/include/linux/nfs_fs.h > @@ -116,6 +116,7 @@ struct pnfs_layout_type { > */ > loff_t pnfs_write_begin_pos; > loff_t pnfs_write_end_pos; > + struct inode *lo_inode; > }; > > /* -- 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