2004-03-08 18:43:07

by Lever, Charles

[permalink] [raw]
Subject: [PATCH] 2.6 NFS O_DIRECT: should drop inode semaphore

hi trond-

the NFS O_DIRECT path is completely synchronous, as you know.
the VFS layer holds the inode semaphor while calling a file
system's direct_IO method, so this serializes all NFS direct
reads and writes.

i've attached a patch that drops the inode semaphor during
direct reads and writes. this patch compiles, and the
methodology has been tested in 2.4. i'd like you to include
this patch in your NFS4_ALL patch to get wider testing before
we ask andrew to include this change in 2.6 kernels.

some have voiced concerns about the combination of O_APPEND
and O_DIRECT, and i've added some logic to address that.

also, i've removed a redundant attribute revalidation.

patch is against 2.6.4-rc2. comments welcome.


Attachments:
01-odirect.patch (1.66 kB)
01-odirect.patch