Re: [PATCH v3 1/2] block/file-posix: Optimize for macOS

2021-04-01 Thread Stefan Hajnoczi
On Thu, Mar 11, 2021 at 12:39:15AM +0900, Akihiko Odaki wrote: > @@ -1586,6 +1589,7 @@ out: > } > } > > +G_GNUC_UNUSED Why isn't translate_err() used in the F_PUNCHHOLE case below? If you really want to avoid using it on macOS, please add a #if with the necessary conditions here so it's

[PATCH v3 1/2] block/file-posix: Optimize for macOS

2021-03-10 Thread Akihiko Odaki
This commit introduces "punch hole" operation and optimizes transfer block size for macOS. This commit introduces two additional members, discard_granularity and opt_io to BlockSizes type in include/block/block.h. Also, the members of the type are now optional. Set -1 to discard_granularity and 0