Please can we provide some way for filesystems to know whether
a whole-fs sync() is happening?
At present, ext3_write_super() doesn't know whether it's called
on the kupdate path (where waiting on I/O completion is inappropriate)
or on the sys_sync() path (where it is appropriate).
I think super_operations.sync(struct super_block *sb, int wait)
is an appropriate way to do this.
In fact the whole synchronous-operation thing is a bit of a
twisty mess at present. There are several places where
ext3 has to use magical intuition to work out which part of
the kernel is calling it in which mode and why.
Note how ext3_file_write() calls mark_inode_dirty() if the
write in synchronous, just to ensure that generic_file_write()
will later call generic_osync_inode(). blech. This took
some time to sort out, and is fragile.
-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/