[pnfs] [PATCH 5/8] nfsd: tabulate nfs4 xdr encoding functions
J. Bruce Fields
bfields at fieldses.org
Wed Jul 2 18:58:41 EDT 2008
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
(always zero, in most cases).
Anyway for now I'm just dropping this patch for now, and applying the
others.
--b.
More information about the pNFS
mailing list