Re: [PATCH v2] nfsd: Implement large extent array support in pNFS

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

 



On Tue, Jun 10, 2025 at 02:10:46PM -0400, Chuck Lever wrote:
> On 6/9/25 9:18 PM, Sergey Bashirov wrote:
> > +	xdr_init_decode(&xdr, buf, buf->head[0].iov_base, NULL);
> > +	xdr_set_scratch_buffer(&xdr, scratch, sizeof(scratch));
>
> Consider using svcxdr_init_decode() instead.

I see that svcxdr_init_decode() does the same two steps. What I
concerned about is that it takes the top-level svc_rqst struct
and modifies it. Of course, we can pass rqstp from nfsd4_layoutcommit()
to the layout driver callback. But then we would need to make a backup
of the original xdr buffer and stream position, set up and initialize
the xdr sub-buffer, and at the end restore back the original xdr stream.
All these actions seem somewhat unnecessary and not so elegant to me.

Is it acceptable to keep the current solution in the patch or am I
missing something?

--
Sergey Bashirov




[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