From: "Jon Smirl" <jonsmirl@gmail.com>
To: "Jan Kara" <jack@suse.cz>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
"Chuck Lever" <chuck.lever@oracle.com>,
linux-fsdevel@vger.kernel.org
Subject: Re: Beagle and logging inotify events
Date: Thu, 15 Nov 2007 15:14:58 -0500 [thread overview]
Message-ID: <9e4733910711151214i10080098v5c2f84545d7d68eb@mail.gmail.com> (raw)
In-Reply-To: <20071115195945.GB31475@duck.suse.cz>
On 11/15/07, Jan Kara <jack@suse.cz> wrote:
> On Wed 14-11-07 14:38:05, J. Bruce Fields wrote:
> > On Wed, Nov 14, 2007 at 12:32:45PM -0700, Andreas Dilger wrote:
> > > On Nov 14, 2007 11:32 -0500, Chuck Lever wrote:
> > > > I disagree: we don't need a "bullet-proof" log. We can get a significant
> > > > performance improvement even with a permanent dnotify log implemented in
> > > > user-space. We already have well-defined fallback behavior if such a log
> > > > is missing or incomplete.
> > > >
> > > > The problem with a permanent inotify log is that it can become unmanageably
> > > > enormous, and a performance problem to boot. Recording at that level of
> > > > detail makes it more likely that the logger won't be able to keep up with
> > > > file system activity.
> > > >
> > > > A lightweight solution gets us most of the way there, is simple to
> > > > implement, and doesn't introduce many new issues. As long as it can tell
> > > > us precisely where the holes are, it shouldn't be a problem.
> > >
> > > Jan Kara is working on a patch for ext4 which would store a recursive
> > > timestamp for each directory that gives the latest time that a file in
> > > that directory was modified. ZFS has a similar mechanism by virtue of
> > > doing full-tree updates during COW of all the metadata blocks and storing
> > > the most recent transaction number in each block. I suspect btrfs could
> > > do the same thing easily.
> > >
> > > That would allow recursive-descent filesystem traversal to be much more
> > > efficient because whole chunks of the filesystem tree can be ignored during
> > > scans.
> >
> > The problem is that people may not be happy with the random behavior of
> > hardlinks, right?
> The kernel part has this non-determinism with hardlinks but it can be
> worked-around in userspace (and actually if you watch the whole filesystem
> you don't care about the non-determinism at all because you are guaranteed
> there is *at least one* path which indicates the file was modified). I'm
> planning to write a userspace library which would mostly hide the
> problems with hardlinks (and also problems with the fact that scanner may
> not have enough rights to set inode flags pointed out by Ted) from
> applications...
>
> Honza
>
> BTW: Where did this discussion started? Googling the subject gives me just
> one news message...
Linus made comments about it on the git list which restarted it.
Beagle's writing to the xattrs makes git think the file has been
changed. It was really a fs question not git so I forwarded it to this
group. Git wouldn't have a problem if there was a way for Beagle to
avoid using the xattrs.
Discussion of the general problem have been going on for a long time
and has caused the creation of dnofity and inotify. But the problem is
still not completely solved since there are these windows where files
can change and the tracker (beagle or other apps) is not aware of the
change.
My thoughts are that the kernel implementation of inotify should be
extended to support checkpoints and replay of events after the
checkpoint. How the file systems or kernel implement this is a harder
problem.
I do know for sure that many people are greatly annoyed by Beagle
beating away on their disk after each boot.
> --
> Jan Kara <jack@suse.cz>
> SUSE Labs, CR
>
--
Jon Smirl
jonsmirl@gmail.com
next prev parent reply other threads:[~2007-11-15 20:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-14 0:04 Beagle and logging inotify events Jon Smirl
2007-11-14 13:29 ` Chuck Lever
2007-11-14 13:44 ` Jon Smirl
2007-11-14 14:41 ` Chuck Lever
2007-11-14 15:01 ` Jon Smirl
2007-11-14 16:32 ` Chuck Lever
2007-11-14 17:46 ` Jon Smirl
2007-11-14 19:32 ` Andreas Dilger
2007-11-14 19:38 ` J. Bruce Fields
2007-11-15 19:59 ` Jan Kara
2007-11-15 20:14 ` J. Bruce Fields
2007-11-15 20:14 ` Jon Smirl [this message]
2007-11-14 15:30 ` Andi Kleen
2007-11-14 19:09 ` J. Bruce Fields
2007-11-14 19:22 ` Jon Smirl
2007-11-14 19:30 ` J. Bruce Fields
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=9e4733910711151214i10080098v5c2f84545d7d68eb@mail.gmail.com \
--to=jonsmirl@gmail.com \
--cc=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).