aboutsummaryrefslogtreecommitdiffstats
path: root/fs/logfs/journal.c
diff options
context:
space:
mode:
authorJoern Engel <joern@logfs.org>2010-03-04 15:30:58 -0500
committerJoern Engel <joern@logfs.org>2010-03-04 15:30:58 -0500
commit9421502b4fc894cc477be8fc49776830e37ca157 (patch)
tree9c9b1bfa42b2acdf4b5e080a256c3cd37852a94f /fs/logfs/journal.c
parent5c564c2a04d4bb6ba79eeb83bd06de584479f362 (diff)
[LogFS] Fix bdev erases
Erases for block devices were always just emulated by writing 0xff. Some time back the write was removed and only the page cache was changed to 0xff. Superficialy a good idea with two problems: 1. Touching the page cache isn't necessary either. 2. However, writing out 0xff _is_ necessary for the journal. As the journal is scanned linearly, an old non-overwritten commit entry can be used on next mount and cause havoc. This should fix both aspects.
Diffstat (limited to 'fs/logfs/journal.c')
-rw-r--r--fs/logfs/journal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/logfs/journal.c b/fs/logfs/journal.c
index 2f2e8e4fd02d..c0e7d63221d4 100644
--- a/fs/logfs/journal.c
+++ b/fs/logfs/journal.c
@@ -392,7 +392,7 @@ static int journal_erase_segment(struct logfs_area *area)
392 u64 ofs; 392 u64 ofs;
393 int err; 393 int err;
394 394
395 err = logfs_erase_segment(sb, area->a_segno); 395 err = logfs_erase_segment(sb, area->a_segno, 1);
396 if (err) 396 if (err)
397 return err; 397 return err;
398 398