Il 28/08/2012 15:37, Stefan Hajnoczi ha scritto: >> > The "right fix" would not be much more complex though, something like this, right? >> > (untested). > Yes but it's more complicated. To do a really good job we should > slice off the first/last clusters if they are unaligned, handle them > like regular allocating writes, and handle the middle of the request > as a zero write. > > I decided to do the simplest implementation since this scenario only > occurs in test cases, not real guests. Yes, I was curious because it reminded me of the patch I did to write zeroes when I was playing with discard to avoid the large bounce buffer in qed_aio_write_inplace. That patch takes care of processing clusters one by one (though that means one L2 write for each and every cluster, not just the first and last). It probably causes a performance hit, but anyway I attach it for completeness. Paolo