From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755272AbbF0Rn5 (ORCPT ); Sat, 27 Jun 2015 13:43:57 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:35545 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752484AbbF0Rnv (ORCPT ); Sat, 27 Jun 2015 13:43:51 -0400 Message-ID: <558EE0D4.9070201@kernel.dk> Date: Sat, 27 Jun 2015 11:43:48 -0600 From: Jens Axboe User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Paolo Bonzini , linux-kernel@vger.kernel.org Subject: Re: [PATCH] block: fix bogus EFAULT error from SG_IO ioctl References: <1435311886-30834-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1435311886-30834-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 the return value from > blk_fill_sghdr_rq. Added, thanks. -- Jens Axboe