[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090215211203.GF10706@mini-me.lan>
Date: Sun, 15 Feb 2009 16:12:03 -0500
From: Theodore Tso <tytso@....edu>
To: "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Cc: linux-ext4@...r.kernel.org
Subject: Re: ext4 not currently doing (much) multi-block allocation?
On Sun, Feb 15, 2009 at 11:06:29PM +0530, Aneesh Kumar K.V wrote:
>
> That bh>b_size indicate multiple blocks.
>
> we do the below in mpage_add_bh_to_extent
>
> 2024 if (logical == next && (bh->b_state & BH_FLAGS) == lbh->b_state) {
> 2025 lbh->b_size += b_size;
> 2026 return;
> 2027 }
>
Urgh, right. mpd->lbh isn't a real struct buffer_head at all; the
only fields we use out of it is b_size, b_state, and b_blocknr. I
really dislike this coding style; it's hard to tell what is a real
buffer_head, and what is a fake buffer_head. It also wastes about 200
bytes of kernel stack space.
There's a similar problem with bh_result; in which functions is it a
real buffer head (and must be a real buffer head), and in which
functions is it a fake buffer head, and which functions is it
sometimes a real buffer_head, and when it is a fake buffer_head? This
is one of those things which makes for hard-to-maintain code.
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists