Bug 70625 - Need lock-free generic_file_write equivalent.
Need lock-free generic_file_write equivalent.
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: kernel (Show other bugs)
2.1
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Larry Woodman
Brian Brock
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-08-02 17:54 EDT by Tim Wright
Modified: 2007-11-30 17:06 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-09-23 17:03:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tim Wright 2002-08-02 17:54:55 EDT
Description of Problem:
If a filesystem which uses the standard page cache routines needs a per-inode
lock in (amongst others) its fsync and write file_operations, then an ABBA
deadlock occurs between file_fsync() and sys_write().  The former grabs i_sem
and then calls the filesystem's fsync routine, which grab the filesystem's
per-inode lock; the latter calls the filesystem's write routine, which grabs the
filesystem's per-inode lock and then calls generic_file_write(), which grabs
i_sem. Provision of a __generic_file_write() entry point which assumes i_sem is
already held would allow the filesystem's write routine to grab i_sem then grab
the per-inode lock, preserving the locking order the VFS locks preceded
filesystem locks.

I am working on a clustered filesystem that has such a requirenment and am
requesting that this otherwise benign change be made.

Version-Release number of selected component (if applicable):
All kernels.

How Reproducible:
N/A

Steps to Reproduce:
1. N/A
2. 
3. 

Actual Results:


Expected Results:


Additional Information:
Comment 1 Arjan van de Ven 2002-08-16 08:29:01 EDT
Feel free to send us the source of said filesystem under a GPL license and we'll
see what we can do
Comment 2 Tim Wright 2002-09-23 17:03:16 EDT
I'm not the copyright owner, so I can't change the licensing. However, I should
point out that this change has been made in the 2.5 development kernel to
support XFS now that it is using the kernel's buffer/page cache rather than its
own, so I  assert that this change is generally useful.

Regards,

Tim

Note You need to log in before you can comment on or make changes to this bug.