From: Jan Harkes <jaharkes@cs.cmu.edu>
To: Robert Love <rml@tech9.net>
Cc: torvalds@transmeta.com, viro@math.psu.edu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.5: further llseek cleanup (1/3)
Date: Thu, 31 Jan 2002 10:19:17 -0500 [thread overview]
Message-ID: <20020131151917.GA17060@mentor.odyssey.cs.cmu.edu> (raw)
In-Reply-To: <1012459512.3213.148.camel@phantasy>
In-Reply-To: <1012459512.3213.148.camel@phantasy>
On Thu, Jan 31, 2002 at 01:45:12AM -0500, Robert Love wrote:
> The 'push locking into llseek methods' patch was integrated into 2.5.3.
> The networking filesystems, however, do not protect i_size and can not
> rely on the inode semaphore used in generic_file_llseek.
I'm not sure whether the Coda part of this patch is correct. Coda does
rely in the inode semaphore to protect from concurrency between the
userspace cachemanager that accesses the file on the host filesystem
directly and the applications that access the same file through the
/coda mount.
See for instance coda_file_write, where we also use the host inode
semaphore for protection. Only sys_stat() accesses i_size unprotected,
but that doesn't matter much in my opinion. Any application relying on
the result of sys_stat to do appending or subsequent lseeks would be
racy anyways. (and it can only be fixed correctly when we get a FS
specific getattr method).
Jan
So in my opinion, if your patch got applied, the Coda part needs to be
reverted.
#patch -R -p1 << EOF
diff -urN linux-2.5.3/fs/coda/file.c linux/fs/coda/file.c
--- linux-2.5.3/fs/coda/file.c Thu Jan 31 01:08:54 2002
+++ linux/fs/coda/file.c Thu Jan 31 01:09:47 2002
@@ -267,7 +267,7 @@
}
struct file_operations coda_file_operations = {
- llseek: generic_file_llseek,
+ llseek: remote_llseek,
read: coda_file_read,
write: coda_file_write,
mmap: coda_file_mmap,
EOF
next prev parent reply other threads:[~2002-01-31 15:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-31 6:45 Robert Love
2002-01-31 15:19 ` Jan Harkes [this message]
2002-01-31 21:51 ` Robert Love
2002-01-31 21:51 ` Alexander Viro
2002-01-31 22:04 ` Robert Love
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=20020131151917.GA17060@mentor.odyssey.cs.cmu.edu \
--to=jaharkes@cs.cmu.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=rml@tech9.net \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/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
all inboxes | Powered by JetHome®