2.6.21-rc5-git12 new aops patchset
http://www.kernel.org/pub/linux/kernel/people/npiggin/patches/new-aops/
Files are 2.6.21-rc5-git12*
This contains an update to recent git kernels from Mark, ext3 merge, XFS fix from David Chinner, some FUSE fixes (now lightly tested and working).
Documents perform_write a little better, and implements simple_perform_write, and fuse_perform_write. However, note that as per discussion, we may opt to take perform_write out of this patchset, and instead work towards making generic_file_aio_write easier to implement. I'm open to discussion, though.
Quoted 3 lines · Nick Piggin
http://www.kernel.org/pub/linux/kernel/people/npiggin/patches/new-aops/
Files are 2.6.21-rc5-git12*
ext3_ordered_write_end() did
+ ret = block_write_end(file, mapping, pos, len, copied, page, fsdata);
+ if (ret >= 0)
+ copied = ret; }
ret2 = ext3_journal_stop(handle);
if (!ret)
ret = ret2;
- return ret;
+ return ret ? ret : copied;
If we do this, we are going to ignore ext3_journal_stop() errors almost all the time (since "ret" will be mostly positive).
Instead can we do this ?
+ copied = block_write_end(file, mapping, pos, len, copied, page, fsdata);
+ if (copied < 0)
+ ret = copied;
Thanks,
Badari
Quoted 23 lines · Badari Pulavarty
Quoted 3 lines · Nick Piggin
http://www.kernel.org/pub/linux/kernel/people/npiggin/patches/new-aops/
Files are 2.6.21-rc5-git12*
ext3_ordered_write_end()did(quoted diff) +3
-0+ ret = block_write_end(file, mapping, pos, len, copied, page, fsdata); + if (ret >= 0) + copied = ret;}(quoted diff) +1
-1ret2 = ext3_journal_stop(handle); if (!ret) ret = ret2; - return ret; + return ret ? ret : copied;If we do this, we are going to ignore
ext3_journal_stop()errors almost all the time (since "ret" will be mostly positive).Instead can we do this ?
Review
Quoted 3 lines
(quoted diff) +3
-0+ copied = block_write_end(file, mapping, pos, len, copied, page, fsdata); + if (copied < 0) + ret = copied;
Definitely, thank you.
Nick
Quoted 3 lines · Nick Piggin
However, note that as per discussion, we may opt to take
perform_writeout of this patchset, and instead work towards makinggeneric_file_aio_writeeasier to implement. I'm open to discussion, though.
I'd be fine with that - if the file systems can get at all the checks and iov_iter stuff it lets them fine tune their write logic. Ocfs2 for instance has very different locking for o_direct / buffered and so goes to some bit of pain to avoid the fallback code in __generic_file_aio_write_nolock(). It'd be much simpler to just call some helpers for buffered writes and change the code to never do that.
--Mark
--
Mark Fasheh
Senior Software Developer, Oracle
[email protected]