Re: [PATCH] block: fix bogus EFAULT error from SG_IO ioctl

2015-06-27 Thread Jens Axboe
On 06/26/2015 03:44 AM, Paolo Bonzini wrote: Whenever blk_fill_sghdr_rq fails, its errno code is ignored and changed to EFAULT. This can cause very confusing errors: $ sg_persist -k /dev/sda persistent reservation in: pass through os error: Bad address The fix is trivial, just propagate

Re: [PATCH] block: fix bogus EFAULT error from SG_IO ioctl

2015-06-26 Thread Jeff Moyer
Paolo Bonzini writes: > Whenever blk_fill_sghdr_rq fails, its errno code is ignored and changed to > EFAULT. This can cause very confusing errors: > > $ sg_persist -k /dev/sda > persistent reservation in: pass through os error: Bad address > > The fix is trivial, just propagate the return va

[PATCH] block: fix bogus EFAULT error from SG_IO ioctl

2015-06-26 Thread Paolo Bonzini
Whenever blk_fill_sghdr_rq fails, its errno code is ignored and changed to EFAULT. This can cause very confusing errors: $ sg_persist -k /dev/sda persistent reservation in: pass through os error: Bad address The fix is trivial, just propagate the return value from blk_fill_sghdr_rq. Signed-