public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Florian Philipp <lists@f_philipp.fastmail.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] kernel notification of file system changes
Date: Wed, 05 May 2010 19:24:21 +0200	[thread overview]
Message-ID: <4BE1A9C5.5090709@f_philipp.fastmail.net> (raw)
In-Reply-To: <07250F7A-39A9-4417-A0E8-CBCD4E8CDDC6@stellar.eclipse.co.uk>

[-- Attachment #1: Type: text/plain, Size: 1534 bytes --]

Am 05.05.2010 15:34, schrieb Stroller:
> 
> On 5 May 2010, at 07:54, Iain Buchanan wrote:
>> ...
>> I'm looking for some kernel-based notification of changes to my file
>> system.  I've been looking at inotify, but it's not exactly what I want.
>>
>> Basically I want to know if _any_ write occurs anywhere.  I don't want
>> to register a whole bunch of files to watch, I just want to watch an
>> entire mount.
> 
> man inotify(7):
> ... When a directory is monitored, inotify will return events for the
> directory itself, and for files inside the directory.
> 
> 
> Am I missing something?
> 
> 
> This article was posted to a different froup recently:
> http://www.ibm.com/developerworks/linux/library/l-inotify/index.html
> It looks interesting.
> 
> 
> Stroller.
> 

To repeat my comment on Iain's original "backup to a cold-swap drive"
thread, Inotify has two drawbacks which make it hard or even impossible
to use for Iain's use case:

a) It does not work recursively which means that you have to create a
new handle for each subdirectory. Of course, this only means more work
for the programmer but there is also the problem that

b) As far as I know, Inotify does not scale very good, at least not good
enough to monitor a whole system. /proc/sys/fs/inotify/max_user_watches
is 65535 on my system.

On the other hand, I've never tried to increase that limit and just let
it run on a deep directory structure. Who knows, maybe it actually works.

Hope this helps,
Florian Philipp


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2010-05-05 18:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-05  6:54 [gentoo-user] kernel notification of file system changes Iain Buchanan
2010-05-05  7:12 ` Bill Kenworthy
2010-05-05 23:29   ` Iain Buchanan
2010-05-05 23:33     ` Volker Armin Hemmann
2010-05-05 23:51       ` Iain Buchanan
2010-05-05 23:59         ` Volker Armin Hemmann
2010-05-05 13:34 ` Stroller
2010-05-05 17:24   ` Florian Philipp [this message]
2010-05-05 17:35     ` Stroller
2010-05-05 23:51       ` Iain Buchanan
2010-05-06 14:22         ` Stroller
2010-05-05 15:02 ` Helmut Jarausch
2010-05-05 23:24   ` Iain Buchanan
2010-05-06  2:17     ` Iain Buchanan

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=4BE1A9C5.5090709@f_philipp.fastmail.net \
    --to=lists@f_philipp.fastmail.net \
    --cc=gentoo-user@lists.gentoo.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