Hi, On Thu, 23 May 2019 at 05:44, Left Right <olegsivokon@xxxxxxxxx> wrote: > > Hello list! > > We are working on testing pmem library backed up by a partition on a > device, and there seems to be a discrepancy between how we / pmem / > FIO understand the size of the of partitions. > > Could anyone, please, shed a light on how this is done? > > Thank you! > > Oleg This depends on the ioengine. If you mean the pmemblk ioengine, the code to do it is done by the ioengine's get_file_size callback "fio_pmemblk_get_file_size()" (https://github.com/axboe/fio/blob/de5ed0e4d398bc9d4576f9b2b82d7686989c27e1/engines/pmemblk.c#L319 ). If you mean a traditional file based ioengine (e.g. psync, libaio) then it's handled by calls done from get_file_size() in filesetup.c (https://github.com/axboe/fio/blob/afc22c98609ee80a99fbed24231181bdab2bc659/filesetup.c#L423 ) e.g. for block device there's an eventual call down into the platform specific blockdev_size() (here's a link to where blockdev_size is defined for Linux https://github.com/axboe/fio/blob/de5ed0e4d398bc9d4576f9b2b82d7686989c27e1/os/os-linux.h#L153 ). -- Sitsofe | http://sucs.org/~sits/