lkml.org 
[lkml]   [2008]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 45/58] [GFS2] Fix log block mapper
Date
From: Steven Whitehouse <swhiteho@redhat.com>

A missing offset in the calculation.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>

diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index 0833e27..40c51bf 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -336,7 +336,7 @@ static u64 log_bmap(struct gfs2_sbd *sdp, unsigned int lbn)

list_for_each_entry(je, &sdp->sd_jdesc->extent_list, extent_list) {
if (lbn >= je->lblock && lbn < je->lblock + je->blocks)
- return je->dblock + lbn;
+ return je->dblock + lbn - je->lblock;
}

return -1;
--
1.5.1.2


\
 
 \ /
  Last update: 2008-01-21 11:23    [W:0.204 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site