From: Alex Larsson <alexl@redhat.com>
To: <linux-kernel@vger.kernel.org>
Cc: <alexl@redhat.com>
Subject: Directory notification problem
Date: Tue, 2 Oct 2001 22:18:08 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.33.0110022206100.29931-100000@devserv.devel.redhat.com> (raw)
I discovered a problem with the dnotify API while fixing a FAM bug today.
The problem occurs when you want to watch a file in a directory, and that
file is changed several times in the same second. When I get the directory
notify signal on the directory I need to stat the file to see if the
change was actually in the file. If the file already changed in the
current second the stat() result will be identical to the previous stat()
call, since the resolution of mtime and ctime is one second.
This leads to missed notifications, leaving clients (such as Nautilus or
Konqueror) displaying an state not representing the current state.
The only userspace solutions I see is to delay all change notifications to
the end of the second, so that clients always read the correct state. This
is somewhat countrary to the idea of FAM though, as it does not give
instant feedback.
Is there any possibility of extending struct stat with a generation
counter? Or is there another solution to this problem?
/ Alex
Please CC any reply to me, i'm not on the list.
next reply other threads:[~2001-10-03 2:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-03 2:18 Alex Larsson [this message]
2001-10-03 11:49 ` Padraig Brady
2001-10-05 19:18 ` Pavel Machek
2001-10-05 21:08 ` Alex Larsson
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=Pine.LNX.4.33.0110022206100.29931-100000@devserv.devel.redhat.com \
--to=alexl@redhat.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
all inboxes | Powered by JetHome®