[LogFS] Clear PagePrivate when moving journal
authorJoern Engel <joern@logfs.org>
Sun, 28 Mar 2010 16:10:07 +0000 (18:10 +0200)
committerJoern Engel <joern@logfs.org>
Sun, 28 Mar 2010 16:10:07 +0000 (18:10 +0200)
do_logfs_journal_wl_pass() must call freeseg(), thereby clear
PagePrivate on all pages of the current journal segment.

Signed-off-by: Joern Engel <joern@logfs.org>
fs/logfs/journal.c
fs/logfs/logfs.h
fs/logfs/segment.c

index 6ad30a4c9052179b4fe56da98a81f381b7a531a7..15454ac7bd934a6e5a5a110e493de46e2a018493 100644 (file)
@@ -821,6 +821,7 @@ void do_logfs_journal_wl_pass(struct super_block *sb)
                logfs_set_segment_reserved(sb, segno);
        }
        /* Manually move journal_area */
+       freeseg(sb, area->a_segno);
        area->a_segno = super->s_journal_seg[0];
        area->a_is_open = 0;
        area->a_used_bytes = 0;
index 129779431373adfbf5f674b48e26913f80986f19..b84b0eec6024d87b17079229e249668f07418400 100644 (file)
@@ -587,6 +587,7 @@ void move_page_to_btree(struct page *page);
 int logfs_init_mapping(struct super_block *sb);
 void logfs_sync_area(struct logfs_area *area);
 void logfs_sync_segments(struct super_block *sb);
+void freeseg(struct super_block *sb, u32 segno);
 
 /* area handling */
 int logfs_init_areas(struct super_block *sb);
index ff9d7f3b4d361a52defacb8be9d2a12bff524dfe..0ecd8f07c11e466b531d002fd8d2aa0900983098 100644 (file)
@@ -691,7 +691,7 @@ int logfs_segment_delete(struct inode *inode, struct logfs_shadow *shadow)
        return 0;
 }
 
-static void freeseg(struct super_block *sb, u32 segno)
+void freeseg(struct super_block *sb, u32 segno)
 {
        struct logfs_super *super = logfs_super(sb);
        struct address_space *mapping = super->s_mapping_inode->i_mapping;