ext4: async direct IO for holes and fallocate support
authorMingming Cao <cmm@us.ibm.com>
Mon, 28 Sep 2009 19:48:29 +0000 (15:48 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 28 Sep 2009 19:48:29 +0000 (15:48 -0400)
commit8d5d02e6b176565c77ff03604908b1453a22044d
tree0d29e4f28233f24960c7921c1c0a7608077bf713
parent4c0425ff68b1b87b802ffeda7b6a46ff7da7241c
ext4: async direct IO for holes and fallocate support

For async direct IO that covers holes or fallocate, the end_io
callback function now queued the convertion work on workqueue but
don't flush the work rightaway as it might take too long to afford.

But when fsync is called after all the data is completed, user expects
the metadata also being updated before fsync returns.

Thus we need to flush the conversion work when fsync() is called.
This patch keep track of a listed of completed async direct io that
has a work queued on workqueue.  When fsync() is called, it will go
through the list and do the conversion.

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/fsync.c
fs/ext4/inode.c
fs/ext4/super.c