Commit 723b2ff4 authored by Joern Engel's avatar Joern Engel

[LogFS] Clear PagePrivate when moving journal

do_logfs_journal_wl_pass() must call freeseg(), thereby clear
PagePrivate on all pages of the current journal segment.
Signed-off-by: default avatarJoern Engel <joern@logfs.org>
parent 81def6b9
...@@ -821,6 +821,7 @@ void do_logfs_journal_wl_pass(struct super_block *sb) ...@@ -821,6 +821,7 @@ void do_logfs_journal_wl_pass(struct super_block *sb)
logfs_set_segment_reserved(sb, segno); logfs_set_segment_reserved(sb, segno);
} }
/* Manually move journal_area */ /* Manually move journal_area */
freeseg(sb, area->a_segno);
area->a_segno = super->s_journal_seg[0]; area->a_segno = super->s_journal_seg[0];
area->a_is_open = 0; area->a_is_open = 0;
area->a_used_bytes = 0; area->a_used_bytes = 0;
......
...@@ -587,6 +587,7 @@ void move_page_to_btree(struct page *page); ...@@ -587,6 +587,7 @@ void move_page_to_btree(struct page *page);
int logfs_init_mapping(struct super_block *sb); int logfs_init_mapping(struct super_block *sb);
void logfs_sync_area(struct logfs_area *area); void logfs_sync_area(struct logfs_area *area);
void logfs_sync_segments(struct super_block *sb); void logfs_sync_segments(struct super_block *sb);
void freeseg(struct super_block *sb, u32 segno);
/* area handling */ /* area handling */
int logfs_init_areas(struct super_block *sb); int logfs_init_areas(struct super_block *sb);
......
...@@ -691,7 +691,7 @@ int logfs_segment_delete(struct inode *inode, struct logfs_shadow *shadow) ...@@ -691,7 +691,7 @@ int logfs_segment_delete(struct inode *inode, struct logfs_shadow *shadow)
return 0; 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 logfs_super *super = logfs_super(sb);
struct address_space *mapping = super->s_mapping_inode->i_mapping; struct address_space *mapping = super->s_mapping_inode->i_mapping;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment