From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USjPB-0003bH-Lz for qemu-devel@nongnu.org; Thu, 18 Apr 2013 03:37:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USjPA-0002u7-Ik for qemu-devel@nongnu.org; Thu, 18 Apr 2013 03:37:17 -0400 Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]:62082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USjPA-0002u0-Cb for qemu-devel@nongnu.org; Thu, 18 Apr 2013 03:37:16 -0400 Received: by mail-we0-f171.google.com with SMTP id i48so1953060wef.30 for ; Thu, 18 Apr 2013 00:37:15 -0700 (PDT) Date: Thu, 18 Apr 2013 09:37:12 +0200 From: Stefan Hajnoczi Message-ID: <20130418073712.GC19195@stefanha-thinkpad.redhat.com> References: <1366263861-30146-1-git-send-email-namei.unix@gmail.com> <1366264253-1040-1-git-send-email-namei.unix@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1366264253-1040-1-git-send-email-namei.unix@gmail.com> Subject: Re: [Qemu-devel] [PATCH v7] sheepdog: add discard/trim support for sheepdog List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Yuan Cc: Kevin Wolf , sheepdog@lists.wpkg.org, qemu-devel@nongnu.org, Stefan Hajnoczi , Paolo Bonzini , MORITA Kazutaka On Thu, Apr 18, 2013 at 01:50:53PM +0800, Liu Yuan wrote: > @@ -184,6 +186,8 @@ typedef struct SheepdogInode { > uint32_t data_vdi_id[MAX_DATA_OBJS]; > } SheepdogInode; > > +static bool discard_supported = true; Normally state should be part of BDRVSheepdogState so that it does not affect other sheepdog drives. Please confirm that all -drive file=sheepdog:... must either support discard or not support it. I asked this in an older version of the patch but wasn't sure if my question was clear. Imagine a scenario where you run two sheepdog clusters and want to connect one drive from each cluster to your VM. If one cluster uses outdated sheepdog software but the other is up-to-date, then it should still be possible to use discard on the up-to-date cluster. Stefan