mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: davidsen@tmr.com (bill davidsen)
To: linux-kernel@vger.kernel.org
Subject: Re: Kernel Compile in tmpfs crumples in 2.4.12 w/epoll patch
Date: Mon, 22 Oct 2001 13:31:09 -0400	[thread overview]
Message-ID: <200110221731.f9MHV9r15979@deathstar.prodigy.com> (raw)
In-Reply-To: <20011022.082935.74750744.wscott@bitmover.com>

In article <20011022.082935.74750744.wscott@bitmover.com> wscott@bitmover.com asked:

| So if I am adding files while reading the directory the directory
| structure gets rewritten and I might return files more than once?
| What happens if files are being deleted?  Can files be skipped?!?
| 
| Any reason we have never seen this on ext2 on other filesystems on 10+
| versions of UNIX?  BitKeeper is pretty paranoid and includes a lot of
| sanity checks.

  I think you can see this on any typical UNIX directory. Assume that a
directory is created with some number of entries. Assume then that the
first ten or so are deleted. Then start your program doing readdir().
After reading a few entries, create a file in that directory. When the
deleted directory entry is reused you have already read past it, and
will not see it until the next time you read the directory.

  Obviously there is a timing window here, but I used to see this with
usenet news when each article was in a separate file and files were
created and deleted in large numbers. Missing a file doesn't seem to be
a problem, because the behaviour is the same as if the file were created
after the readdir() pass, but getting the same directory entry more than
once is likely to produce anything from confusing output to serious
malfunction, depending on what's done with the informaction.

-- 
bill davidsen <davidsen@tmr.com>
  His first management concern is not solving the problem, but covering
his ass. If he lived in the middle ages he'd wear his codpiece backward.

      reply	other threads:[~2001-10-22 17:30 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-19  0:06 David E. Weekly
2001-10-19  0:22 ` Davide Libenzi
2001-10-19  1:26   ` safemode
2001-10-19  5:12     ` Daniel T. Chen
2001-10-19  8:28 ` Christoph Rohland
2001-10-20 15:17   ` Jan-Frode Myklebust
2001-10-21  8:25     ` Christoph Rohland
2001-10-21 10:07       ` Jan-Frode Myklebust
2001-10-20 22:35         ` wild pointer!!!!! Kalyan
2001-10-21 12:15         ` Kernel Compile in tmpfs crumples in 2.4.12 w/epoll patch safemode
2001-10-21 12:21         ` wild pointer!!!!! Paul Mackerras
     [not found]         ` <E15vHVx-0001Nc-00@ii.uib.no>
2001-10-21 12:34           ` Kernel Compile in tmpfs crumples in 2.4.12 w/epoll patch Jan-Frode Myklebust
2001-10-21 12:53             ` safemode
     [not found]             ` <E15vI6n-0001oC-00@ii.uib.no>
2001-10-21 13:10               ` bk regression fails on tmpfs /tmp, was: " Jan-Frode Myklebust
2001-10-21 13:36                 ` safemode
2001-10-21 16:35       ` Larry McVoy
2001-10-21 17:50         ` Linus Torvalds
2001-10-21 20:15           ` Daniel Phillips
2001-10-22 17:03           ` bill davidsen
2001-10-22 17:12             ` Larry McVoy
2001-10-22 17:29               ` Alexander Viro
2001-10-23  5:25               ` Keith Owens
2001-10-22  9:44         ` Christoph Rohland
2001-10-22 10:01           ` Alexander Viro
2001-10-30 17:29             ` Theodore Tso
2001-10-22 13:29           ` Wayne Scott
2001-10-22 17:31             ` bill davidsen [this message]

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=200110221731.f9MHV9r15979@deathstar.prodigy.com \
    --to=davidsen@tmr.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

Powered by JetHome