Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1296185ybe; Fri, 6 Sep 2019 15:19:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqr75UtiFQYq1GTty1uTmT7dgblQNolD+pO5cMsCz7j6SG00ak4BV/UdOefn0/RVjyBG9g X-Received: by 2002:a63:607:: with SMTP id 7mr9857008pgg.240.1567808368350; Fri, 06 Sep 2019 15:19:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567808368; cv=none; d=google.com; s=arc-20160816; b=jB/MIaecjjBn0MTDcUhme4H/vFfioBjM8wR9VzPvR/rQSCS8qWwadmRKtrv3xh875X 1p8Q7ndgc4V1X6nH0PGUCmoEX5KCgbJ5GrhHwjG1Rax08k38bXnfX0Blg+hxbPANpiDa BtZirFQpM+gjQorHG7hK47TrmBbTiZXK9DvWRkZuYFDz1OqrerD+8c4KY7Se6AQAH527 JHvdtoYgTa1Z2nFksVHQbJGAiLMxbsJflmAXvcN4+CPI0p7MHus4iTKx9qCRJd0F3Nzr eb+S6XVpNIcXRc/IoD5Ag7Db/JPw3Cw73vYv1sOXl4Jm2UCrBuKqnzD6nrkhkZnIZEjU fcvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=dcmyyYxsqdiEv0SNbtEtPLVRqtn2jGS9PqXA4dwbE3U=; b=lxSltcmM6eMXyvtVyZFsEXoByk9U45+ynE6SjqMxTd5nLkSNqbJKc8VUdb30/241j6 BMTHMcyYQhkhmswnxUQQhD53BS6nDlyo+RYJ/+13LH2D1DraDax4p6XvaRZXMdkIem1R +lLO5vCJYOwgZ59ah+aYPQG2xr81h9YfDPLfnh0o9N0aybN5bIL8iIz6DHkJdrTFm+dI 0DdfSNSpGx5BLPI7n2X6elQj9dQW3y6a4GL9dDtHo7xPQTHcWNxzKOlzx7boqcDquccZ XZc+VPl6f6W6lqUCXmY3LO3ER9GqYy/fOIyIUhhGZpbhC8TTmS7SU6vBAxzgktL5Ugk+ AAzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=B4OSDpdd; 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 15si7262302pfc.210.2019.09.06.15.19.13; Fri, 06 Sep 2019 15:19:28 -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; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=B4OSDpdd; 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 S2393695AbfIFNze (ORCPT + 99 others); Fri, 6 Sep 2019 09:55:34 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:41008 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731037AbfIFNzd (ORCPT ); Fri, 6 Sep 2019 09:55:33 -0400 Received: by mail-io1-f65.google.com with SMTP id r26so12836698ioh.8 for ; Fri, 06 Sep 2019 06:55:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dcmyyYxsqdiEv0SNbtEtPLVRqtn2jGS9PqXA4dwbE3U=; b=B4OSDpddWZe47ugichOkX/imLBvNKswCV0dbKstPAw/+U+9vciLm6xStunfZCickyP Ho3A6tqbPWmU/Ws8P02JF3IyY4fVNkq6SEkJ4pKqhntGCsLpsEcOFwtH17Hn6ejrIZWE eBWLNXul50+Hjrpq1Th64M8qE4oAdLPO1tk9c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dcmyyYxsqdiEv0SNbtEtPLVRqtn2jGS9PqXA4dwbE3U=; b=AS9mZv8qTaQpaqmI2Spa0MPmAu120W2E73sZujsmpHnIOT3uMnvzP8T+m8x6MN4+uh Uo0J+o2wyNegGjZPNi/OtEybA7t3xIzEqhtNxu8yTGECAuHK4wzbsof3/xzSE7FWAIGD 6sBXxDIftInGR3+PW2gnWxCS4Vck6mmdE4eknJyHyhJLJ6DSiqbwEDKYfOGxWxSB+Mrt WDqhdSxjwANS0m8T0kJBqU9dV4XYF1G5hpU5EFwMe9F5XZeoqxMjTn63tQxauuAAXOjp l3hOazydH1CgksJTnwXWP+aGB9TGRnhe5EWkjl5/j3qMWyMNH8JHhMvfO66myfiS3Z/M n73g== X-Gm-Message-State: APjAAAU3GXvJMEALbYwbqo8/q3fx1y+oMUsnp8IyMQFHeUEKqZF81GTq hNSZR8bsdx8CNI/T6sI9LvYDpDKF+jXo5CyWkvaSwg== X-Received: by 2002:a6b:bec6:: with SMTP id o189mr10035532iof.62.1567778132891; Fri, 06 Sep 2019 06:55:32 -0700 (PDT) MIME-Version: 1.0 References: <20190905194859.16219-1-vgoyal@redhat.com> <20190906103613.GH5900@stefanha-x1.localdomain> <20190906120817.GA22083@redhat.com> In-Reply-To: <20190906120817.GA22083@redhat.com> From: Miklos Szeredi Date: Fri, 6 Sep 2019 15:55:21 +0200 Message-ID: Subject: Re: [PATCH 00/18] virtiofs: Fix various races and cleanups round 1 To: Vivek Goyal 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" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 6, 2019 at 2:08 PM Vivek Goyal wrote: > > 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. If there's no compelling reason to do it in the first round, than I'd prefer to not do it. More complexity -> more bugs. Thanks, Miklos