Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp904337ybe; Fri, 6 Sep 2019 09:01:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxItITbSwIanglhzZItu/wNQ9D/7BJkkBVSMYJ7WqFHnZ7iHUqkcIyodM4BaUu/RMJK0hOm X-Received: by 2002:a62:e50c:: with SMTP id n12mr11613725pff.206.1567785719200; Fri, 06 Sep 2019 09:01:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567785719; cv=none; d=google.com; s=arc-20160816; b=N/6QIJVmRTagSl8etu6xoqmCqggP3DFvQGXUlSt/XnPpWZTBoCOThQA40YB/2x/wOT CymxVsjgIbzyyvbIJPsHB5Zy+zeN2e7XjXRUiUSnmy57azciePmu4fg3PJleRjm215bb S9AcgddE6qcm6YwEAmKlGp1EI6KR/JBF39yQl5WPWMksof7dFV8npLnwx7Nos9Z99BFb xkFuNxoCwv5GvREBL3OU+KD+Kc1NGTWXsZ3fdvMU/Y4UdHTEOG3wSNELxgsR/k8HUANo 2QW6nZvyTfW42rFoHRcaCBS3hGX+Ya4TrzfT454bcDzCPK/emv3yhUGCHJcpvWMz4IzG cw5Q== 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=jD0CMHzz2fCq/VVEXBza28XVl043hfhzE1y+CK1MpiM=; b=lAo8k9IXQYaEKUGgbIflrzKoV3ntLEzEm4IQx/6nbHMqbz+CQ9l79FswJt63mZ3o6e WEqNwzfJYt0FLZFusytYV4f+JZZ0/rw8kuxsyzvgilnyJme09YiroJWA3zhQMpI5tyiq piM4fqrdZGMctSw9JSGsc1QHBrWNKcfIysNOovYJqSg3F5aT8L0ySuRN/8Ts+0YsFG07 lFhPtKxLyLMxPMz7Hgn+NKTBIFAjieMR0gxxcCO8q5MyhNuj8jHU2rj3aJoTuRePEvSA 1XhkR032+zBWwsTu2HHXzmTDrsfj+JDmYaqOAPS3O/5llFqlLQ4n2vKs1/WvRNo/Xhvt 1ksw== 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 k21si5707294pfk.266.2019.09.06.09.01.43; Fri, 06 Sep 2019 09:01:59 -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 S2392071AbfIFK5G (ORCPT + 99 others); Fri, 6 Sep 2019 06:57:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38998 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388816AbfIFK5G (ORCPT ); Fri, 6 Sep 2019 06:57:06 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1ED6F308FB9A; Fri, 6 Sep 2019 10:57:06 +0000 (UTC) Received: from localhost (ovpn-117-208.ams2.redhat.com [10.36.117.208]) by smtp.corp.redhat.com (Postfix) with ESMTP id 52FDF5D9E1; Fri, 6 Sep 2019 10:56:59 +0000 (UTC) Date: Fri, 6 Sep 2019 11:56:58 +0100 From: Stefan Hajnoczi 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, dgilbert@redhat.com, mst@redhat.com Subject: Re: [PATCH 10/18] virtiofs: Do not use device managed mem for virtio_fs and virtio_fs_vq Message-ID: <20190906105658.GR5900@stefanha-x1.localdomain> References: <20190905194859.16219-1-vgoyal@redhat.com> <20190905194859.16219-11-vgoyal@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Sf3MmCJcUNNLokcm" Content-Disposition: inline In-Reply-To: <20190905194859.16219-11-vgoyal@redhat.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 06 Sep 2019 10:57:06 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sf3MmCJcUNNLokcm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 05, 2019 at 03:48:51PM -0400, Vivek Goyal wrote: > These data structures should go away when virtio_fs object is going away. > When deivce is going away, we need to just make sure virtqueues can go > away and after that none of the code accesses vq and all the requests > get error. >=20 > So allocate memory for virtio_fs and virtio_fs_vq normally and free it > at right time. >=20 > This patch still frees up memory during device remove time. A later patch > will make virtio_fs object reference counted and this memory will be > freed when last reference to object is dropped. >=20 > Signed-off-by: Vivek Goyal > --- > fs/fuse/virtio_fs.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) Reviewed-by: Stefan Hajnoczi --Sf3MmCJcUNNLokcm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAl1yO3oACgkQnKSrs4Gr c8gsdQgAw8es95r3jldWITNK2HV3hQUadAUD6wcJTqh47Co/1pn1JWttU9UhsGCs wlgovlHxIO9oPsjaBc+Vcyczu7QtV+5x4r2lAsxHBH0idZnq6H8T+Om+iM9F3Bhs hlXTBKrjDt3anxgGHZ/EysPRolxSBPr3W81uqVOATwsS8zKO0liMr6z6brUc12Jx a9w/zciAljgcusrSgVkQ5C1JwCvMxgGctU1rqzPE1QwPHOT+1/+f7KqJYmTvCYHJ NfWPrl8z3I68LSE9XkSL6oVU9NDNbey1lzpGIBOpOmZZqucUU67jXy8HO3z2iNB6 UUKV1kzQjkeYn8GGRSqyyJhao8stKw== =d30F -----END PGP SIGNATURE----- --Sf3MmCJcUNNLokcm--