From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9VJz-0002yb-N5 for qemu-devel@nongnu.org; Wed, 23 Nov 2016 06:02:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9VJv-000443-Qm for qemu-devel@nongnu.org; Wed, 23 Nov 2016 06:02:35 -0500 Date: Wed, 23 Nov 2016 12:02:19 +0100 From: Olaf Hering Message-ID: <20161123110219.GD19126@aepfle.de> References: <20161118102452.5779-1-olaf@aepfle.de> <20161118103003.GD5717@aepfle.de> <20161123104950.GC19126@aepfle.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FFoLq8A0u+X9iRU8" Content-Disposition: inline In-Reply-To: <20161123104950.GC19126@aepfle.de> Subject: Re: [Qemu-devel] [PATCH] xen_disk: convert discard input to byte ranges List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini , Anthony Perard , Kevin Wolf , Max Reitz Cc: qemu-block@nongnu.org, "open list:X86" , "open list:All patches CC here" --FFoLq8A0u+X9iRU8 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Wed, Nov 23, Olaf Hering wrote: > > > + if (!blk_split_discard(ioreq, req->sector_number, req->nr_sectors)) { > > > + goto err; > > How is error handling supposed to work here? In the guest the cmd is stuck, instead of getting an IO error: [ 91.966404] mkfs.ext4 D 0000000000000000 0 2878 2831 0x00000000 [ 91.966406] ffff88002204bc48 ffff880030530480 ffff88002fae5800 ffff88002204c000 [ 91.966407] 0000000000000000 7fffffffffffffff 0000000000008000 00000000024000c0 [ 91.966409] ffff88002204bc60 ffffffff815dd985 ffff880038815c00 ffff88002204bd08 [ 91.966409] Call Trace: [ 91.966413] [] schedule+0x35/0x80 [ 91.966416] [] schedule_timeout+0x237/0x2d0 [ 91.966419] [] io_schedule_timeout+0xa6/0x110 [ 91.966421] [] wait_for_completion_io+0xa3/0x110 [ 91.966425] [] submit_bio_wait+0x50/0x60 [ 91.966430] [] blkdev_issue_discard+0x78/0xb0 [ 91.966433] [] blk_ioctl_discard+0x7b/0xa0 [ 91.966436] [] blkdev_ioctl+0x730/0x920 [ 91.966440] [] block_ioctl+0x3d/0x40 [ 91.966444] [] do_vfs_ioctl+0x2cd/0x4a0 [ 91.966453] [] SyS_ioctl+0x74/0x80 [ 91.966456] [] entry_SYSCALL_64_fastpath+0x12/0x6d Olaf --FFoLq8A0u+X9iRU8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAlg1dzgACgkQXUKg+qaYNn5unACfeJwoImCQcFnf982SrUbf91IO lsgAoMGahRpIKVb4tzK4brDL1t+FvJNq =CGPy -----END PGP SIGNATURE----- --FFoLq8A0u+X9iRU8-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH] xen_disk: convert discard input to byte ranges Date: Wed, 23 Nov 2016 12:02:19 +0100 Message-ID: <20161123110219.GD19126@aepfle.de> References: <20161118102452.5779-1-olaf@aepfle.de> <20161118103003.GD5717@aepfle.de> <20161123104950.GC19126@aepfle.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FFoLq8A0u+X9iRU8" Return-path: Content-Disposition: inline In-Reply-To: <20161123104950.GC19126@aepfle.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-block-bounces+gceqb-qemu-block=m.gmane.org@nongnu.org Sender: "Qemu-block" To: Stefano Stabellini , Anthony Perard , Kevin Wolf , Max Reitz Cc: "open list:X86" , "open list:All patches CC here" , qemu-block@nongnu.org List-Id: xen-devel@lists.xenproject.org --FFoLq8A0u+X9iRU8 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Wed, Nov 23, Olaf Hering wrote: > > > + if (!blk_split_discard(ioreq, req->sector_number, req->nr_sectors)) { > > > + goto err; > > How is error handling supposed to work here? In the guest the cmd is stuck, instead of getting an IO error: [ 91.966404] mkfs.ext4 D 0000000000000000 0 2878 2831 0x00000000 [ 91.966406] ffff88002204bc48 ffff880030530480 ffff88002fae5800 ffff88002204c000 [ 91.966407] 0000000000000000 7fffffffffffffff 0000000000008000 00000000024000c0 [ 91.966409] ffff88002204bc60 ffffffff815dd985 ffff880038815c00 ffff88002204bd08 [ 91.966409] Call Trace: [ 91.966413] [] schedule+0x35/0x80 [ 91.966416] [] schedule_timeout+0x237/0x2d0 [ 91.966419] [] io_schedule_timeout+0xa6/0x110 [ 91.966421] [] wait_for_completion_io+0xa3/0x110 [ 91.966425] [] submit_bio_wait+0x50/0x60 [ 91.966430] [] blkdev_issue_discard+0x78/0xb0 [ 91.966433] [] blk_ioctl_discard+0x7b/0xa0 [ 91.966436] [] blkdev_ioctl+0x730/0x920 [ 91.966440] [] block_ioctl+0x3d/0x40 [ 91.966444] [] do_vfs_ioctl+0x2cd/0x4a0 [ 91.966453] [] SyS_ioctl+0x74/0x80 [ 91.966456] [] entry_SYSCALL_64_fastpath+0x12/0x6d Olaf --FFoLq8A0u+X9iRU8 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAlg1dzgACgkQXUKg+qaYNn5unACfeJwoImCQcFnf982SrUbf91IO lsgAoMGahRpIKVb4tzK4brDL1t+FvJNq =CGPy -----END PGP SIGNATURE----- --FFoLq8A0u+X9iRU8--