Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189244
b: refs/heads/master
c: 1932191
h: refs/heads/master
v: v3
  • Loading branch information
Joern Engel committed Mar 28, 2010
1 parent 28a6fc1 commit e59447f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f2e9e6a950a165a7d2c399ab7557e6745ef2bfd
refs/heads/master: 193219172691e29813821dc8433317768c6ed1a3
13 changes: 12 additions & 1 deletion trunk/fs/logfs/readwrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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;
Expand Down

0 comments on commit e59447f

Please sign in to comment.