Add ability to keep memory-mapped files
authorStephen Bates <sbates@raithlin.com>
Tue, 8 Aug 2017 20:26:56 +0000 (14:26 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 8 Aug 2017 20:26:56 +0000 (14:26 -0600)
commitf9cfc7d44a80638f81810416385136c35ad34658
treec33bb832540080c1f4f1b961fd9f7d0aecbfaabf
parentd4a507c17533f05bcf6d6eeb8d00f3dad1a020a1
Add ability to keep memory-mapped files

By default file backed memory mappings are unlink()'ed after use. This
patch keeps the files if they already existed. We don't check for
errors on access() since we will catch them on the open().

Discovered this when doing p2pmem testing and fio kept deleting the
/dev/p2pmem0 files...

Changes since v1
  Altered based on feedback from Jens to avoid using an option and
  test for file existance instead.

Signed-off-by: Stephen Bates <sbates@raithlin.com>
Changed by me to use a td->flags flag, instead of adding a new
member to thread options.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fio.h
memory.c