lafs_dirty_dblock(struct datablock *b)
{
LAFS_BUG(!test_bit(B_Valid, &b->b.flags), &b->b);
- if (test_bit(B_Pinned, &b->b.flags))
- b->b.inode->i_sb->s_dirt = 1;
/*
* FIXME maybe check we aren't dirtying a dirty block
* in the previous phase.
if (test_and_set_bit(B_UnincCredit, &b->b.flags))
/* race - we didn't need it after all */
lafs_space_return(fs_from_inode(b->b.inode), 1);
-
- b->b.inode->i_sb->s_dirt = 1;
}
* (e.g. in setattr) will do that.
*/
set_bit(I_Dirty, &LAFSI(ino)->iflags);
+ ino->i_sb->s_dirt = 1;
}
int lafs_write_inode(struct inode *ino, int wait)
}
}
-static void lafs_write_super(struct super_block *sb)
-{
- struct fs *fs = sb->s_fs_info;
-
- lafs_checkpoint_start(fs);
-}
-
static int lafs_sync_fs(struct super_block *sb, int wait)
{
struct fs *fs = sb->s_fs_info;
if (!wait)
- /* FIXME why do I need this here? */
- lafs_cluster_flush(fs, 0);
+ /* We only reach here if s_dirt was set, so it
+ * is reasonable to force a checkpoint.
+ */
+ lafs_checkpoint_start(fs);
else
printk("FIXME I should wait for the checkpoint to finish\n");
return 0;
.clear_inode = lafs_clear_inode, /* forget internal state of this inode */
.delete_inode = lafs_delete_inode, /* remove this inode from filesystem */
.put_super = lafs_put_super,
- .write_super = lafs_write_super,
.sync_fs = lafs_sync_fs,
/* write_super_lockfs ?? */
/* unlockfs ?? */