[pnfs] [PATCH 5/8] nfsd: tabulate nfs4 xdr encoding functions
Benny Halevy
bhalevy at panasas.com
Thu Jul 3 03:47:47 EDT 2008
On Jul. 03, 2008, 1:58 +0300, "J. Bruce Fields" <bfields at fieldses.org> wrote:
> Whoops, I should have seen this when I read the patch:
>
> On Mon, Jun 30, 2008 at 09:07:05PM +0300, Benny Halevy wrote:
>> - switch (op->opnum) {
>> - case OP_ACCESS:
>> - nfsd4_encode_access(resp, op->status, &op->u.access);
>> - break;
>> - case OP_CLOSE:
>> - nfsd4_encode_close(resp, op->status, &op->u.close);
>> - break;
>> - case OP_COMMIT:
>> - nfsd4_encode_commit(resp, op->status, &op->u.commit);
>> - break;
>> - case OP_CREATE:
>> - nfsd4_encode_create(resp, op->status, &op->u.create);
>> - break;
>> - case OP_DELEGRETURN:
>> - break;
>
> Most of the encode operations don't return a status, but for those where
> the real work's done in the encode:
>
>> - case OP_GETATTR:
>> - op->status = nfsd4_encode_getattr(resp, op->status, &op->u.getattr);
>> - break;
>
> we're now discarding that return:
>
>> + nfsd4_enc_ops[op->opnum](resp, op->status, &op->u);
>
> I'd be inclined to standardize on having all operations return a status
Agreed.
> (always zero, in most cases).
hmm, I'd say it's always the input nfserr, in most cases...
(which hopefully is zero)
>
> Anyway for now I'm just dropping this patch for now, and applying the
> others.
Thanks!
Will fix.
Benny
>
> --b.
More information about the pNFS
mailing list