From: Benny Halevy <bhalevy@panasas.com>
To: Alexandros Batsakis <alexandros@jhu.edu>
Cc: Alexandros Batsakis <batsakis@netapp.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 7/8] pnfs-submit: forgetful client (layouts)
Date: Tue, 08 Jun 2010 12:15:53 +0300 [thread overview]
Message-ID: <4C0E0A49.2040308@panasas.com> (raw)
In-Reply-To: <AANLkTim0-Gb7a-YPTgtLHY3r4OVP2x-nasug6sd_zjt9@mail.gmail.com>
On 2010-06-08 10:51, Alexandros Batsakis wrote:
> On Tue, Jun 8, 2010 at 12:23 AM, Benny Halevy <bhalevy@panasas.com> wrote:
>> On Jun. 08, 2010, 0:11 +0300, Alexandros Batsakis <batsakis@netapp.com> wrote:
>>> + status = pnfs_async_return_layout(clp, inode,
>>> + args);
>>> + if (status == -EAGAIN)
>>> + res = cpu_to_be32(NFS4ERR_DELAY);
>>
>> what about other errors?
>>
>
> pnfs_async_return_layout does not send any RPCs, so it's either EAGAIN
> or an "out of memory" error in which case I guess it's better to
> return NFS4ERR_RESOURCE than NFS4ERR_NO_MATCHING_LAYOUT. So you are
> right, I ll send a fix.
>
Note that NFS4ERR_RESOURCE is no longer a valid status
in nfsv4.1 NFS4ERR_DELAY might be a better choice for -ENOMEM.
NFS4ERR_NO_MATCHING_LAYOUT should never be returned unless
you're sure you have no layout to return or you had one
and forgot everything about it.
For any other error I'd BUG() and return NFS4ERR_DELAY.
>>> + iput(inode);
>>> }
>>> + } else { /* _ALL or _FSID */
>>> + /* we need the inode to get the nfs_server struct */
>>> + inode = nfs_layoutrecall_find_inode(clp, args);
>>> + if (!inode)
>>> + goto loop;
>>> + status = pnfs_async_return_layout(clp, inode, args);
>>> + if (status == -EAGAIN)
>>> + res = cpu_to_be32(NFS4ERR_DELAY);
>>
>> ditto
>>
<snip>
>>> @@ -1044,7 +1055,7 @@ pnfs_update_layout(struct inode *ino,
>>> struct nfs4_pnfs_layout_segment arg = {
>>> .iomode = iomode,
>>> .offset = 0,
>>> - .length = ~0
>>> + .length = NFS4_MAX_UINT64,
sorry, this is just cosmetic (my bad)
Benny
next prev parent reply other threads:[~2010-06-08 9:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-07 21:11 [PATCH 0/8] forgetful client v2 Alexandros Batsakis
2010-06-07 21:11 ` [PATCH 1/8] pnfs-submit: clean struct nfs_inode Alexandros Batsakis
2010-06-07 21:11 ` [PATCH 2/8] pnfs-submit: clean locking infrastructure Alexandros Batsakis
2010-06-07 21:11 ` [PATCH 3/8] pnfs-submit: remove lgetcount, lretcount Alexandros Batsakis
2010-06-07 21:11 ` [PATCH 4/8] pnfs-submit: change stateid to be a union Alexandros Batsakis
2010-06-07 21:11 ` [PATCH 5/8] pnfs-submit: request whole-file layouts only Alexandros Batsakis
2010-06-07 21:11 ` [PATCH 6/8] pnfs-submit: change layout list to be similar to other state lists Alexandros Batsakis
2010-06-07 21:11 ` [PATCH 7/8] pnfs-submit: forgetful client (layouts) Alexandros Batsakis
2010-06-07 21:11 ` [PATCH 8/8] pnfs-submit: support for CB_RECALL_ANY (layouts) Alexandros Batsakis
2010-06-08 7:23 ` [PATCH 7/8] pnfs-submit: forgetful client (layouts) Benny Halevy
2010-06-08 7:51 ` Alexandros Batsakis
2010-06-08 9:15 ` Benny Halevy [this message]
2010-06-08 7:14 ` [PATCH 5/8] pnfs-submit: request whole-file layouts only Benny Halevy
2010-06-08 7:33 ` Alexandros Batsakis
2010-06-08 7:30 ` [PATCH 2/8] pnfs-submit: clean locking infrastructure Christoph Hellwig
2010-06-08 7:34 ` 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=4C0E0A49.2040308@panasas.com \
--to=bhalevy@panasas.com \
--cc=alexandros@jhu.edu \
--cc=batsakis@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 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.