exofs: simple_write_end does not mark_inode_dirty
authorBoaz Harrosh <bharrosh@panasas.com>
Sun, 27 Dec 2009 15:01:42 +0000 (17:01 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 18 Jan 2010 18:19:15 +0000 (10:19 -0800)
commit24488113f0ee3d3fdb64734cb2364cbe2ca1ba33
treec6c926a00e8f66a2042cb8aa73395644f44dd50a
parent8dfabfcf7b0c03f33f7cb945772027060de70b61
exofs: simple_write_end does not mark_inode_dirty

commit efd124b999fb4d426b30675f1684521af0872789 upstream.

exofs uses simple_write_end() for it's .write_end handler. But
it is not enough because simple_write_end() does not call
mark_inode_dirty() when it extends i_size. So even if we do
call mark_inode_dirty at beginning of write out, with a very
long IO and a saturated system we might get the .write_inode()
called while still extend-writing to file and miss out on the last
i_size updates.

So override .write_end, call simple_write_end(), and afterwords if
i_size was changed call mark_inode_dirty().

It stands to logic that since simple_write_end() was the one extending
i_size it should also call mark_inode_dirty(). But it looks like all
users of simple_write_end() are memory-bound pseudo filesystems, who
could careless about mark_inode_dirty(). I might submit a
warning-comment patch to simple_write_end() in future.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/exofs/inode.c