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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45364C33C9E for ; Wed, 15 Jan 2020 00:09:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1E4AE24679 for ; Wed, 15 Jan 2020 00:09:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728901AbgAOAJH (ORCPT ); Tue, 14 Jan 2020 19:09:07 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:47660 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728759AbgAOAJH (ORCPT ); Tue, 14 Jan 2020 19:09:07 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1irWF7-008Oiq-4g; Wed, 15 Jan 2020 00:09:05 +0000 Date: Wed, 15 Jan 2020 00:09:05 +0000 From: Al Viro To: Amir Goldstein Cc: Jan Kara , linux-fsdevel Subject: Re: dcache: abstract take_name_snapshot() interface Message-ID: <20200115000905.GE8904@ZenIV.linux.org.uk> References: <20200114154034.30999-1-amir73il@gmail.com> <20200114162234.GZ8904@ZenIV.linux.org.uk> <20200114191907.GC8904@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed, Jan 15, 2020 at 02:03:35AM +0200, Amir Goldstein wrote: > Only problem I forgot about is that I need to propagate name_snapshot > into fsnotify_move() instead of qstr (in order to snapshot it). > That means I will need to snapshot also new_dentry in vfs_rename(), so > I have a name_snapshot to pass into the RENAME_EXCHANGE > fsnotify_move() hook. > > My current patch passes the cute &old_dentry->d_name_snap abstract > to fsnotify_move(). > > What shall I do about that? > > take_dentry_name_snapshot(&new_name, new_dentry); > ??? Wait a sec... How long is that thing going to be using the snapshot? And I bloody well hope that this is _not_ going to be unconditional - having each rename() pay for *notify is a bad idea, for obvious reasons. Details, please...