* [PATCH] ext4:Fix a bug in 6d9c85eb.
@ 2011-05-10 11:31 Yongqiang Yang
2011-05-10 12:34 ` Lukas Czerner
0 siblings, 1 reply; 2+ messages in thread
From: Yongqiang Yang @ 2011-05-10 11:31 UTC (permalink / raw)
To: linux-ext4; +Cc: tytso, Yongqiang Yang
In case blocksize < pagesize, ext4_ext_fiemap_cb need to ignore
blocks which are not in request range.
BUG description:
xfstests 225 ended in a endless loop without this patch
when blocksize < pagesize.
Reported-by: Amir Goldstein <amir73il@users.sf.net>
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
fs/ext4/extents.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index e363f21..ec37109 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3718,9 +3718,14 @@ out:
bh = head;
do {
+ if (end < newex->ec_block)
+ /* The buffer is not in
+ * the request range.
+ */
+ continue;
if (buffer_mapped(bh)) {
/* get the 1st mapped buffer. */
- if (end > newex->ec_block +
+ if (end >= newex->ec_block +
newex->ec_len)
/* The buffer is out of
* the request range.
--
1.7.5.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ext4:Fix a bug in 6d9c85eb.
2011-05-10 11:31 [PATCH] ext4:Fix a bug in 6d9c85eb Yongqiang Yang
@ 2011-05-10 12:34 ` Lukas Czerner
0 siblings, 0 replies; 2+ messages in thread
From: Lukas Czerner @ 2011-05-10 12:34 UTC (permalink / raw)
To: Yongqiang Yang; +Cc: linux-ext4, tytso
On Tue, 10 May 2011, Yongqiang Yang wrote:
The commit subject is really useless, could you be more specific ? and
possibly more descriptive in commit description ?
Thanks!
-Lukas
> In case blocksize < pagesize, ext4_ext_fiemap_cb need to ignore
> blocks which are not in request range.
>
> BUG description:
> xfstests 225 ended in a endless loop without this patch
> when blocksize < pagesize.
>
> Reported-by: Amir Goldstein <amir73il@users.sf.net>
> Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
> ---
> fs/ext4/extents.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index e363f21..ec37109 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -3718,9 +3718,14 @@ out:
>
> bh = head;
> do {
> + if (end < newex->ec_block)
> + /* The buffer is not in
> + * the request range.
> + */
> + continue;
> if (buffer_mapped(bh)) {
> /* get the 1st mapped buffer. */
> - if (end > newex->ec_block +
> + if (end >= newex->ec_block +
> newex->ec_len)
> /* The buffer is out of
> * the request range.
>
--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-10 12:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-10 11:31 [PATCH] ext4:Fix a bug in 6d9c85eb Yongqiang Yang
2011-05-10 12:34 ` Lukas Czerner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox