From: Linus Torvalds <torvalds@linux-foundation.org>
To: Chris Mason <chris.mason@oracle.com>
Cc: btrfs-devel@oss.oracle.com,
Paul Collins <paul@burly.ondioline.org>,
git@vger.kernel.org
Subject: Re: [Btrfs-devel] btrfs and git-reflog
Date: Fri, 25 Jan 2008 09:09:05 -0800 (PST) [thread overview]
Message-ID: <alpine.LFD.1.00.0801250905570.14161@hp.linux-foundation.org> (raw)
In-Reply-To: <200801251050.16697.chris.mason@oracle.com>
On Fri, 25 Jan 2008, Chris Mason wrote:
>
> The btrfs patch below changes my readdir code to force the
> directory f_pos field to the max offset allowed when we've
> seen all the directory entries. This prevents the readdir
> call from looping forever in the face of newly added files.
I think such a change may be sensible if we also taught the Linux VFS
layer about it (so that we could avoid the costly parts of readdir()
getting a semaphore etc the next call), but in this particular format it's
just an ugly hack for what is a git bug.
> But, git might want to add some checks to see if it has
> already processed things.
Yes indeed. This is clearly git mis-using "readdir()", and should be
fixed. It could happen on other filesystems, and very much including ones
where there is no option of just "fixing" the filesystem (including
Linux: not everybody can upgrade their kernels just because git makes
some broken assumptions).
Linus
next prev parent reply other threads:[~2008-01-25 17:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-25 8:15 btrfs and git-reflog Paul Collins
2008-01-25 9:50 ` Paul Collins
2008-01-25 15:01 ` [Btrfs-devel] " Chris Mason
2008-01-25 15:50 ` Chris Mason
2008-01-25 17:09 ` Linus Torvalds [this message]
2008-01-25 20:05 ` Junio C Hamano
2008-01-26 7:52 ` Junio C Hamano
2008-01-27 7:22 ` Linus Torvalds
2008-01-27 8:08 ` Junio C Hamano
2008-01-26 7:53 ` reflog-expire: Avoid creating new files in a directory inside readdir(3) loop Junio C Hamano
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=alpine.LFD.1.00.0801250905570.14161@hp.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=btrfs-devel@oss.oracle.com \
--cc=chris.mason@oracle.com \
--cc=git@vger.kernel.org \
--cc=paul@burly.ondioline.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;
as well as URLs for NNTP newsgroup(s).