[lkml]   [2004]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] cowlinks v2
    Pavel Machek wrote:
    > Actually, my solution has one weirdness...
    > > a
    > copyfile a b
    > rm a
    > b has pointer to cowid with usage count of 1. Which is slightly
    > ugly (and wastes one cowid entry), but should be harmless.

    That's necessary, unless the cowid object has a linked list of all the
    inodes which point to it, a bit like inodes having a linke list of all
    parent directories which point to them. That's not impossible, but
    leaving the unnecessary cowid object is much simpler and will result
    in less I/O (no doubly-linked list to update). It can be garbage
    collected when the last reference is followed to it.

    > > get_data_id() is one way to detect equivalent files. Another would be
    > > a function files_equal(fd1, fd2) which returns a boolean.
    > files_equal(...) would lead to quadratic number of calls, no?

    Yes. </blush>

    -- Jamie
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:02    [W:0.020 / U:7.112 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site