From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXWMI-0003Iv-A0 for qemu-devel@nongnu.org; Mon, 16 Mar 2015 10:51:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXWMH-0000mT-J9 for qemu-devel@nongnu.org; Mon, 16 Mar 2015 10:51:10 -0400 Message-ID: <5506EDD5.9060708@redhat.com> Date: Mon, 16 Mar 2015 15:51:01 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1424887718-10800-1-git-send-email-mreitz@redhat.com> <1424887718-10800-21-git-send-email-mreitz@redhat.com> <550027AB.4000107@redhat.com> <5506E173.1000808@redhat.com> <5506EC57.1090305@redhat.com> <5506ED66.9050607@redhat.com> In-Reply-To: <5506ED66.9050607@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 20/25] block/nbd: Comment on discard/flush silently failing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi On 16/03/2015 15:49, Max Reitz wrote: >>> >> Right, but a better model than block.c should be for example >> block/raw-posix.c, which returns ENOTSUP (I checked now...). > > Maybe we should catch ENOTSUP in bdrv_co_discard() and override it? That's what it does: if (ret && ret != -ENOTSUP) { return ret; } Returning 0 for NBD's flush_to_disk, by the way, is okay. Paolo