Bug 83627
| Summary: | nfsd calls iget without holding BKL? | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | John Dalbec <jpdalbec> | ||||||
| Component: | kernel | Assignee: | Steve Dickson <steved> | ||||||
| Status: | CLOSED WONTFIX | QA Contact: | Brian Brock <bbrock> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 7.1 | ||||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | i686 | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2004-07-15 20:06:03 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
Created attachment 89898 [details]
Patch to nfsfh.c:find_fh_dentry
This patch adds lock_kernel/unlock_kernel around the first call to
nfsd_get_dentry.
Created attachment 89899 [details]
BUG() output from /var/log/messages
Please Upgrade to supported Release |
From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 Description of problem: If the NFS server is running a kernel patched with Chris Mason's (@SuSE.com) ReiserFS data-logging patches and sharing a ReiserFS filesystem, rebooting the server while clients have outstanding reads/writes causes a BUG(). According to Chris Mason, the BUG() indicates that even the unpatched kernel is not holding the BKL when it should. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Patch kernel with data-logging patches. 2. Install patched SMP kernel on NFS server. 3. Share ReiserFS filesystem from NFS server. 4. Start processes reading/writing this filesystem on the NFS client(s). 5. Reboot NFS server. Actual Results: Server knfsd processes and client processes hang. Expected Results: The knfsd processes should resume NFS service normally. Additional info: Chris Mason writes: > Traditionally, the BKL is supposed to be held when iget or iget4 is > called. RedHat might have patches that do away with that and simply > missed reiserfs, but it is more likely they have a patch to reduce > BKL use in NFS that missed the iget4 case. > > So your two basic choices are adding the BKL to reiserfs_read_inode2, > or going into the nfsd source and putting them around the iget4 call. and: > Even though the check is only introduced in the data logging code, > the non-data logging code needs the BKL in search_by_key all the > time. The find_fh_dentry code calls nfsd_get_dentry twice. In the second call the BKL is held; so it seems to me that the Right Way(TM) to fix this is to lock the kernel during the first call as well. I'll attach a patch. You may, of course, disagree and prefer to patch reiserfs_read_inode2 to hold the BKL during search_item() (which is #define'd as search_by_key()).