From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAD81C433EF for ; Fri, 25 Feb 2022 16:35:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243068AbiBYQg2 (ORCPT ); Fri, 25 Feb 2022 11:36:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243070AbiBYQg0 (ORCPT ); Fri, 25 Feb 2022 11:36:26 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DCDB11FEDB4 for ; Fri, 25 Feb 2022 08:35:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645806954; 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=fqYY7w88iLzBzKsxm+iVgsvPAyDnq+ffNP0ORFfBhSI=; b=I7qqpsCJXIWLWDoN5f3tnXIYgZcgQxCnZ5+TjpVUuguJ4RfzrN/ce9GwTgKjy9AzmnVDpk 56DUdSI51yQUMIXlkY79Ekj71WcFx+87Xjyf96cNJ0pejitbIeALJq1aOw/UpqjFN5XDhu dv2vlX1L6+OuYOjMPu27EB3AaLaQHJ8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-648--e9CF4UpMz-0XyEgup1qLg-1; Fri, 25 Feb 2022 11:35:50 -0500 X-MC-Unique: -e9CF4UpMz-0XyEgup1qLg-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3967F51A8; Fri, 25 Feb 2022 16:35:49 +0000 (UTC) Received: from horse.redhat.com (unknown [10.22.17.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id D730A7C04A; Fri, 25 Feb 2022 16:35:48 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id 446602237E9; Fri, 25 Feb 2022 11:35:48 -0500 (EST) Date: Fri, 25 Feb 2022 11:35:48 -0500 From: Vivek Goyal To: Steve French Cc: Matthew Wilcox , lsf-pc@lists.linux-foundation.org, linux-fsdevel , LKML , Ioannis Angelakopoulos , CIFS , samba-technical Subject: Re: [LSF/MM/BPF TOPIC] Enabling change notification for network and cluster fs Message-ID: References: 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.14 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, Feb 25, 2022 at 09:27:55AM -0600, Steve French wrote: > On Fri, Feb 25, 2022 at 7:49 AM Matthew Wilcox wrote: > > > > On Fri, Feb 25, 2022 at 08:23:20AM -0500, Vivek Goyal wrote: > > > What about local events. I am assuming you want to supress local events > > > and only deliver remote events. Because having both local and remote > > > events delivered at the same time will be just confusing at best. > > > > This paragraph confuses me. If I'm writing, for example, a file manager > > and I want it to update its display automatically when another task alters > > the contents of a directory, I don't care whether the modification was > > done locally or remotely. > > > > If I understand the SMB protocol correctly, it allows the client to take > > out a lease on a directory and not send its modifications back to the > > server until the client chooses to (or the server breaks the lease). > > So you wouldn't get any remote notifications because the client hasn't > > told the server. > > Directory leases would be broken by file create so the more important > question is what happens when client 1 has a change notification on writes > to files in a directory then client 2 opens a file in the same directory and is > granted a file lease and starts writing to the file (which means the > writes could get cached). This is probably a minor point because when > writes get flushed from client 2, client 1 (and any others with notifications > requested) will get notified of the event (changes to files in a directory > that they are watching). > > Local applications watching a file on a network or cluster mount in Linux > (just as is the case with Windows, Macs etc.) should be able to be notified of > local (cached) writes to a remote file or remote writes to the file from another > client. I don't think the change is large, and there was an earlier version of > a patch circulated for this So local notifications are generated by filesystem code as needed? IOW, in general disable all local events and let filesystems decide which local events to generate? And locally cached write is one such example? Thanks Vivek