summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/bmap.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2014-03-03 13:35:57 +0000
committerSteven Whitehouse <swhiteho@redhat.com>2014-03-03 13:50:12 +0000
commitb50f227bddf110ae4ea2df1ebdf7e282ad481803 (patch)
treee3c968ae81f8ac2c2c425b13543728a32b359d2f /fs/gfs2/bmap.h
parentfcf10d38afd2d39d08bf76c48ff9c12345770678 (diff)
downloadop-kernel-dev-b50f227bddf110ae4ea2df1ebdf7e282ad481803.zip
op-kernel-dev-b50f227bddf110ae4ea2df1ebdf7e282ad481803.tar.gz
GFS2: Clean up journal extent mapping
This patch fixes a long standing issue in mapping the journal extents. Most journals will consist of only a single extent, and although the cache took account of that by merging extents, it did not actually map large extents, but instead was doing a block by block mapping. Since the journal was only being mapped on mount, this was not normally noticeable. With the updated code, it is now possible to use the same extent mapping system during journal recovery (which will be added in a later patch). This will allow checking of the integrity of the journal before any reply of the journal content is attempted. For this reason the code is moving to bmap.c, since it will be used more widely in due course. An exercise left for the reader is to compare the new function gfs2_map_journal_extents() with gfs2_write_alloc_required() Additionally, should there be a failure, the error reporting is also updated to show more detail about what went wrong. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/bmap.h')
-rw-r--r--fs/gfs2/bmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h
index 42fea03..81ded5e 100644
--- a/fs/gfs2/bmap.h
+++ b/fs/gfs2/bmap.h
@@ -55,5 +55,7 @@ extern int gfs2_truncatei_resume(struct gfs2_inode *ip);
extern int gfs2_file_dealloc(struct gfs2_inode *ip);
extern int gfs2_write_alloc_required(struct gfs2_inode *ip, u64 offset,
unsigned int len);
+extern int gfs2_map_journal_extents(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd);
+extern void gfs2_free_journal_extents(struct gfs2_jdesc *jd);
#endif /* __BMAP_DOT_H__ */
OpenPOWER on IntegriCloud