[pnfs] [PATCH 5/8] nfsd: tabulate nfs4 xdr encoding functions
Benny Halevy
bhalevy at panasas.com
Thu Jul 3 03:40:16 EDT 2008
On Jul. 03, 2008, 1:44 +0300, "J. Bruce Fields" <bfields at fieldses.org> wrote:
> On Mon, Jun 30, 2008 at 09:07:05PM +0300, Benny Halevy wrote:
>> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
>> index 051ca77..81d7552 100644
>> --- a/fs/nfsd/nfs4xdr.c
>> +++ b/fs/nfsd/nfs4xdr.c
> ...
>> + BUG_ON(op->opnum < 0 || op->opnum >= ARRAY_SIZE(nfsd4_enc_ops) ||
>> + !nfsd4_enc_ops[op->opnum]);
>
> We hit this in the OP_ILLEGAL case. Which I wouldn't have noticed if it
> hadn't been for
>
> ./testserver.py ying2:/pynfstest --rundeps --hidepass --maketree COMP5
>
> (I routinely run newpynfs with a commandline that has the known failures
> excluded, below; appended below.
Bruce, thanks a bunch for testing!
Note to self: test. Test. TEST...
>
> For now I'm just adding a check for the OP_ILLEGAL case:
>
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index facd247..9bb2909 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -2605,10 +2605,13 @@ nfsd4_encode_operation(struct nfsd4_compoundres *resp, struct nfsd4_op *op)
> statp = p++; /* to be backfilled at the end */
> ADJUST_ARGS();
>
> + if (op->opnum == OP_ILLEGAL)
> + goto status;
Agreed.
> BUG_ON(op->opnum < 0 || op->opnum >= ARRAY_SIZE(nfsd4_enc_ops) ||
> !nfsd4_enc_ops[op->opnum]);
> nfsd4_enc_ops[op->opnum](resp, op->status, &op->u);
>
> +status:
> /*
> * Note: We write the status directly, instead of using WRITE32(),
> * since it is already in network byte order.
>
> but maybe there's some nicer fix.
>
> The series introduces a few other newpynfs failures that I haven't
> tracked down yet.
>
> --b.
>
> #failures:
> CID6
> LOOK7
> SATT1a
> CIDCF2
> COMP6
> CR13
> CR14
> LINK4a
> LINK9
> LOOKP2a
> NVF7a
> NVF7b
> NVF7c
> NVF7d
> NVF7f
> NVF7r
> NVF7s
> OPCF3a
> OPEN4
> OPEN23b
> PUB1
> RD12
> RDDR12
> RNM11
> RNM16
> SATT12a
> # change attribute resolution problem:
> SATT14
> SEC7
> VF7a
> VF7b
> VF7c
> VF7d
> VF7f
> VF7r
> VF7s
> #warnings:
> CID1
> LOCK8c
> LOCK18
> LOCK21
> OPDG9a
> OPDG9b
> OPDG9c
> OPDG9d
> OPDG9f
> OPDG9s
> OPEN16
> RD4
> RM7
> RNM10
Wow :-(
I'll look into these asap.
Benny
More information about the pNFS
mailing list