On Mon 30 Jul 2018 02:28:28 PM CEST, Kevin Wolf wrote: >> > Also, 512 should be BDRV_SECTOR_SIZE. >> >> I was surprised that it's not, but it's 512 also in two other places, >> including in qcow2_co_truncate itself. So I decided to keep >> that. Probably would be better if I'd repair it in the other places >> instead. :) > > Yeah, or at least not introduce new places with a literal 512.
I have a few patches already in my queue to replace these literals with BDRV_SECTOR_SIZE, so no need to spend time with the existing cases, I can take care of that. For new cases I agree with Kevin that you should always use BDRV_SECTOR_SIZE. Berto