[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150326.001932.746965246564732016.konishi.ryusuke@lab.ntt.co.jp>
Date: Thu, 26 Mar 2015 00:19:32 +0900 (JST)
From: Ryusuke Konishi <konishi.ryusuke@....ntt.co.jp>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, linux-nilfs@...r.kernel.org,
Ryusuke Konishi <konishi.ryusuke@....ntt.co.jp>,
Dan Carpenter <dan.carpenter@...cle.com>, kbuild@...org
Subject: Re: [PATCH 5/7] nilfs2: add bmap function to seek a valid key
Hi Andrew,
On Thu, 12 Mar 2015 23:38:12 +0900, Ryusuke Konishi wrote:
> Add a new bmap function, nilfs_bmap_seek_key(), which seeks a valid
> entry and returns its key starting from a given key. This function
> can be used to skip hole blocks efficiently.
>
> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@....ntt.co.jp>
> ---
<snip>
> +static int nilfs_btree_seek_key(const struct nilfs_bmap *btree, __u64 start,
> + __u64 *keyp)
> +{
> + struct nilfs_btree_path *path;
> + const int minlevel = NILFS_BTREE_LEVEL_NODE_MIN;
> + int ret;
> +
> + if (start > NILFS_BTREE_KEY_MAX)
> + return -ENOENT;
Could you apply the following amendment ?
I've got a report from Dan Carpenter that this range check causes a
warning:
fs/nilfs2/btree.c:1611 nilfs_btree_seek_key() warn: impossible condition '(start > (~0)) => (0-u64max > u64max)'
A range check was needed there in a wip patch, but we no longer need
it.
Thanks,
Ryusuke Konishi
--
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
index 841d177..059f371 100644
--- a/fs/nilfs2/btree.c
+++ b/fs/nilfs2/btree.c
@@ -1608,9 +1608,6 @@ static int nilfs_btree_seek_key(const struct nilfs_bmap *btree, __u64 start,
const int minlevel = NILFS_BTREE_LEVEL_NODE_MIN;
int ret;
- if (start > NILFS_BTREE_KEY_MAX)
- return -ENOENT;
-
path = nilfs_btree_alloc_path();
if (!path)
return -ENOMEM;
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists