diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-30 14:24:55 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-30 14:24:55 (GMT) |
commit | 4660d3d240ac6c92cd3ad33657ca302026bdc24b (patch) | |
tree | b4ef5c5d2d1e127e9ea80bd047247fdb2d1547ed /fs/logfs/readwrite.c | |
parent | be3fd3cc7c2142c46d5dcfec05e6031990d1f2ca (diff) | |
parent | 6be7fa06eb4d721df734bd0946b5e63b27c0589b (diff) | |
download | linux-fsl-qoriq-4660d3d240ac6c92cd3ad33657ca302026bdc24b.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs
* git://git.kernel.org/pub/scm/linux/kernel/git/joern/logfs:
[LogFS] Erase new journal segments
[LogFS] Move reserved segments with journal
[LogFS] Clear PagePrivate when moving journal
Simplify and fix pad_wbuf
Prevent data corruption in logfs_rewrite_block()
Use deactivate_locked_super
Fix logfs_get_sb_final error path
Write out both superblocks on mismatch
Prevent schedule while atomic in __logfs_readdir
Plug memory leak in writeseg_end_io
Limit max_pages for insane devices
Open segment file before using it
Diffstat (limited to 'fs/logfs/readwrite.c')
-rw-r--r-- | fs/logfs/readwrite.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c index 7a23b3e..c3a3a68 100644 --- a/fs/logfs/readwrite.c +++ b/fs/logfs/readwrite.c @@ -1594,7 +1594,6 @@ int logfs_delete(struct inode *inode, pgoff_t index, return ret; } -/* Rewrite cannot mark the inode dirty but has to write it immediatly. */ int logfs_rewrite_block(struct inode *inode, u64 bix, u64 ofs, gc_level_t gc_level, long flags) { @@ -1611,6 +1610,18 @@ int logfs_rewrite_block(struct inode *inode, u64 bix, u64 ofs, if (level != 0) alloc_indirect_block(inode, page, 0); err = logfs_write_buf(inode, page, flags); + if (!err && shrink_level(gc_level) == 0) { + /* Rewrite cannot mark the inode dirty but has to + * write it immediatly. + * Q: Can't we just create an alias for the inode + * instead? And if not, why not? + */ + if (inode->i_ino == LOGFS_INO_MASTER) + logfs_write_anchor(inode->i_sb); + else { + err = __logfs_write_inode(inode, flags); + } + } } logfs_put_write_page(page); return err; |