Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2044328ybe; Tue, 3 Sep 2019 07:13:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEZbMDgazEfWbdhM84Wnmb6iidBI/AOOimf5p4vNZVfCraKbwiSFh9YBDD52kePum4yRqX X-Received: by 2002:a62:e910:: with SMTP id j16mr41709299pfh.123.1567520025776; Tue, 03 Sep 2019 07:13:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567520025; cv=none; d=google.com; s=arc-20160816; b=ATPpvHYIk9b4rntDtr7Uo2P0/gehEkAuwhceG3HxX9w/q6T6DNge5f7HKV05YFNVTV 4/TbhaFLyt7Pt+6o2tACOZvzMURVNAcKm1BI8KnjQFr5nNUNdU4OxEsC33QtmhQrDuYe 4Sh3K82nFlcaj6lnj9+M4QawGjqTFhfh40ihn7UObO45KKXLFbYa+LkIY3X9Wcij/Wd2 CS58NJ5jcerlcJAycgpO0Wk9EBPqkDzxtmWzKR9wC2XkNPsb6vZNxmG4CmttGFe9TlDp O94m/KVqfTbrFsnglLgmS7MV45IRLBgPJP3PNhZ/5BBL5tOLBDQ7tkUS/PuoMgN0znPA jloQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=B2BfNzrm+hR7i1mNls3IhAz7GlKTxZk9pYPgMdNVli0=; b=MvobukYxStqiCWjO+Qi1YwkFJPuDvUTqgR1bBTgcI9uOFgtRqEDVeXEKqRGY53W4RH pCNa6tWJx9L1rGuL/Dzs0PivZJK6imc/1g0hZy+ZNfq8c1MpXELFUCqqJnBs7ttrnxmQ sT1AuG2UvITDCT1U+eJ8TiSKAhDAQklj51HYSR4gwjRD9HhoEnHfOuO/QDJdSwl29Bk/ pK5EshuxHYqki9MtT1YX4ihE7DNkPA2QUZ9IOhVc5Wc/ofP6oGdmW7b9bbb52Heb6LmZ /EzdEUlJm0nxpnp2WFXa2ICGHNJlWbSV8fBTRXDK/kfoxKB9X1VfW/YM3mr+xqoijJwg 6XBw== 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 ck4si14984758plb.235.2019.09.03.07.13.29; Tue, 03 Sep 2019 07:13:45 -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 S1729169AbfICOMW (ORCPT + 99 others); Tue, 3 Sep 2019 10:12:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55056 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728679AbfICOMW (ORCPT ); Tue, 3 Sep 2019 10:12:22 -0400 Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5C18888306 for ; Tue, 3 Sep 2019 14:12:22 +0000 (UTC) Received: by mail-qt1-f197.google.com with SMTP id 91so19072770qtf.13 for ; Tue, 03 Sep 2019 07:12:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=B2BfNzrm+hR7i1mNls3IhAz7GlKTxZk9pYPgMdNVli0=; b=OAkBlASR7HAFosydcHoXUyWHAF9WLnornvUM9Pe+gBRWqFnD7V/j8SLltC8v+6lI3A lRWqpFoN/Gmz04eLbQRO5dFqmzb4fTgqF6ghbotFPt04rLGND9zyiiDvp1ecdpdqDRSw L7HASAmdB4ty3moNmg68TKd2xVptZjkGRGMDVbsH//4ranZBsCd9V9AbAj6sLIogtN5e uSIhJbYbsM1YXrT6+Iv3eB3K8osed7nbtgQbvsET7ZIPz9J/n++LikOre7ndnenXL4VY vPQn5HIQMXnAc3EJyrWCQog2AVLQRLpraH8u4PfyLAgz8juGhndJrGxVVNM++zPJz2Zu 1XFg== X-Gm-Message-State: APjAAAUopbkDdycRzH/nDpaJmJHpPKvLFqcd/IJKYXzkhrmSSZ6Wkie1 fOIEaRJcdlI7dJ6Oh2qQMq3UQEFWSatKN4KGhMPjY5WA/FKOm+QcMlIRouZjiBxSuwDems6/fmY mObyuF/sCddTQIgt36MdqBwkP X-Received: by 2002:ac8:19c7:: with SMTP id s7mr23669445qtk.392.1567519941737; Tue, 03 Sep 2019 07:12:21 -0700 (PDT) X-Received: by 2002:ac8:19c7:: with SMTP id s7mr23669437qtk.392.1567519941605; Tue, 03 Sep 2019 07:12:21 -0700 (PDT) Received: from redhat.com (bzq-79-180-62-110.red.bezeqint.net. [79.180.62.110]) by smtp.gmail.com with ESMTPSA id b123sm8764984qkf.85.2019.09.03.07.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 07:12:20 -0700 (PDT) Date: Tue, 3 Sep 2019 10:12:16 -0400 From: "Michael S. Tsirkin" To: Vivek Goyal Cc: Miklos Szeredi , Jason Wang , virtualization@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, virtio-fs@redhat.com, Stefan Hajnoczi , "Dr. David Alan Gilbert" Subject: Re: [PATCH v3 00/13] virtio-fs: shared file system for virtual machines Message-ID: <20190903101001-mutt-send-email-mst@kernel.org> References: <20190821173742.24574-1-vgoyal@redhat.com> <20190903041507-mutt-send-email-mst@kernel.org> <20190903140752.GA10983@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190903140752.GA10983@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 03, 2019 at 10:07:52AM -0400, Vivek Goyal wrote: > On Tue, Sep 03, 2019 at 04:31:38AM -0400, Michael S. Tsirkin wrote: > > [..] > > + /* TODO lock */ > > give me pause. > > > > Cleanup generally seems broken to me - what pauses the FS > > I am looking into device removal aspect of it now. Thinking of adding > a reference count to virtiofs device and possibly also a bit flag to > indicate if device is still alive. That way, we should be able to cleanup > device more gracefully. Generally, the way to cleanup things is to first disconnect device from linux so linux won't send new requests, wait for old ones to finish. > > > > What about the rest of TODOs in that file? > > I will also take a closer look at TODOs now. Better device cleanup path > might get rid of some of them. Some of them might not be valid anymore. > > > > > use of usleep is hacky - can't we do better e.g. with a > > completion? > > Agreed. > > Thanks > Vivek