All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benny Halevy <bhalevy@panasas.com>
To: Fred Isaman <iisaman@netapp.com>
Cc: "P.B.Shelley" <shelleypt@gmail.com>, linux-nfs@vger.kernel.org
Subject: Re: Question about LAYOUTRETURN stateid
Date: Tue, 12 Oct 2010 10:40:47 -0400	[thread overview]
Message-ID: <4CB4736F.2060507@panasas.com> (raw)
In-Reply-To: <AANLkTik6WBUJrSW5GY+i-iERxU-rMz5D0oWFa-n8HhH+-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 2010-10-12 09:11, Fred Isaman wrote:
> On Tue, Oct 12, 2010 at 7:09 AM, P.B.Shelley <shelleypt@gmail.com> wrote:
>> Hi, all
>>
>> While reading Linux pnfs code, I have a question in layoutreturn code path.
>>
>> nfs4_layoutreturn_release() only invalidate layout stateid when
>> res.lrs_present is FALSE. If it is TRUE, client is supposed to set it
>> to res.stateid, is it? But I do not see somewhere the layout stateid
>> is updated. Am I missing something?
>>
> 
> No, you are not missing anything.  that is a bug.
> 

Agreed.
Who's volunteering to send a fix? :)

Benny

> Fred
> 
>> 5683 static void nfs4_layoutreturn_release(void *calldata)
>> 5684 {
>> 5685         struct nfs4_layoutreturn *lrp = calldata;
>> 5686         struct pnfs_layout_hdr *lo = NFS_I(lrp->args.inode)->layout;
>> 5687
>> 5688         dprintk("--> %s return_type %d lo %p\n", __func__,
>> 5689                 lrp->args.return_type, lo);
>> 5690
>> 5691         if (lrp->args.return_type == RETURN_FILE) {
>> 5692                 if (!lrp->res.lrs_present)
>> 5693                         pnfs_invalidate_layout_stateid(lo);
>> 5694                 pnfs_layoutreturn_release(lo, &lrp->args.range);
>> 5695         }
>> 5696         kfree(calldata);
>> 5697         dprintk("<-- %s\n", __func__);
>> 5698 }
>>
>> --
>> Thanks,
>> Shelley
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-10-12 14:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-12 11:09 Question about LAYOUTRETURN stateid P.B.Shelley
2010-10-12 13:11 ` Fred Isaman
     [not found]   ` <AANLkTik6WBUJrSW5GY+i-iERxU-rMz5D0oWFa-n8HhH+-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-12 14:40     ` Benny Halevy [this message]
2010-10-12 15:29       ` William A. (Andy) Adamson
2010-10-12 15:38         ` Fred Isaman
     [not found]           ` <AANLkTinv9OZ1M9ykACYYavT57W69er_uTYXRiQA_aon9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-10-12 15:41             ` William A. (Andy) Adamson

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=4CB4736F.2060507@panasas.com \
    --to=bhalevy@panasas.com \
    --cc=iisaman@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=shelleypt@gmail.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.