Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1034821ybe; Fri, 6 Sep 2019 10:51:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIq3V+zM7BnaP3YXMzk8TJZ+BEM0Db/VzJpJZDxNSJLn3sPq8WbjKEzLPWW31qGKt7YQZ3 X-Received: by 2002:a17:90a:b38e:: with SMTP id e14mr11080724pjr.120.1567792270812; Fri, 06 Sep 2019 10:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567792270; cv=none; d=google.com; s=arc-20160816; b=GJ+zWlJTp24iseJKxDG/80xYldrG9N9Of3Krmo8BBSQ9tiyO1h4WCgU31jr/EHDXPD YnKcCSgIZUq8CZTmnVfSxWIlb4noTUqzWnqpMcqp8YIeJyB24Si1UZ4FElJqd9jk0bRA IPpqtdK1TbohL+Z5OH7pJwDvPg+kwv2Z58BE9SckFljR6ivBdmj9uhyqiZvaa3sPwR6k XhzQbYg3Y1RxbsmAkBZQdAwubn5Q5BSgiYbqgMjr24HP1lEZlvU4z9fiWzHWTSWem+Uh trkPVFOu80iOslZNlfG56kVs/8NKkEHDeoj3itwJI/8BWjYJGShQnqHRGKH56xn7NiWl ErtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=OjevEe/etqFoCDCNTJOCSipFozcLrPxD01gOcEjL5do=; b=T7IuSAFNW5WcKf8EjNcVsIACi3Md0QOxLg81vaRaj9am63vXGi3ls6/oXQTxX7qf3V mKx/RzFYvZTBHRx1TY9rKgFHxSrkEELzFWeqiXaJ+2arxRyy76aiJUtF/g/pCO+ppwil EoMW7pFGQg408WIXBwZGIGF8vzVXqgRUZLyPtCxgq10XtW8GPLfQumDDVQLV973GRaWt mrkAIYO/N4SKQ76ELRYDRwavHwwWuuNSslvOV/fr4cxKfuEW+a3eACU6cX0jVpRU1+Vo 2oc2YFUekx+tU+iomrboh1Qlk08kYJRAK9wHIgIpBdF1BTbi0UZULFUWz7R+2hb+W9FU JuJw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 66si5006747pff.223.2019.09.06.10.50.55; Fri, 06 Sep 2019 10:51:10 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389885AbfIFMI1 (ORCPT + 99 others); Fri, 6 Sep 2019 08:08:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46412 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732863AbfIFMI1 (ORCPT ); Fri, 6 Sep 2019 08:08:27 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EE7243082137; Fri, 6 Sep 2019 12:08:26 +0000 (UTC) Received: from horse.redhat.com (unknown [10.18.25.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id 40F4660C18; Fri, 6 Sep 2019 12:08:18 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id CC7AA220292; Fri, 6 Sep 2019 08:08:17 -0400 (EDT) Date: Fri, 6 Sep 2019 08:08:17 -0400 From: Vivek Goyal To: Miklos Szeredi Cc: Stefan Hajnoczi , linux-fsdevel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, virtio-fs@redhat.com, "Dr. David Alan Gilbert" , "Michael S. Tsirkin" Subject: Re: [PATCH 00/18] virtiofs: Fix various races and cleanups round 1 Message-ID: <20190906120817.GA22083@redhat.com> References: <20190905194859.16219-1-vgoyal@redhat.com> <20190906103613.GH5900@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 06 Sep 2019 12:08:27 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 06, 2019 at 01:52:41PM +0200, Miklos Szeredi wrote: > On Fri, Sep 6, 2019 at 12:36 PM Stefan Hajnoczi wrote: > > > > On Fri, Sep 06, 2019 at 10:15:14AM +0200, Miklos Szeredi wrote: > > > On Thu, Sep 5, 2019 at 9:49 PM Vivek Goyal wrote: > > > > > > > > Hi, > > > > > > > > Michael Tsirkin pointed out issues w.r.t various locking related TODO > > > > items and races w.r.t device removal. > > > > > > > > In this first round of cleanups, I have taken care of most pressing > > > > issues. > > > > > > > > These patches apply on top of following. > > > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git#virtiofs-v4 > > > > > > > > I have tested these patches with mount/umount and device removal using > > > > qemu monitor. For example. > > > > > > Is device removal mandatory? Can't this be made a non-removable > > > device? Is there a good reason why removing the virtio-fs device > > > makes sense? > > > > Hot plugging and unplugging virtio PCI adapters is common. I'd very > > much like removal to work from the beginning. > > Can you give an example use case? David Gilbert mentioned this could be useful if daemon stops responding or dies. One could remove device. That will fail all future requests and allow unmounting filesystem. Havind said that, current implementation will help in above situation only if there are no pending requests. If there are pending requests and daemon stops responding, then removal will hang too, as we wait for draining the queues. So at some point of time, we also need some sort of timeout functionality where we end requests with error after a timeout. I feel we should support removing device at some point of time. But its not necessarily a must have feature for first round. Thanks Vivek