Re: [PATCH 1/3] nfsd: bring in support for delstid draft XDR encoding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On Aug 19, 2024, at 9:26 AM, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> 
> I'm playing with the new version now and it seems to be much improved.
> Only two real bugs I've hit at this point:
> 
> 1/ Some of the struct specifications need to be typedefs as well. For
> instance, the delstid draft refers to "nfstime4", but the autogenerated
> struct definition doesn't have the typedef for it. It may be best to
> just add typedefs for all of these sorts of structs.

What's the specific symptom? I've been able to catenate nfs4_1.x
and delstid.x, xdrgen builds the header and source without tossing
any exceptions, and gcc compiles it without complaint.

AFAICT, xdrgen will add "struct" where it's necessary.

I've been squirrelly about using "typedef" too often because
the Linux kernel's coding style is to avoid C typedefs for
shorthand structure names.


> 2/ xdrgen_encode_nfstime4 want a pointer to the nfstime4, but the
> autogenerated code for xdrgen_encode_fattr4_time_deleg_access and
> xdrgen_encode_fattr4_time_deleg_modify try to pass it by value instead.

Here's my generated copy of xdrgen_encode_fattr_time_deleg_access:

/* typedef fattr4_time_deleg_access */
static bool __maybe_unused                                                      xdrgen_encode_fattr4_time_deleg_access(struct xdr_stream *xdr, const fattr4_time_deleg_access value)
{
	/* (basic) */
	return xdrgen_encode_nfstime4(xdr, &value);
};

Looks like it does the right thing...?


--
Chuck Lever






[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux