Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5202177ioo; Tue, 31 May 2022 23:54:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMWTeQjXCR9IKpMsJcnbSBnPaN83/ZzjwtYt7s2Y4VERxo7XnE9Spem3ZS9KXCJxsnMzxb X-Received: by 2002:a05:6402:388d:b0:42a:ba9f:f85c with SMTP id fd13-20020a056402388d00b0042aba9ff85cmr69555952edb.292.1654066467800; Tue, 31 May 2022 23:54:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654066467; cv=none; d=google.com; s=arc-20160816; b=TctyYLe/wHhL2mOaOmFkYe+wRwJHfbLLcEOJVvUFC2Ldp42RAJeU4gMOaO5m8XfR36 QQKjRzgAyWOLC/CWzdRx5cej61B3SptXgEsgccFTqSsxutbRkVdkk1a7Ate2cva/niir VEK6b9LUHccaPEXsEJqkUSuBei8bgVSvFZfCAvNlobGC+OAGEXls3HAIW1PRAxxGhsNd qMUHf3M21gEqi3rztHcKW0/x8U82QBQGx8XiESoKclU1C5RXKP+6aAcE7x6eu1B4F4uI hkBN1vB+NSuQKPwStTRnkpztcPd70bxbP2Jaiw1L0MWArp+lUPPYKlu+aT9n6QYPqLox 80Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from; bh=4A8wUPRHv2Zmv7H9Fg0Lj8vnp4Cxl1eLzN5EXpOEAnE=; b=rDe1VjDjl6Z7QqWgjwr47+hgUr2Asb+V/ab3IyzM1+6nhiI8gekKDtiUrWpkG97kR1 m1ICMsReuVryh62v6nzpm0cuTQrbnNIiDfQHA8xNsqYy5Cb65cyiCtfP7aorvBo4dKmP Byvc2HTVp3Pk72nq0rZe1Gqr3JTuXHTxwp7+mZgo9tZf6dXWJVOJkWb2jmtqUazg4kEF FZrhR0dGXkk1a6K4wa5FcaClMJZaTwMyiD71sUC8MCKT+130pV6D+nb05nbBV4FuFfC9 SuMbq6ltCnEQWPs7B38zwjrR+8WH1EB68hkSDGxtIHGCjq9cbSsjt7tO5PfASnZ19FlB 39VQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1-20020a1709060e4100b006feaa43616asi844368eji.272.2022.05.31.23.53.45; Tue, 31 May 2022 23:54:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344331AbiEaMlv (ORCPT + 99 others); Tue, 31 May 2022 08:41:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344267AbiEaMlt (ORCPT ); Tue, 31 May 2022 08:41:49 -0400 Received: from mail.parknet.co.jp (mail.parknet.co.jp [210.171.160.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3CED31056F for ; Tue, 31 May 2022 05:41:48 -0700 (PDT) Received: from ibmpc.myhome.or.jp (server.parknet.ne.jp [210.171.168.39]) by mail.parknet.co.jp (Postfix) with ESMTPSA id ABA8B20012B9; Tue, 31 May 2022 21:41:47 +0900 (JST) Received: from devron.myhome.or.jp (foobar@devron.myhome.or.jp [192.168.0.3]) by ibmpc.myhome.or.jp (8.16.1/8.16.1/Debian-3) with ESMTPS id 24VCfkaR042459 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 31 May 2022 21:41:47 +0900 Received: from devron.myhome.or.jp (foobar@localhost [127.0.0.1]) by devron.myhome.or.jp (8.16.1/8.16.1/Debian-3) with ESMTPS id 24VCfk49221105 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 31 May 2022 21:41:46 +0900 Received: (from hirofumi@localhost) by devron.myhome.or.jp (8.16.1/8.16.1/Submit) id 24VCfj6Q221104; Tue, 31 May 2022 21:41:45 +0900 From: OGAWA Hirofumi To: Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, Christian Kellner , Muhammad Usama Anjum , Alexander Larsson , Alberto Ruiz , Peter Jones , Lennart Poettering , Colin Walters , Chung-Chiang Cheng Subject: Re: [PATCH v3 2/3] fat: add renameat2 RENAME_EXCHANGE flag support References: <20220526134119.242182-1-javierm@redhat.com> <20220526134119.242182-3-javierm@redhat.com> <87ilpmows4.fsf@mail.parknet.co.jp> <0ca7d264-2522-c820-d26e-19b6685d5016@redhat.com> Date: Tue, 31 May 2022 21:41:45 +0900 In-Reply-To: <0ca7d264-2522-c820-d26e-19b6685d5016@redhat.com> (Javier Martinez Canillas's message of "Tue, 31 May 2022 14:15:02 +0200") Message-ID: <87czftq3g6.fsf@mail.parknet.co.jp> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Javier Martinez Canillas writes: >> Main purpose of me is to consolidate helpers with vfat_rename(), and >> tweak coding style to use existent fat codes. >> > > Indeed. What do you think of the following plan for v4 ? > > 1) Keep patch "fat: add a vfat_rename2() and make existing .rename callback a helper" > as the first patch of the series. > 2) Add a patch #2 with your authorship that adds the helper and use them in the > vfat_rename() function. > 3) Make this patch "fat: add renameat2 RENAME_EXCHANGE flag support" to be patch #3 > and use the helpers introduced in patch #2. > 4) Make patch #4 to not only add a test for RENAME_EXCHANGE but also for renameat() > and renameat2(..., RENAME_NOREPLACE). That way it will also cover your changes in > patch #2. I don't care much about it because whole is not big (in short, I'm ok with even one patch), so the point is the patches should be able to bisect easily if separated. >>> + /* update inode version and timestamps */ >>> + inode_inc_iversion(old_inode); >>> + inode_inc_iversion(new_inode); >> >> Why do we need to update iversion of those inodes? I couldn't get intent >> of this. >> > > To be honest, I wasn't sure about this either but I saw that the implementation > of RENAME_EXCHANGE in other filesystems did. For example btrfs_rename_exchange(). Ok. If I'm not overlooking, it looks like only btrfs. Please remove those inode_inc_iversion() for {new,old}_inode. Thanks. -- OGAWA Hirofumi