This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] BZ #14906: Enhance nscd's inotify support.

On 02/19/2015 10:54 AM, Carlos O'Donell wrote:
> On 02/18/2015 01:22 AM, Carlos O'Donell wrote:
>> Tested extensively, though manually, on x86_64 with no regressions and no
>> problems detected. Underscores the need for a better testing framework than
>> what we have.
> If nobody objects I'll check this in next week.
> During kernel testing I tested on a 2.6.32 kernel and discovered that
> the file removal and creation notification events are out of order.
> This requires a stat-based check in inotify_check_files() to double-check
> if the file is present, if it is, then the move/delete/unregister event
> is ignored and the file continues to be monitored. If we lost an event
> the stat check during pruning will detect the file change.
> v2 
> - Use stat to double check a move/delete/unregister event.


commit cf9313e7d1dd42addd6cf8c9277f0f18a62cdeff
Author: Carlos O'Donell <>
Date:   Fri Mar 13 09:49:24 2015 -0400

    Enhance nscd's inotify support (Bug 14906).
    In bug 14906 the user complains that the inotify support in nscd
    is not sufficient when it comes to detecting changes in the
    configurationfiles that should be watched for the various databases.
    The current nscd implementation uses inotify to watch for changes in
    the configuration files, but adds watches only for IN_DELETE_SELF and
    IN_MODIFY. These watches are insufficient to cover even the most basic
    uses by a system administrator. For example using emacs or vim to edit
    a configuration file should trigger a reload but it might not if
    the editors use move to atomically update the file. This atomic update
    changes the inode and thus removes the notification on the file (as
    inotify is based on inodes). Thus the inotify support in nscd for
    configuration files is insufficient to account for the average use
    cases of system administrators and users.
    The inotify support is significantly enhanced and described here:
    Tested on x86_64 with and without inotify support.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]