public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Benny Halevy <bhalevy@panasas.com>
To: Andy Adamson <andros@netapp.com>
Cc: Fred Isaman <iisaman@netapp.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 04/10] pnfs-submit: add backpointer to pnfs_layout_type
Date: Tue, 15 Jun 2010 13:00:21 -0400	[thread overview]
Message-ID: <4C17B1A5.8070006@panasas.com> (raw)
In-Reply-To: <1276566375-24566-5-git-send-email-iisaman@netapp.com>

On Jun. 14, 2010, 21:46 -0400, Fred Isaman <iisaman@netapp.com> wrote:
> From: Andy Adamson <andros@netapp.com>
> 
> 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@netapp.com>

Should that be Andy's sign-off? :-)

Benny

> 
> Signed-off-by: Fred Isaman <iisaman@netapp.com>
> ---
>  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;
>  };
>  
>  /*


  parent reply	other threads:[~2010-06-15 17:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-15  1:46 [PATCH 00/10] layout refcounting changes Fred Isaman
2010-06-15  1:46 ` [PATCH 01/10] pnfs-submit: separate locking from get and put of layout Fred Isaman
2010-06-15  1:46   ` [PATCH 02/10] pnfs-submit: split get_layout and grab_current_layout Fred Isaman
2010-06-15  1:46     ` [PATCH 03/10] pnfs-submit: remove list_empty check from put_layout Fred Isaman
2010-06-15  1:46       ` [PATCH 04/10] pnfs-submit: add backpointer to pnfs_layout_type Fred Isaman
2010-06-15  1:46         ` [PATCH 05/10] pnfs-submit: Move pnfs_layout_state and pnfs_layout_suspend back to nfs_inode Fred Isaman
2010-06-15  1:46           ` [PATCH 06/10] pnfs-submit: Add state flag for layoutcommit_needed Fred Isaman
2010-06-15  1:46             ` [PATCH 07/10] pnfs-submit: avoid race handling return on close Fred Isaman
2010-06-15  1:46               ` [PATCH 08/10] pnfs-submit: change nfsi->layout to a pointer Fred Isaman
2010-06-15  1:46                 ` [PATCH 09/10] pnfs-submit: API change: alloc_layout returns layout cache head Fred Isaman
2010-06-15  1:46                   ` [PATCH 10/10] pnfs-submit: filelayout: adjust to new alloc_layout API Fred Isaman
2010-06-15 17:06               ` [PATCH 07/10] pnfs-submit: avoid race handling return on close Benny Halevy
2010-06-15 17:32                 ` Fred Isaman
     [not found]                   ` <AANLkTilDj2Ua_t77kk5Gj_t0vqEcOJFKlqODAj18KQnm-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-15 17:33                     ` Trond Myklebust
     [not found]                       ` <1276623230.8767.48.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2010-06-15 17:52                         ` Fred Isaman
     [not found]                           ` <AANLkTimScICltrCrtEIz7qw1GzuaTGNwCVTk-ZTsZO4_-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-15 18:19                             ` Trond Myklebust
     [not found]                               ` <1276625991.2988.1.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2010-06-15 18:47                                 ` Benny Halevy
2010-06-15 17:00         ` Benny Halevy [this message]
2010-06-15 16:56       ` [PATCH 03/10] pnfs-submit: remove list_empty check from put_layout Benny Halevy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C17B1A5.8070006@panasas.com \
    --to=bhalevy@panasas.com \
    --cc=andros@netapp.com \
    --cc=iisaman@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox