Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1126947ybe; Fri, 6 Sep 2019 12:15:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgOmIdQE4/xxBkTX84hyVfclfYfvzUs1kRHoY5ISutcKaM5ugEn5/jqdpYl2VPNVWF0a9Y X-Received: by 2002:a62:e910:: with SMTP id j16mr12930380pfh.123.1567797335409; Fri, 06 Sep 2019 12:15:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567797335; cv=none; d=google.com; s=arc-20160816; b=0u9BVLUSZ7EQgsoGR6uWNc6mN+b02rfvamDyphKYYs19nRfRFbtfx4a5P6mslTIsep qVJ7iP5V92JMvNeh04aPY8+2c4JP886fUOJYcFGXMtBB3hiwJy6v+pOJjyrYE11jlmir tCpdBl2Kl9GAEO4NI1UbEyVrru7QvJPvb1Yq/s8X8yOnVnTso+8vBrQamgNeGtQUinHL mhzAtCTjgVoBExParv0Xb9q/gBBjXWmw8PprHofzXOx3lk4zRKvDPSGdqGGEyDuOZw/T otIBmdoBJy6QNlfhEbEQKHeT0kPBUVNlEeBICB/bjhzUOJ7+EzcPWqzZuUA6IYb6wJUL j50A== 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=tBrCjYtRGeVIUf2uLSTOH0TDA2MoR8rPeuh7/xAFTR0=; b=gPzccxTPDMCXeQckH92alUtYsbinOUG2y5z+sbMJI18J4nZ68h9Wac/Q3+ju2Rakjy ErbCdsz7oYOOYULeBK3b6TbKfNKecO4Sk5/f2SwG7al5pyxlmeAPCtUJeS4tRrBzHDrh vN54xUtt30wUroUVecP3rgTmEP2HxjDTia/aGOM3dR3hr5B/e/kcIX5Hq6zNDW8Hq7kZ cMOCvTagdLr4rCn9zKgE4OCEtfdFarf+twU3VbPGCzJI/YAa0faIJMTPtUcq091foIWg PRz7swMPT2vSkdcXGSIm580+bzsUYbSS4TnTv1UpTiglXS+fGrUIjEnczTPZoOOdgvS/ uP2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=D8NKd9TC; 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 q13si5067172pgq.317.2019.09.06.12.15.19; Fri, 06 Sep 2019 12:15:35 -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=D8NKd9TC; 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 S2405338AbfIFOL5 (ORCPT + 99 others); Fri, 6 Sep 2019 10:11:57 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:35098 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731109AbfIFOL5 (ORCPT ); Fri, 6 Sep 2019 10:11:57 -0400 Received: by mail-io1-f65.google.com with SMTP id f4so12296029ion.2 for ; Fri, 06 Sep 2019 07:11:56 -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=tBrCjYtRGeVIUf2uLSTOH0TDA2MoR8rPeuh7/xAFTR0=; b=D8NKd9TCn22gOEparD+Yox0KHsyQgK83HVi1CC9EJZQdPch0kcHtUx4zj7P8NpF/OS zCzx9pK1dKiJTSV2mz7k6BO/L+ksrPGFNTj5hZt06SUmQldGLNyn5Dhhawjgd/4vg9Ui HMKiDmpE2BlM+KCNO/wxa0ToSer60dlO7IHuI= 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=tBrCjYtRGeVIUf2uLSTOH0TDA2MoR8rPeuh7/xAFTR0=; b=aDoykVSVkDjUCeGb84HhbwHaD/t8rJrzOhnhJLKmsFxM+XpalD4St44gDLTln/CGew Ax5rslqdqMqmj8F/lzBxQ6yAn1e31eOaOkyjfc0x057EJieBkbYZGJaEJVWTV6WqZz1U S6fG2VLqNmmkNXnD6Kmy4EnvexIqmdqUlwwp4mQp9vNb3SOh7dGV76D8HBd2SGmeMSCQ N0/SkCqpCMtdRfjUWYXN5egbZo2hCQ57P2LfbX+HINEntZkLhoyPJyU8k41GbA/7G7rR Ag8xy+osSIcsE3yXMGYSPv/7wRhquFc4N3LFADA5ffve0YrnzKHjdlfdp0v4Yz5tlk2O hf4A== X-Gm-Message-State: APjAAAURkZnVN9vSC2+fxTpV3gDylTtjzuBRAdv555T3OeSA7d939siB 5GmkZzu2nUAkQsOH2ejbl5gi02hXiR6q/fiyJtjRsQ== X-Received: by 2002:a6b:5d18:: with SMTP id r24mr10503356iob.285.1567779116257; Fri, 06 Sep 2019 07:11:56 -0700 (PDT) MIME-Version: 1.0 References: <20190905194859.16219-1-vgoyal@redhat.com> <20190906103613.GH5900@stefanha-x1.localdomain> <20190906120817.GA22083@redhat.com> <20190906095428-mutt-send-email-mst@kernel.org> In-Reply-To: <20190906095428-mutt-send-email-mst@kernel.org> From: Miklos Szeredi Date: Fri, 6 Sep 2019 16:11:45 +0200 Message-ID: Subject: Re: [PATCH 00/18] virtiofs: Fix various races and cleanups round 1 To: "Michael S. Tsirkin" Cc: Vivek Goyal , 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" 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 3:57 PM Michael S. Tsirkin wrote: > > On Fri, Sep 06, 2019 at 08:08:17AM -0400, 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. > > > > Thanks > > Vivek > > Without removal how do we stop guest poking at some files if we want to? > > I guess we could invent a special event to block accesses, > but unplug will just do it. > > blk and scsi support removal out of box, if this is supposed > to be a drop in replacement then I think yes, you want this > support. This is not a drop in replacement for blk and scsi transports. More for virtio-9p. Does that have anything similar? If we get a request for this feature, then yes, what you are saying makes sense. But that hasn't happened yet, so I think this can wait. Thanks, Miklos