public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Anton Altaparmakov <aia21@cantab.net>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch 13/13] lseek speedup
Date: Wed, 17 Jul 2002 09:49:40 -0700	[thread overview]
Message-ID: <3D35A024.1635E12E@zip.com.au> (raw)
In-Reply-To: 5.1.0.14.2.20020717171311.00b00380@pop.cus.cam.ac.uk

Anton Altaparmakov wrote:
> 
> >  Now, why are we taking i_sem for lseek/readdir
> >exclusion and not a per-file lock?
> 
> Because it also excludes against directory modifications, etc. Just imagine
> what "rm somefile" or "mv somefile otherfile" or "touch newfile" would do
> to the directory contents and what a concurrent readdir() would do... A
> very loud *BANG* is the only thing that springs to mind...

That's different.  i_size, contents of things, yes - i_sem for
those.

But protection of struct file should not be via any per-inode thing.

> btw. the directory modification locking rules are written up in
> Documentation/filesystems/directory-locking by our very own VFS maintainer
> Al Viro himself... (-;

Doesn't cover lseek...

-

  reply	other threads:[~2002-07-17 16:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-17  5:31 [patch 13/13] lseek speedup Andrew Morton
2002-07-17  9:45 ` Anton Altaparmakov
2002-07-17 16:18   ` Andrew Morton
2002-07-17 16:20     ` Anton Altaparmakov
2002-07-17 16:49       ` Andrew Morton [this message]
2002-07-17 18:07         ` Anton Altaparmakov
2002-07-22  7:16           ` Andrew Morton
2002-07-22  7:43             ` Anton Altaparmakov
2002-07-17 18:27         ` Benjamin LaHaise
2002-07-17 10:54 ` Anton Altaparmakov

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=3D35A024.1635E12E@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=aia21@cantab.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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