Re: [STATUS 2.5] January 18, 2002

Andrew Morton
2002-01-18T21:14:51Z

Alexander Viro wrote:
>
> On Fri, 18 Jan 2002, Guillaume Boissiere wrote:
>
> > o Merged New scheduler for improved scalability (Ingo Molnar, Davide Libenzi)
> > o Merged Rewrite of the block IO (bio) layer (Jens Axboe)
> > o Merged New kernel device structure (kdev_t) (Linus Torvalds, etc)
> > o Merged Initial support for USB 2.0 (David Brownell, Greg Kroah-Hartman,
>
> Merged: Per-process namespaces, late-boot cleanups.
> Ready: switch to ->get_super() as primary file_system_type method.
> Ready: ->getattr() handling and changes of ->setattr()/->permission()
> prototypes.
> Pending: proper UFS fixes, ext2 cleanups and locking
> changes.
> Pending: per-mountpoint read-only, union-mounts and unionfs.
> Pending: lifting limitations on mount(2)
> In progress: killing kdev_t for block devices (switch to struct block_device *)
> Started: UMSDOS rewrite (the damn thing blocks struct inode trimming)
> Planned: new mount API.

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.

-