Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1097997ybe; Fri, 6 Sep 2019 11:49:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKenBoKFWNJ44cKD8PFNxGlWoW+FpVUIb9EYSxPQ5/2pAUkgM4Sw2vutbUnNeyNpeYczWb X-Received: by 2002:aa7:83c7:: with SMTP id j7mr12519160pfn.167.1567795774946; Fri, 06 Sep 2019 11:49:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567795774; cv=none; d=google.com; s=arc-20160816; b=d6uiTjkb9eRdU/2kRhFhlDz8qRY1hJatkaFGqAER4Zg3/IFxHUIlMsfzfZtZTIqA1g UyLDqyb3EVrjuUlMGeEnSzg55nVtkvAQyhhOsq4+CisPy2+gYDapOnvYM3rSHTWWYyLC TXoAESVk9I+ne9m5ls9ZCZ7KXQEXTpmrgKhkF/4Y0DWhs6389KWSxMkXGL0yJ0/8DKQT kBx9aS2MLdAWWIb1E/30qvrbB5ORd0swZmqDXNB75p7OILwdx3IvVPisBRNW+sxy8uID UVIwbc90s0S3LS8pPdio8uWUajRoM3GcSZwAmVTNty+re+Ww48xogpugRM2W+wp/wlNO 6WdQ== 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=aanmrrFSrbrC16B1/2djxgOZCrfOygi38gX6T8Hx2OE=; b=y3VdqLlTF9k2gGBcyucJbt8aLiVH/CZEiDHz1ZwwibJVlr+dXwnctAJKoCKOEqEdcO aSRuzhdozjU7o4RPRbSIC3SH+WWJnRxsYdGKC+Hbz4eKfSlIgRsMOwnXdFvZr44TXdfu PXBoRNJZjBHMwaDH5bne/1pgRoketc2r1DhnOZ885Bv7RqQMjCVb15/IEexMKQvGKguc BdZXcY+ytjhQEuXCw1ehKVav33eENNaGoW6a990TDqmskXXW/8Hn+afJ0fTkHNa6bvqu 2EDxQbFPTJHYSgfcFBv5R5UJY14GzUi/89h/YSJvgQdANobbrnL4ObGwIn/mLzJURAeA COKw== 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 f61si5511287plf.258.2019.09.06.11.49.19; Fri, 06 Sep 2019 11:49:34 -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 S2405176AbfIFNhc (ORCPT + 99 others); Fri, 6 Sep 2019 09:37:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43192 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405160AbfIFNhb (ORCPT ); Fri, 6 Sep 2019 09:37:31 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (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 6F04DC057EC6 for ; Fri, 6 Sep 2019 13:37:31 +0000 (UTC) Received: by mail-wm1-f71.google.com with SMTP id j11so1002868wmh.2 for ; Fri, 06 Sep 2019 06:37:31 -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=aanmrrFSrbrC16B1/2djxgOZCrfOygi38gX6T8Hx2OE=; b=Bkk5M//sJ0NfVTsuhbtDn/H8OO+pqOXe/bUETw4IoIvPldpB7in2f0y7SSreB092yH bl1RpLBUkwFy2/fIyitDtpQ3OVwk1e8d4xII+mI2USHjp4FCz1xTJBxQkIPtwz2vE/02 wT+VEfm6g0jsUZBKO+nBY5+8vj3ePVbEkqvdxrubMGRE6rofGDdGklONz9uREKeAyeke wAQDYl5mwgtLSi2EvlVp2nBWF1gugbxTtqqp/3L2zO14OJ2n3ozR1KUGYsYQxawtBk5x hXET3Pp4BJPAopeDBgsmqMYo7g7Umw/SB23WkcU7880ByUkcNUFVDzdXw6QO27DlhCj3 3J8Q== X-Gm-Message-State: APjAAAWa1YxLUxTT5gToiSjKw4AvARpRLlsy4kp1K66Tubub3X8naT3W fPAQYuj4ifkylNnEXMkjnx9s0Uj6kL4ek/Awtr1LmpaIh8DuMAjBlGM8wfoIw8a4l5aYFmbuasb exeezXVeWU3dUxLqBN0SFXO0K X-Received: by 2002:a5d:5387:: with SMTP id d7mr7529783wrv.312.1567777050245; Fri, 06 Sep 2019 06:37:30 -0700 (PDT) X-Received: by 2002:a5d:5387:: with SMTP id d7mr7529755wrv.312.1567777049914; Fri, 06 Sep 2019 06:37:29 -0700 (PDT) Received: from redhat.com (bzq-79-176-40-226.red.bezeqint.net. [79.176.40.226]) by smtp.gmail.com with ESMTPSA id k6sm10237535wrg.0.2019.09.06.06.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2019 06:37:29 -0700 (PDT) Date: Fri, 6 Sep 2019 09:37:26 -0400 From: "Michael S. Tsirkin" To: Vivek Goyal Cc: linux-fsdevel@vger.kernel.org, virtualization@lists.linux-foundation.org, miklos@szeredi.hu, linux-kernel@vger.kernel.org, virtio-fs@redhat.com, stefanha@redhat.com, dgilbert@redhat.com Subject: Re: [PATCH 00/18] virtiofs: Fix various races and cleanups round 1 Message-ID: <20190906093703-mutt-send-email-mst@kernel.org> References: <20190905194859.16219-1-vgoyal@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190905194859.16219-1-vgoyal@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 05, 2019 at 03:48:41PM -0400, 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. > > virsh qemu-monitor-command --hmp vm9-f28 device_del myvirtiofs > > Now a mounted device can be removed and file system will return errors > -ENOTCONN and one can unmount it. > > Miklos, if you are fine with the patches, I am fine if you fold these > all into existing patch. I kept them separate so that review is easier. > > Any feedback or comments are welcome. > > Thanks > Vivek > Another version of a patch with fixes all rolled in would also be nice. > Vivek Goyal (18): > virtiofs: Remove request from processing list before calling end > virtiofs: Check whether hiprio queue is connected at submission time > virtiofs: Pass fsvq instead of vq as parameter to > virtio_fs_enqueue_req > virtiofs: Check connected state for VQ_REQUEST queue as well > Maintain count of in flight requests for VQ_REQUEST queue > virtiofs: ->remove should not clean virtiofs fuse devices > virtiofs: Stop virtiofs queues when device is being removed > virtiofs: Drain all pending requests during ->remove time > virtiofs: Add an helper to start all the queues > virtiofs: Do not use device managed mem for virtio_fs and virtio_fs_vq > virtiofs: stop and drain queues after sending DESTROY > virtiofs: Use virtio_fs_free_devs() in error path > virtiofs: Do not access virtqueue in request submission path > virtiofs: Add a fuse_iqueue operation to put() reference > virtiofs: Make virtio_fs object refcounted > virtiofs: Use virtio_fs_mutex for races w.r.t ->remove and mount path > virtiofs: Remove TODO to quiesce/end_requests > virtiofs: Remove TODO item from virtio_fs_free_devs() > > fs/fuse/fuse_i.h | 5 + > fs/fuse/inode.c | 6 + > fs/fuse/virtio_fs.c | 259 ++++++++++++++++++++++++++++++++------------ > 3 files changed, 198 insertions(+), 72 deletions(-) > > -- > 2.20.1