lkml.org 
[lkml]   [2004]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] cowlinks v2
    Pavel Machek wrote:
    > Actually, my solution has one weirdness...
    >
    > > a
    > copyfile a b
    > rm a
    >
    > ...now 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 majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

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