From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Shen Feng <shen@cn.fujitsu.com>
Cc: linux-ext4@vger.kernel.org, Theodore Tso <tytso@MIT.EDU>,
Mingming Cao <cmm@us.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/2] ext4: Make ext4_ext_find_extent fills ext_path completely
Date: Wed, 11 Jun 2008 17:13:44 +0530 [thread overview]
Message-ID: <20080611114344.GF9008@skywalker> (raw)
In-Reply-To: <484F68BE.8040203@cn.fujitsu.com>
On Wed, Jun 11, 2008 at 01:55:10PM +0800, Shen Feng wrote:
> When pos=0 or depth, the fields of ext4_ext_path is not
> completely filled.
> This patch also removes some unnecessary code.
>
> Signed-off-by: Shen Feng <shen@cn.fujitsu.com>
> ---
> fs/ext4/extents.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index d4f76d7..ff609df 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -524,6 +524,7 @@ ext4_ext_find_extent(struct inode *inode, ext4_lblk_t block,
> alloc = 1;
> }
> path[0].p_hdr = eh;
> + path[0].p_bh = NULL;
We did a kzalloc before. So do we need this ?
>
> i = depth;
> /* walk through the tree */
> @@ -552,12 +553,11 @@ ext4_ext_find_extent(struct inode *inode, ext4_lblk_t block,
> }
>
> path[ppos].p_depth = i;
> - path[ppos].p_hdr = eh;
This is needed. Because we look at extent_header in ext_binsearch.
> - path[ppos].p_ext = NULL;
> path[ppos].p_idx = NULL;
>
> /* find extent */
> ext4_ext_binsearch(inode, path + ppos, block);
> + path[ppos].p_block = ext4_ext_pblock(path[ppos].p_ext);
>
> ext4_ext_show_path(inode, path);
>
-aneesh
next prev parent reply other threads:[~2008-06-11 11:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-11 5:55 [PATCH 2/2] ext4: Make ext4_ext_find_extent fills ext_path completely Shen Feng
2008-06-11 11:43 ` Aneesh Kumar K.V [this message]
2008-06-12 0:28 ` Shen Feng
2008-06-12 22:27 ` Mingming Cao
2008-06-13 5:40 ` Shen Feng
2008-06-13 6:47 ` Shen Feng
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=20080611114344.GF9008@skywalker \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=cmm@us.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=shen@cn.fujitsu.com \
--cc=tytso@MIT.EDU \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).