From: Li Lingfeng <lilingfeng3@huawei.com>
To: Chuck Lever <chuck.lever@oracle.com>,
Li Lingfeng <lilingfeng@huaweicloud.com>
Cc: Donald Buczek <buczek@molgen.mpg.de>, NeilBrown <neilb@suse.de>,
Chuck Lever <cel@kernel.org>, <brauner@kernel.org>,
<linux-nfs@vger.kernel.org>, <it+linux@molgen.mpg.de>,
Hou Tao <houtao1@huawei.com>, "zhangyi (F)" <yi.zhang@huawei.com>,
yangerkun <yangerkun@huawei.com>, <chengzhihao1@huawei.com>,
"yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH v1] SUNRPC: Remove BUG_ON call sites
Date: Sat, 24 Aug 2024 10:38:27 +0800 [thread overview]
Message-ID: <82a00c5b-6cc7-35be-df92-58e11281fac4@huawei.com> (raw)
In-Reply-To: <ZsjqKNvsW35hLWEQ@tissot.1015granger.net>
在 2024/8/24 3:59, Chuck Lever 写道:
> On Fri, Aug 23, 2024 at 03:15:04PM -0400, Chuck Lever wrote:
>> On Fri, Aug 23, 2024 at 11:35:28AM +0800, Li Lingfeng wrote:
>>
>> [ snipped ]
>>
>>> [ 91.319328] Kernel panic - not syncing: Fatal exception
>>> [ 91.320712] Kernel Offset: disabled
>>> [ 91.321189] ---[ end Kernel panic - not syncing: Fatal exception ]---
>>>
>>> Both of them were introduced by commit 9f28a971ee9f ("nfsd: separate
>>> nfsd_last_thread() from nfsd_put()") since this patch changes the behavior
>>> of the error path.
>>>
>>> I confirmed this by fixing both issues with the following changes:
>>> diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
>>> index ee5713fca187..05d4b463c16b 100644
>>> --- a/fs/nfsd/nfssvc.c
>>> +++ b/fs/nfsd/nfssvc.c
>>> @@ -811,6 +811,8 @@ nfsd_svc(int nrservs, struct net *net, const struct cred
>>> *cred)
>>> if (error < 0 && !nfsd_up_before)
>>> nfsd_shutdown_net(net);
>>> out_put:
>>> + if (error < 0)
>>> + nfsd_last_thread(net);
>>> /* Threads now hold service active */
>>> if (xchg(&nn->keep_active, 0))
>>> svc_put(serv);
>>>
>>> They have been fixed by commit bf32075256e9 ("NFSD: simplify error paths in
>>> nfsd_svc()") in mainline.
>>>
>>> Maybe it would be a good idea to push it to the LTS branches.
>> To be clear, by "push it to LTS" I assume you mean apply bf32075?
>>
>> I have now applied commit bf32075256e9 ("NFSD: simplify error paths
>> in nfsd_svc()") to nfsd-6.6.y, nfsd-5.15.y, and nfsd-5.10.y in my
>> kernel.org git repo, for testing.
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git
>>
>> I will run these three against the usual NFSD CI today, but feel
>> free to try them out yourself and report your results.
>>
>> Now unfortunately 6.1.y is still "special." It appears that commit
>> 9f28a971ee9f ("nfsd: separate nfsd_last_thread() from nfsd_put()")
>> was reverted in that kernel, and the fix you mention here does not
>> cleanly apply to v6.1.106. Based on some previous comments on this
>> list, I think I need to fix up v6.1 LTS to be like the other three
>> kernels, and then apply bf32075.
> OK, I've got a candidate for v6.1.y now, too. See the nfsd-6.1.y
> branch in the above git repo.
I'm getting a compile error when trying to compile nfsd-6.1.y.
The return value of fh_fill_pre_attrs is void, but nfsd_setattr attempts
to assign its return value to a __be32 variable.
I found out that the return type of fh_fill_pre_attrs was changed in
a332018a91c4 ("nfsd: handle failure to collect pre/post-op attrs more
sanely") which hasn't been added to nfsd-6.1.y yet.
Is nfsd-6.1.y not ready yet?
fs/nfsd/vfs.c: In function ‘nfsd_setattr’:
fs/nfsd/vfs.c:536:6: error: void value not ignored as it ought to be
536 | err = fh_fill_pre_attrs(fhp);
| ^
make[3]: *** [scripts/Makefile.build:250: fs/nfsd/vfs.o] Error 1
make[3]: *** Waiting for unfinished jobs....
LD [M] fs/ubifs/ubifs.o
make[2]: *** [scripts/Makefile.build:503: fs/nfsd] Error 2
make[1]: *** [scripts/Makefile.build:503: fs] Error 2
make: *** [Makefile:2009: .] Error 2
>
next prev parent reply other threads:[~2024-08-24 2:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-19 15:35 [PATCH v1] SUNRPC: Remove BUG_ON call sites Chuck Lever
2023-09-19 22:11 ` NeilBrown
2024-06-27 12:53 ` Donald Buczek
2024-08-23 3:35 ` Li Lingfeng
2024-08-23 19:15 ` Chuck Lever
2024-08-23 19:59 ` Chuck Lever
2024-08-24 2:38 ` Li Lingfeng [this message]
2024-08-24 1:03 ` Li Lingfeng
2024-08-24 2:29 ` Li Lingfeng
-- strict thread matches above, loose matches on Subject: below --
2023-09-18 14:18 Chuck Lever
2023-09-18 14:26 ` Christian Brauner
2023-09-19 0:02 ` NeilBrown
2023-09-19 14:56 ` Chuck Lever III
2023-09-22 19:19 ` Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=82a00c5b-6cc7-35be-df92-58e11281fac4@huawei.com \
--to=lilingfeng3@huawei.com \
--cc=brauner@kernel.org \
--cc=buczek@molgen.mpg.de \
--cc=cel@kernel.org \
--cc=chengzhihao1@huawei.com \
--cc=chuck.lever@oracle.com \
--cc=houtao1@huawei.com \
--cc=it+linux@molgen.mpg.de \
--cc=lilingfeng@huaweicloud.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai3@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox