All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Benny Halevy <bhalevy@tonian.com>
Cc: <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 3/5] pnfsd: add debug printouts to pnfsd_roc
Date: Mon, 28 May 2012 19:53:26 +0300	[thread overview]
Message-ID: <4FC3AD86.7040509@panasas.com> (raw)
In-Reply-To: <1338221378-22567-1-git-send-email-bhalevy@tonian.com>

On 05/28/2012 07:09 PM, Benny Halevy wrote:

> Signed-off-by: Benny Halevy <bhalevy@tonian.com>


Benny I disagree with this patch.

Not specifically with the print but with the !found print.

pnfsd_roc is always called layouts or not. So these
!found print are bogus.

> ---
>  fs/nfsd/nfs4pnfsd.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4pnfsd.c b/fs/nfsd/nfs4pnfsd.c
> index cfaac56..0a8d5b5 100644
> --- a/fs/nfsd/nfs4pnfsd.c
> +++ b/fs/nfsd/nfs4pnfsd.c
> @@ -1227,7 +1227,9 @@ int nfs4_pnfs_return_layout(struct super_block *sb, struct svc_fh *current_fh,
>  void pnfsd_roc(struct nfs4_client *clp, struct nfs4_file *fp)
>  {
>  	struct nfs4_layout *lo, *nextlp;
> +	bool found = false;
>  
> +	dprintk("%s: fp=%p clp=%p", __func__, fp, clp);
>  	spin_lock(&layout_lock);
>  	list_for_each_entry_safe (lo, nextlp, &fp->fi_layouts, lo_perfile) {
>  		struct nfsd4_pnfs_layoutreturn lr;
> @@ -1245,11 +1247,15 @@ void pnfsd_roc(struct nfs4_client *clp, struct nfs4_file *fp)
>  		destroy_layout(lo); /* do not access lp after this */
>  
>  		empty = list_empty(&fp->fi_layouts);
> +		found = true;
> +		dprintk("%s: fp=%p clp=%p: return on close", __func__, fp, clp);
>  		fs_layout_return(fp->fi_inode->i_sb, fp->fi_inode, &lr,
>  				 LR_FLAG_INTERN,
>  				 empty ? PNFS_LAST_LAYOUT_NO_RECALLS : NULL);


fs_layout_return already prints for each call. So we should only add one
global print so to know we came from ROC

Please don't fix it. I have this covered in my patches. In fact this
function is totally changed.

>  	}
>  	spin_unlock(&layout_lock);
> +	if (!found)
> +		dprintk("%s: no layout found", __func__);


Again please no prints here. pnfsd_roc is always called unconditionally
from last close.
(And found should be conditional on SUNRPC_DEBUG if is left)

>  }
>  
>  void pnfs_expire_client(struct nfs4_client *clp)


Thanks
Boaz

  reply	other threads:[~2012-05-28 16:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24  0:16 Does our Kernel PNFSD-Server supports recurring layout_get with open_state_id Boaz Harrosh
2012-05-24 12:41 ` Benny Halevy
2012-05-24 13:49   ` Boaz Harrosh
2012-05-24 13:50     ` Boaz Harrosh
2012-05-28 16:05     ` Benny Halevy
2012-05-28 16:09       ` [PATCH 1/5] pnfsd: make return_on_close state layout-global for the file/client Benny Halevy
2012-05-28 16:38         ` Boaz Harrosh
2012-05-28 16:09       ` [PATCH 2/5] SQUASHME: pnfsd: use LR_FLAG_INTERN for pnfsd_roc implicit layout return Benny Halevy
2012-05-28 16:09       ` [PATCH 3/5] pnfsd: add debug printouts to pnfsd_roc Benny Halevy
2012-05-28 16:53         ` Boaz Harrosh [this message]
2012-05-28 17:59           ` Benny Halevy
2012-05-28 16:09       ` [PATCH 4/5] pnfsd-lexp: return_on_close config option Benny Halevy
2012-05-28 16:52         ` Boaz Harrosh
2012-05-28 17:58           ` Benny Halevy
2012-05-28 18:01             ` Benny Halevy
2012-05-28 18:08               ` Benny Halevy
2012-05-28 18:05             ` Boaz Harrosh
2012-05-28 16:09       ` [PATCH 5/5] SQUASHME: pnfsd: lrs_present is false by default Benny Halevy
2012-05-28 16:36       ` Does our Kernel PNFSD-Server supports recurring layout_get with open_state_id Boaz Harrosh
2012-05-28 17:55         ` Benny Halevy
2012-05-28 18:09           ` Boaz Harrosh
2012-05-28 18:29             ` Benny Halevy
2012-05-29  7:13               ` Boaz Harrosh
2012-05-31  6:35                 ` 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=4FC3AD86.7040509@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=bhalevy@tonian.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 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.