Skip to content

Commit

Permalink
[LogFS] Clear PagePrivate when moving journal
Browse files Browse the repository at this point in the history
do_logfs_journal_wl_pass() must call freeseg(), thereby clear
PagePrivate on all pages of the current journal segment.

Signed-off-by: Joern Engel <[email protected]>
  • Loading branch information
Joern Engel committed Mar 28, 2010
1 parent 81def6b commit 723b2ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions fs/logfs/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions fs/logfs/logfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion fs/logfs/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 723b2ff

Please sign in to comment.