Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4020015ybl; Mon, 9 Dec 2019 04:11:11 -0800 (PST) X-Google-Smtp-Source: APXvYqxj5m4OUjwlEDscU/TFrsm+nry/j8RVeU4fM4FX5Qn9FSL4bIk9doJb/d30I97MZuA4HvW0 X-Received: by 2002:a9d:1425:: with SMTP id h34mr21203312oth.166.1575893471862; Mon, 09 Dec 2019 04:11:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575893471; cv=none; d=google.com; s=arc-20160816; b=tePHgJ75dIFk8g2pFtXO00OuLa4Lf1zl4Bs13y00X/Xt22bQkEH8dq8xuW32i/JFAJ 8oZzBd41tYj3bE6J4L9mrLumn1qcTkgOsL0Rw2avFE8iXpy4bv1nW8YLkaEOf24Uy+VU RbVFsL02Jb5jiSRu72oY6KgpwBwUWhdz95q2GZq+8K+RhM+9417Kpq+oDmrBySacgMby ue7MhjqRyw7t2iVJgvUFkfsHcUmT05iY5GuuxEtxlCIbyjGYICI1PMLjjECXQtbIQtIk FZ2QuWrdlsqxEdgv4Qk/+SkGybuYgHOubhC+G4BASOkUo2UpgERID00+574l7b6rjMdH xeog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=wFQqeFsQt7cDO9DmjyCWys7zkIVGSWfcPPHjvDDXd6E=; b=zfFbAGAU65j4YbVJxwUA4hu4svarCLkK8Wsz4boDUhtUGprIX9fJwXw+HPQe44ib1T SaDjsl3fzU2uzsOYVpwViyAMXA3p5k7nLWNKNCPzBOaiWfpJqVg68ROF+oKk8xI1LHAh eX8lcq8NXmNeOP7R6q0Dj5Tzxe2JOAbu/LvUfB8wPTe5plQp92/BpxwW/v/nzn01LP8m IOSZ81+hzBAR0IYQx4e+58tvZyOzuOux5y7MJZcjWipyPQ1BDY7tgE2L+tFykZtSPZ3z 9X5vsdNQ8zN4fCjCxAv7YLTWKi+BuliZ/K8BWOHIOQuz789/9NWQrvH7K0IqK2siUrVn ruEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p69si12131047oic.32.2019.12.09.04.10.58; Mon, 09 Dec 2019 04:11:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727473AbfLIMIp (ORCPT + 99 others); Mon, 9 Dec 2019 07:08:45 -0500 Received: from mx2.suse.de ([195.135.220.15]:53994 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727311AbfLIMIp (ORCPT ); Mon, 9 Dec 2019 07:08:45 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B9D1FADFB; Mon, 9 Dec 2019 12:08:43 +0000 (UTC) Subject: Re: [Xen-devel] [PATCH 2/4] xenbus: limit when state is forced to closed To: "Durrant, Paul" , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Cc: "linux-kernel@vger.kernel.org" , "xen-devel@lists.xenproject.org" , Stefano Stabellini , Boris Ostrovsky References: <20191205140123.3817-1-pdurrant@amazon.com> <20191205140123.3817-3-pdurrant@amazon.com> <20191209113926.GS980@Air-de-Roger> <3412e42d13224b6786613e58dc189ebf@EX13D32EUC003.ant.amazon.com> From: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= Message-ID: <8d66e520-3009-cde1-e24c-26d7476e5873@suse.com> Date: Mon, 9 Dec 2019 13:08:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: <3412e42d13224b6786613e58dc189ebf@EX13D32EUC003.ant.amazon.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09.12.19 13:03, Durrant, Paul wrote: >> -----Original Message----- >> From: Jürgen Groß >> Sent: 09 December 2019 11:55 >> To: Roger Pau Monné ; Durrant, Paul >> >> Cc: linux-kernel@vger.kernel.org; xen-devel@lists.xenproject.org; Stefano >> Stabellini ; Boris Ostrovsky >> >> Subject: Re: [Xen-devel] [PATCH 2/4] xenbus: limit when state is forced to >> closed >> >> On 09.12.19 12:39, Roger Pau Monné wrote: >>> On Thu, Dec 05, 2019 at 02:01:21PM +0000, Paul Durrant wrote: >>>> Only force state to closed in the case when the toolstack may need to >>>> clean up. This can be detected by checking whether the state in >> xenstore >>>> has been set to closing prior to device removal. >>> >>> I'm not sure I see the point of this, I would expect that a failure to >>> probe or the removal of the device would leave the xenbus state as >>> closed, which is consistent with the actual driver state. >>> >>> Can you explain what's the benefit of leaving a device without a >>> driver in such unknown state? >> >> And more concerning: did you check that no frontend/backend is >> relying on the closed state to be visible without closing having been >> set before? > > Blkfront doesn't seem to mind and I believe the Windows PV drivers cope, but I don't really understand the comment since this patch is actually removing a case where the backend transitions directly to closed. I'm not speaking of blkfront/blkback only, but of net, tpm, scsi, pvcall etc. frontends/backends. After all you are modifying a function common to all PV driver pairs. You are removing a state switc to "closed" in case the state was _not_ "closing" before. So any PV driver reacting to "closed" of the other end in case the previous state might not have been "closing" before is at risk to misbehave with your patch. Juergen