All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: ext4 not currently doing (much) multi-block allocation?
Date: Sun, 15 Feb 2009 16:12:03 -0500	[thread overview]
Message-ID: <20090215211203.GF10706@mini-me.lan> (raw)
In-Reply-To: <20090215173629.GF22585@skywalker>

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

      parent reply	other threads:[~2009-02-15 21:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-15  5:32 ext4 not currently doing (much) multi-block allocation? Theodore Tso
2009-02-15 11:05 ` Aneesh Kumar K.V
2009-02-15 13:36   ` Theodore Tso
2009-02-15 17:36     ` Aneesh Kumar K.V
2009-02-15 19:37       ` Eric Sandeen
2009-02-15 21:12       ` Theodore Tso [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090215211203.GF10706@mini-me.lan \
    --to=tytso@mit.edu \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.