Re: [PATCH 6.1 00/73] 6.1.119-rc1 review
From: Chuck Lever III
Date: Sat Nov 23 2024 - 11:12:54 EST
> On Nov 23, 2024, at 2:25 AM, Pavel Machek <pavel@xxxxxxx> wrote:
>
> Hi!
>
>> This is the start of the stable review cycle for the 6.1.119 release.
>> There are 73 patches in this series, all will be posted as a response
>> to this one. If anyone has any issues with these being applied, please
>> let me know.
>
>> Chuck Lever <chuck.lever@xxxxxxxxxx>
>> NFSD: Limit the number of concurrent async COPY operations
>
> @@ -1782,10 +1783,16 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
> if (nfsd4_copy_is_async(copy)) {
> - status = nfserrno(-ENOMEM);
> async_copy = kzalloc(sizeof(struct nfsd4_copy), GFP_KERNEL);
> if (!async_copy)
> goto out_err;
>
> This is wrong. Status is success from previous code, and you are now
> returning it in case of error.
This "status =" line was removed because the out_err: label
unconditionally sets status = nfserr_jukebox.
> (Also, the atomic dance does not work. It will not allow desired
> concurency in case of races. Semaphore is canonical solution for
> this.)
I'm not certain which "atomic dance" you are referring to here.
Do you mean:
1792 if (atomic_inc_return(&nn->pending_async_copies) >
1793 (int)rqstp->rq_pool->sp_nrthreads)
1794 goto out_err;
The cap doesn't have to be perfect; it just has to make sure
that the pending value doesn't underflow or overflow. Note
that this code is updated in a later patch.
Naturally we have to address any issues in upstream first, so
please report issues and propose changes to
linux-nfs@xxxxxxxxxxxxxxx <mailto:linux-nfs@xxxxxxxxxxxxxxx> . Thanks for the review!
--
Chuck Lever