Re: [RFC PATCH 2/2] NFSD: Create an initial nfs4_1.x file

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

 



On Wed, Aug 21, 2024 at 03:03:33PM -0400, Chuck Lever wrote:
> On Wed, Aug 21, 2024 at 10:22:15AM -0400, Jeff Layton wrote:
> > Also, as a side note:
> > 
> > fs/nfsd/nfs4xdr.c: In function ‘nfsd4_encode_fattr4_open_arguments’:
> > fs/nfsd/nfs4xdr.c:3446:55: error: incompatible type for argument 2 of ‘xdrgen_encode_fattr4_open_arguments’
> >  3446 |         if (!xdrgen_encode_fattr4_open_arguments(xdr, &nfsd_open_arguments))
> > 
> > 
> > OPEN_ARGUMENTS4 is a large structure with 5 different bitmaps in it. We
> > probably don't want to pass that by value. When the tool is dealing
> > with a struct, we should have it generate functions that take a pointer
> > instead (IMO).
> 
> Meh. xdrgen already generates pass-by-reference encoders for
> structs. The problem is actually this bit of nfs4_1.x:
> 
>    typedef open_arguments4 fattr4_open_arguments;
> 
> which generates:
> 
> bool
> xdrgen_encode_fattr4_open_arguments(struct xdr_stream *xdr, const fattr4_open_arguments value)
> {
>         return xdrgen_encode_open_arguments4(xdr, &value);
> };
> 
> So, it's a bug in the way that xdrgen handles /typedefs/ of structs,
> not in the way that it handles the structs themselves.

I've addressed this in the lkxdrgen branch on kernel.org. I'm sure
there are still bugs ;-)


-- 
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