All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: <andros@netapp.com>
Cc: <trond.myklebust@netapp.com>, <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 1/3] NFSv4.1 do not call LAYOUTRETURN when there are no legs
Date: Sun, 3 Jun 2012 02:00:30 +0300	[thread overview]
Message-ID: <4FCA9B0E.5070304@panasas.com> (raw)
In-Reply-To: <1338571178-2096-1-git-send-email-andros@netapp.com>

On 06/01/2012 08:19 PM, andros@netapp.com wrote:

> From: Andy Adamson <andros@netapp.com>
> 


I wish you would send your patches preceded with a [PATCHSET 0/x]
That gives us a short summery and a little background on its motivation.

For example here, what are the problems you encounter, how did you test
it and so on...

Do these actually depend and/or fix your previous "send layout_return ..."
In files layout?

(You can still send all patches by git send-email command line just the same
 just add a [PATCHSET 0/x]-xxx-yyy.txt and it will get sent first, right?)

Thanks
Boaz

> mark_matching_lsegs_invalid() does not indicate if the plh_segs list is
> empty on entrance - and it can be empty on exit.
> 
> When the plh_segs list is emtpy, mark_matching_lsegs_invalid removes
> the pnfs_layout_hdr creation reference.
> 
> Signed-off-by: Andy Adamson <andros@netapp.com>
> ---
>  fs/nfs/pnfs.c |   17 +++++++++++++++--
>  1 files changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
> index b8323aa..854df5e 100644
> --- a/fs/nfs/pnfs.c
> +++ b/fs/nfs/pnfs.c
> @@ -646,7 +646,14 @@ out_err_free:
>  	return NULL;
>  }
>  
> -/* Initiates a LAYOUTRETURN(FILE) */
> +/*
> + * Initiates a LAYOUTRETURN(FILE), and removes the pnfs_layout_hdr
> + * when the layout segment list is empty.
> + *
> + * Note that a pnfs_layout_hdr can exist with an empty layout segment
> + * list when LAYOUTGET has failed, or when LAYOUTGET succeeded, but the
> + * deviceid is marked invalid.
> + */
>  int
>  _pnfs_return_layout(struct inode *ino)
>  {
> @@ -655,7 +662,7 @@ _pnfs_return_layout(struct inode *ino)
>  	LIST_HEAD(tmp_list);
>  	struct nfs4_layoutreturn *lrp;
>  	nfs4_stateid stateid;
> -	int status = 0;
> +	int status = 0, empty = 0;
>  
>  	dprintk("--> %s\n", __func__);
>  
> @@ -669,11 +676,17 @@ _pnfs_return_layout(struct inode *ino)
>  	stateid = nfsi->layout->plh_stateid;
>  	/* Reference matched in nfs4_layoutreturn_release */
>  	get_layout_hdr(lo);
> +	empty = list_empty(&lo->plh_segs);
>  	mark_matching_lsegs_invalid(lo, &tmp_list, NULL);
>  	lo->plh_block_lgets++;
>  	spin_unlock(&ino->i_lock);
>  	pnfs_free_lseg_list(&tmp_list);
>  
> +	if (empty) {
> +		put_layout_hdr(lo);
> +		dprintk("%s: no layout segments to return\n", __func__);
> +		return status;
> +	}
>  	WARN_ON(test_bit(NFS_INO_LAYOUTCOMMIT, &nfsi->flags));
>  
>  	lrp = kzalloc(sizeof(*lrp), GFP_KERNEL);



  parent reply	other threads:[~2012-06-02 23:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-01 17:19 [PATCH 1/3] NFSv4.1 do not call LAYOUTRETURN when there are no legs andros
2012-06-01 17:19 ` [PATCH 2/3] NFSv4.1 mark layout when already returned andros
2012-06-02 22:51   ` Boaz Harrosh
2012-06-05 13:36     ` Adamson, Andy
2012-06-05 13:47       ` Andy Adamson
2012-06-05 14:54       ` Boaz Harrosh
2012-06-05 19:22         ` Andy Adamson
2012-06-05 20:49           ` Boaz Harrosh
2012-06-11  9:56           ` Benny Halevy
2012-06-11 10:44             ` Boaz Harrosh
2012-06-11 14:04               ` Benny Halevy
2012-06-11 14:21                 ` Adamson, Andy
2012-06-11 14:51                   ` Boaz Harrosh
2012-06-11 15:41                     ` Adamson, Andy
2012-06-11 16:14                       ` Boaz Harrosh
2012-06-11 15:08             ` Adamson, Andy
2012-06-11 15:38               ` Benny Halevy
2012-06-11 15:52                 ` Adamson, Andy
2012-06-11 16:07                   ` Boaz Harrosh
2012-06-11 15:59               ` Boaz Harrosh
2012-06-01 17:19 ` [PATCH 3/3] NFSv4.1 fence all layouts with file layout data server connection errors andros
2012-06-02 22:33   ` Boaz Harrosh
2012-06-04 13:49     ` Adamson, Andy
2012-06-02 23:00 ` Boaz Harrosh [this message]
2012-06-05 13:36   ` [PATCH 1/3] NFSv4.1 do not call LAYOUTRETURN when there are no legs Adamson, Andy
2012-06-05 15:01     ` Boaz Harrosh

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=4FCA9B0E.5070304@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=andros@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@netapp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.