[lkml]   [2006]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 2/4] pass b_size to ->get_block()
    Badari Pulavarty <> wrote:
    > Pass amount of disk needs to be mapped to get_block().
    > This way one can modify the fs ->get_block() functions
    > to map multiple blocks at the same time.

    I can't say I terribly like this patch. Initialising b_size all over the
    place seems fragile.

    We're _already_ setting bh.b_size to the right thing in
    alloc_page_buffers(), and for a bh which is attached to
    pagecache_page->private, there's no reason why b_size would ever change.

    So what I think I'll do is to convert those places where you're needlessly
    assigning to b_size into temporary WARN_ON(b_size != blocksize).

    The only place where we need to initialise b_size is where we've got a
    non-pagecache bh allocated on the stack.

    We need to be sure that no ->get_block() implementations write garbage into
    bh->b_size if something goes wrong. b_size on a pagecache-based
    buffer_head must remain inviolate.

    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: 2006-03-02 02:53    [W:0.045 / U:72.044 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site