Fix wrap issue with 64-bit pwritev2/preadv2
authorJens Axboe <axboe@fb.com>
Thu, 18 May 2017 17:59:09 +0000 (11:59 -0600)
committerJens Axboe <axboe@fb.com>
Thu, 18 May 2017 17:59:09 +0000 (11:59 -0600)
commit7b5c648f6a5c05716e2f345c9d640965abda8761
tree499e6a4aea4f9aa4402a06394860213b976813c1
parentc78997bf625ffcca49c18e11ab0f5448b26d7452
Fix wrap issue with 64-bit pwritev2/preadv2

Apparently I missed that Linux does a clever trick to optimize
how we pass in lo/hi offsets for 64-bit, and it encodes the
full offset in just the low part. This caused corruption when
writing with pwritev2 for laver sizes, and bad data for preadv2
for larger sizes.

Signed-off-by: Jens Axboe <axboe@fb.com>
os/os-linux.h