lkml.org 
[lkml]   [1999]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Detecting changed files for JIT/metadata cacheing
    Rich Paul wrote:
    > > - Initial inode state is Modified.
    > > - The serial number is
    > > updated once on transition from Not-Modified to Modified -- this
    > > only happens when the file is modified and is in the
    > > Not-Modified state.
    > > I.e. normally this never happens.
    > > - The Not-Modified->Modified transition causes the parent directory
    > > to be checked -- if that's marked Not-Modified do the same thing
    > > there and so on. Again this does not usually happen, so no
    > > overhead in the usual case.
    > > - Reading the serial number sets the flag to Not-Modified.
    >

    > Ohhh ... I was thinking you'd actually be updating the serial number
    > along with the date each time the file was updated ... so basicly this
    > would only work if the program kept the file open ... or let the
    > kernel know in some other way that it was interested.

    No no again :-)

    You don't have to do anything special. You don't have to keep the file
    open or notify the kernel.

    There's simply no need to update the serial number more than once
    between checks. This is a way of avoiding wraparound due to lots of
    writes between checks.

    (Tweak: Further optimise by not incrementing the number if mtime is
    changed (unless by utime(); (can you tell I used to program Lisp(!)?)))

    -- Jamie


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:52    [W:3.303 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site