From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USjTL-0006UY-65 for qemu-devel@nongnu.org; Thu, 18 Apr 2013 03:41:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USjTI-0004WP-Kb for qemu-devel@nongnu.org; Thu, 18 Apr 2013 03:41:35 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:41000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USjTI-0004V6-E6 for qemu-devel@nongnu.org; Thu, 18 Apr 2013 03:41:32 -0400 Received: by mail-pd0-f174.google.com with SMTP id p12so1366581pdj.19 for ; Thu, 18 Apr 2013 00:41:31 -0700 (PDT) Message-ID: <516FA3A0.1030002@gmail.com> Date: Thu, 18 Apr 2013 15:41:20 +0800 From: Liu Yuan MIME-Version: 1.0 References: <1366263861-30146-1-git-send-email-namei.unix@gmail.com> <1366264253-1040-1-git-send-email-namei.unix@gmail.com> <20130418073712.GC19195@stefanha-thinkpad.redhat.com> In-Reply-To: <20130418073712.GC19195@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: Stefan Hajnoczi Cc: Kevin Wolf , sheepdog@lists.wpkg.org, qemu-devel@nongnu.org, Stefan Hajnoczi , Paolo Bonzini , MORITA Kazutaka On 04/18/2013 03:37 PM, Stefan Hajnoczi 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. > Ah, I see, this time I got your question clearly. > 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. Makes sense. I'll use a per structure enabler. Thanks, Yuan