Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp892030pxb; Wed, 27 Oct 2021 14:35:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOvYrGBV6g9JxgwuwdumHbKP5MACK3hjfwAL2GTes8z8wsclZgSZvzdO0aY/m6kiVpp9qM X-Received: by 2002:a17:906:a1da:: with SMTP id bx26mr131942ejb.558.1635370514378; Wed, 27 Oct 2021 14:35:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635370514; cv=none; d=google.com; s=arc-20160816; b=CytH1T5tJZniVOjtvLD9i+0m3DgKfsBPe8wBo3YyK/s21ByseNVPbxK0t8Na1HLyK6 B2llPLTE2wbpsN3J/Qg4tUWkKCoZ57b9DYMK5wSJEsCQjAP6F6u0m2hOr1xsCExdk4S0 g3jHnojxjL8XsLH68Y1auq1S1rbKHlnvQyKGUa9YoGUwt0DgTwYW2Au30MQr2dOHvluE KkOGSWwa03fFAizrVopv/mBl4cK74tEKVcjTKwwKcdM+YqWJ9ORTUMf8tqWq16K30A/s 3G2EmbMyJU7iAS4XAk99enz6aIE5FO/WjOJxcijGrGAXV8ED9x56D5Fa4ppeh7ZeHQHn LBUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=HMeHxvkrIXoskqvvjCVbvSOKzxFlMmMPMGH4IRICiLE=; b=Kce6QXRoPWnD60jHaR7HZ0wKCMeX/0LGDd1yQjirrFHExT7HyVbQrQzDEpQBDIUIdN bggQD/EE9durR5aKfatv2aUXWHdQX4S/n6HIH0g4UEd4HHV4M1OpF41QHZeMqNKvCTP1 QT8FouvYA7rQsJTI79pFRVkxjgiEy5h2Z7W5d5v6dwN0kadlszhghL2ZVcDNtyrCdgLp /Vrggyhwt77knpz/aE4H2EWCRXfEkqI47si16HEg88AgG4IKZKWLST9MU4jPph+pR0sl 4j1lEglvEqcWzFikLYe7tN8wG4lUIQkb9sTk/pVJnsa5XHdzJmQP/Ws67hH2vEqO+IA9 xmFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AuHlPCRN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx26si1284313edb.181.2021.10.27.14.34.51; Wed, 27 Oct 2021 14:35:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AuHlPCRN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243957AbhJ0Ujq (ORCPT + 97 others); Wed, 27 Oct 2021 16:39:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:22608 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243937AbhJ0Ujo (ORCPT ); Wed, 27 Oct 2021 16:39:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635367038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HMeHxvkrIXoskqvvjCVbvSOKzxFlMmMPMGH4IRICiLE=; b=AuHlPCRNfMYaJg0DhQnQStSfr6QSFxwOcBV4LlcVgZsg/iHqYQTOPEtjpuIIE81Zs6tZeH ZB/Ra75U7Igob1gZzhgaP3p5/bfFVlsB6N1OvnW4IeydjwU6KIKUJIddQ28gF9ptX4E6Io yLeriqQQ+EoV9FrRZFlj1n/Wwdx03Gc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-445-EP9f_yuHMIqt26ILqORw-A-1; Wed, 27 Oct 2021 16:37:14 -0400 X-MC-Unique: EP9f_yuHMIqt26ILqORw-A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 86A371014BEC; Wed, 27 Oct 2021 20:37:13 +0000 (UTC) Received: from horse.redhat.com (unknown [10.22.34.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6423860BF1; Wed, 27 Oct 2021 20:37:13 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id E9BC4220562; Wed, 27 Oct 2021 16:37:12 -0400 (EDT) Date: Wed, 27 Oct 2021 16:37:12 -0400 From: Vivek Goyal To: Jan Kara Cc: Amir Goldstein , Ioannis Angelakopoulos , linux-fsdevel , virtio-fs-list , linux-kernel , Al Viro , Miklos Szeredi , Steve French Subject: Re: [RFC PATCH 0/7] Inotify support in FUSE and virtiofs Message-ID: References: <20211025204634.2517-1-iangelak@redhat.com> <20211027132319.GA7873@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 27, 2021 at 04:29:41PM -0400, Vivek Goyal wrote: > On Wed, Oct 27, 2021 at 03:23:19PM +0200, Jan Kara wrote: > > On Wed 27-10-21 08:59:15, Amir Goldstein wrote: > > > On Tue, Oct 26, 2021 at 10:14 PM Ioannis Angelakopoulos > > > wrote: > > > > On Tue, Oct 26, 2021 at 2:27 PM Vivek Goyal wrote: > > > > The problem here is that the OPEN event might still be travelling towards the guest in the > > > > virtqueues and arrives after the guest has already deleted its local inode. > > > > While the remote event (OPEN) received by the guest is valid, its fsnotify > > > > subsystem will drop it since the local inode is not there. > > > > > > > > > > I have a feeling that we are mixing issues related to shared server > > > and remote fsnotify. > > > > I don't think Ioannis was speaking about shared server case here. I think > > he says that in a simple FUSE remote notification setup we can loose OPEN > > events (or basically any other) if the inode for which the event happens > > gets deleted sufficiently early after the event being generated. That seems > > indeed somewhat unexpected and could be confusing if it happens e.g. for > > some directory operations. > > Hi Jan, > > Agreed. That's what Ioannis is trying to say. That some of the remote events > can be lost if fuse/guest local inode is unlinked. I think problem exists > both for shared and non-shared directory case. Thinking more about it, one will need remote fsnotify support only if this is a case of shared direcotry. If there are no clients doing parallel operations in shared dir (like dropping some new files), then local inotify should be good enough. And I think Ioannis mentioned that local inotify already work with fuse. For example, kata container developers wanted to use inotify on virtiofs, because a process on host (kubernetes?) will update some sort of config file in shared directory. They wanted to monitor that config in guest, get an inotify event and then act on updated config file. That's the case of shared dir. Given we do not support inotify yet, I think they went ahead with some sort of polling mechanism to take care of there use case. Thanks Vivek