From: Benny Halevy <bhalevy@panasas.com>
To: "J. Bruce Fields" <bfields@citi.umich.edu>
Cc: Boaz Harrosh <bharrosh@panasas.com>,
andros@netapp.com, linux-nfs@vger.kernel.org, pnfs@linux-nfs.org
Subject: Re: [pnfs] [PATCH] SQUASHME: pnfsd-exofs: Change layoutget return codes
Date: Thu, 11 Feb 2010 19:34:04 +0200 [thread overview]
Message-ID: <4B743F8C.4070701@panasas.com> (raw)
In-Reply-To: <20100211163835.GA320@fieldses.org>
On Feb. 11, 2010, 18:38 +0200, "J. Bruce Fields" <bfields@citi.umich.edu> wrote:
> On Wed, Feb 10, 2010 at 12:45:12PM +0200, Boaz Harrosh wrote:
>> On 02/10/2010 10:24 AM, Boaz Harrosh wrote:
>>> Dependent on patch from Andy:
>>> [PATCH 1/6] pnfsd: fix file system API layout_get error codes
>>>
>>> Change codes to nfs4.1 codes
>>>
>>> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
>> Rrrr I spoke to soon.
>>
>> Andy, Benny
>> This will not work, currently. All the nfserr_xxx constants are defined
>> if fs/nfsd/nfsd.h.
>> (Why do they exist at all, why can't we use the client's definitions for these?)
>>
>> At the minimum they need to move to include/linux/nfsd/export.h. But I say kill them
>> and use these from include/linux/nfs4.h. Added bonus these are enums, so prototype
>> of .layout_get() can change to return enum nfsstat4 and the compiler fixes all our
>> bugs.
>>
>> I'm posting a second patch that uses "enum nfsstat4" constants in exofs which will
>> work just fine, but is really ugly on the documentation aspect of Andy's patch.
>>
>> Bruce may I submit a patch that globally gets rid of all nfserr_* defines and uses
>> NFS4ERR_* in their place?
>
> And ditto for v2/v3 errors?
>
> Note you'll also need to track down all the function return types and
> the variables that hold errors, and change them from __be32 to something
> else. (Hopefully not int, as the distinction between nfs errors and
> -ERRNO errors is useful.)
>
> I agree that it would be better not to have two entirely separate sets
> of errors defines.
>
> It's a large change that will conflict with everything, but as it's
> currently Benny that will probably have the most fixing-up to do I guess
> I'd defer to him to weigh the pain caused by that.
I think that such a clean up internally to the nfsd layer is really
low priority. However, new pnfs code, beyond the superblock api,
should be cleaner and avoid using the internal, encoded constants.
We just saw how confusing it is, when the DLM layout could've returned
a mix of be32 error codes, negative host-order nfs4.1 errors codes, and
negative system errors. Latter two, erronuously from filelayout_encode_layout.
Note that filelayout_encode_layout can be called both from the dlm
implementation that is technically a part of nfsd, but from spnfs
and other file systems supporting the file layout so it better
agree on one simple convention.
Benny
>
> --b.
> _______________________________________________
> pNFS mailing list
> pNFS@linux-nfs.org
> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
next prev parent reply other threads:[~2010-02-11 17:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-09 17:42 [PATCH 0/6] pnfs DLM cluster only use read iomode layouts Version 2 andros
2010-02-09 17:42 ` [PATCH 1/6] pnfsd: fix file system API layout_get error codes andros
2010-02-09 17:42 ` [PATCH 2/6] pnfsd: fix NFS4ERR_BADIOMODE in layoutget andros
2010-02-09 17:42 ` [PATCH 3/6] pnfsd: DLM file layout only support read iomode layouts andros
2010-02-09 17:42 ` [PATCH 4/6] pnfsd: fix DLM file layout no device return andros
2010-02-09 17:42 ` [PATCH 5/6] pnfs: set failed layout bit per iomode andros
2010-02-09 17:42 ` [PATCH 6/6] pnfsd: fix compile errors when CONFIG_PNFSD is not set andros
2010-02-09 18:00 ` [pnfs] " Benny Halevy
2010-02-09 19:29 ` Andy Adamson
2010-02-09 18:03 ` [pnfs] [PATCH 2/6] pnfsd: fix NFS4ERR_BADIOMODE in layoutget Benny Halevy
2010-02-09 18:57 ` Andy Adamson
2010-02-10 8:26 ` Boaz Harrosh
2010-02-10 8:24 ` [PATCH] SQUASHME: pnfsd-exofs: Change layoutget return codes Boaz Harrosh
2010-02-10 10:45 ` [pnfs] " Boaz Harrosh
2010-02-10 13:06 ` Halevy, Benny
[not found] ` <7225594ED4A1304C9E43D030A886D221F4C8EC-QcknvLX4j1suWLk7KE+CsC1byIy0dIec@public.gmane.org>
2010-02-10 13:43 ` Boaz Harrosh
2010-02-11 16:38 ` J. Bruce Fields
2010-02-11 17:34 ` Benny Halevy [this message]
2010-02-10 10:47 ` [PATCH version2] " Boaz Harrosh
2010-02-11 10:53 ` 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=4B743F8C.4070701@panasas.com \
--to=bhalevy@panasas.com \
--cc=andros@netapp.com \
--cc=bfields@citi.umich.edu \
--cc=bharrosh@panasas.com \
--cc=linux-nfs@vger.kernel.org \
--cc=pnfs@linux-nfs.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