Nick Piggin wrote: > On Sat, Nov 22, 2008 at 01:14:02PM +0300, Edward Shishkin wrote: > >> Andrew Morton wrote: >> >>> On Tue, 21 Oct 2008 08:20:20 +0200 >>> Nick Piggin <npiggin@xxxxxxx> wrote: >>> >>> >>> >>>> Nothing uses prepare_write or commit_write. Remove them from the tree >>>> completely. >>>> >>>> >>> argh, reiser4 broke. >>> >>> Edward, I'll disable it in config for now. >>> >>> >> Here is the fixup plus support of loop devices >> over compressed files (an old to-do issue). >> Andrew, please apply. >> >> Thanks, >> Edward. >> >> > > Thanks Edward, I appreciate your help with this. Hi Nick, I am really happy that somebody looks at my patches.. > I don't know the > reiser4 code at all, but just remember that you have to be able to > tolerate a short-write in write_end (eg. the page may not actually > have all or any of the memory initialized in the range (pos, pos+len), > only the range (pos, pos+copied) (ie. copied may be < len). > > One thing that many block based filesystems have to be careful of is > to ensure that the uncopied range (which might contain garbage) doesn't > get written back to the filesystem. > > I can't immediately see whether you handle that or not, but you're not > using 'copied' anywhere, so that might flag a problem. > reiser4_write_{begin,end} works only in splice.c (i.e. only for loopback functionality) in the chunk of code which looks like this: pagecache_write_begin(); ... memcpy(.., to_page); ... pagecache_write_end(.., to_page, ..); i.e. there can not be short writes and everything is uptodate. reiser4_write() has its own means to fight with short writes. Not everything is excellent here though, but this is another topic.. Thanks, Edward. -- To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html