[lkml]   [2007]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch 0/6][RFC] Cleanup FIBMAP
    Zach Brown wrote:
    >> Can you clarify what you mean above with an example? I don't really
    >> follow.
    > Sure, take 'tar' as an example. It'll read files in the order that
    > their names are returned from directory listing. This can produce bad
    > IO patterns because the order in which the file names are returned
    > doesn't match the order of the file's blocks on disk. (htree, I'm
    > looking at you!)
    > People have noticed that tar-like loads can be sped up greatly just by
    > sorting the files by their inode number as returned by stat(), never
    > mind the file blocks themselves. One example of this is Chris Mason's
    > 'acp'.
    > The logical extension of that is to use FIBMAP to find the order of file
    > blocks on disk and then doing IO on blocks in sorted order. It'd take
    > work to write an app that does this reliably, sure.
    > In this use the application doesn't actually care what the absolute
    > numbers are. It cares about their ordering. File systems would be able
    > to chose whatever scheme they wanted for the actual values of the
    > results from a FIBMAP-alike as long as the sorting resulted in the right
    > IO patterns.
    > Arguing that this use is significant enough to justify an addition to
    > the file system API is a stretch. I'm just sharing the observation.
    > - z

    I use FIBMAP support for a few different things.

    The first is to exactly the case that you describe above where we can
    use the first block of a file extracted by FIBMAP to produce an optimal
    sorting for the read order. My testing showed that the cost of the
    extra fibmap was not too high compared to the speedup, but it was not a
    huge gain over the speedup gained when the read was done in inode sorted

    The second use case is to look at the physical layout of blocks on disk
    for a specific file, use Mark Lord's write_long patches to inject a disk
    error and then read that file to make sure that we are handling disk IO
    errors correctly. A bit obscure, but really quite useful.

    We have also used FIBMAP a few times to try and map an observed IO error
    back to a file. Really slow and painful to do, but should work on any
    file system when a better method is not supported.

    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: 2007-10-31 12:09    [W:0.021 / U:26.944 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site