All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Love <rml@tech9.net>
To: Jan Harkes <jaharkes@cs.cmu.edu>
Cc: torvalds@transmeta.com, viro@math.psu.edu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.5: further llseek cleanup (1/3)
Date: 31 Jan 2002 16:51:57 -0500	[thread overview]
Message-ID: <1012513925.3392.175.camel@phantasy> (raw)
In-Reply-To: <20020131151917.GA17060@mentor.odyssey.cs.cmu.edu>
In-Reply-To: <1012459512.3213.148.camel@phantasy>  <20020131151917.GA17060@mentor.odyssey.cs.cmu.edu>

On Thu, 2002-01-31 at 10:19, Jan Harkes wrote:

> 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).

Hmm ... the race you mention in sys_stat is the problem I saw.  I also
can't say for sure whether any code, or future code, would touch
i_size.  It is just not safe.

Note also that reverting to the remote_llseek method won't break
anything; it is the previous behavior.  Certainly I would much rather
just use the inode semaphore, but I'd prefer to not introduce any
races.  Ideally we need a solution that eliminates the BKL _and_ is not
racy.

I'd be happy to keep Coda using the new generic_file_llseek if Al Viro
agrees with you.  Al?

	Robert Love


  reply	other threads:[~2002-01-31 21:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-31  6:45 [PATCH] 2.5: further llseek cleanup (1/3) Robert Love
2002-01-31 15:19 ` Jan Harkes
2002-01-31 21:51   ` Robert Love [this message]
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=1012513925.3392.175.camel@phantasy \
    --to=rml@tech9.net \
    --cc=jaharkes@cs.cmu.edu \
    --cc=linux-kernel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.