Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3589061lfo; Mon, 23 May 2022 08:38:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7G6KbxOOY6YoPHeQcFCv/lzFOvIkNBCX5Cjxp2G4nPaXYcaRXnsAAlhIupdZPRwgtAJaB X-Received: by 2002:a17:902:8696:b0:15d:946:2f98 with SMTP id g22-20020a170902869600b0015d09462f98mr23463374plo.82.1653320312471; Mon, 23 May 2022 08:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653320312; cv=none; d=google.com; s=arc-20160816; b=DrKh7dcMB/eAKRpMvb8q8XP2f3jvE3F9Fk65+Tkkg7Y6VirrKsSyVmvFahfDu6YV2e EkSp84/u2180lIIj9QUfFVD203sT9Tgr2ND9bkWcb35x7k6yYUUPFOH4DowDBdxnz99W ghXly/JXfAlGNv9zDoe6voVrz12wMfVk4NWmOUCwZUSFNjVFAjlmytWiKYNWd5U7TzNh 1brkFdTqFtLBLEfonK79Ep9wlEUE0U1FrED0tbFCCx98QjYCWxuSNVmDMYZrpTQdhGuK ugMUTVYESek4zoQSZHPpkyucvO0Nlwm7qJ8BeEYuj42dexok8ym0n+WrXii9R0aZbSIH MwwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=q2KAC1uUtSEkUItQB1W9uMOP2zx1Fex80FCDALCr5LA=; b=GtzVyhsSte3nc/yzj0t54ujLhJxEVDQoEegIYVn4QlPNPP65W6MtzYEQRA0jzXHHFZ JMbiP2Pc/axdX6kJPREs8L/RCQ3dcbOwRj6TIp0tuA6DKhiuUCA2JyjntfKswNGs25qH OG4ap1oUKWLG5xiojtA7CJy5ftr+qD5vdqnUPKPCD9rNZBEClKH62NWez6UHwWkCbRbH AHMdBGTFacUcL288RkAz36Qf3VJgWbubDI0Jj9sjvcjnXT0VZenLgCV110sHmbDLeyPp J23bLpSjDQlKm74sxn/BQDeWsT0cBfOdZMHPK0Aa9patvv5C3W+GR90Cqy8Vmboy2NnJ mFFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SUTjCLW+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id bg9-20020a1709028e8900b0015c16a75912si9556985plb.552.2022.05.23.08.38.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 08:38:32 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SUTjCLW+; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ADFAED10F; Mon, 23 May 2022 08:36:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238000AbiEWPfw (ORCPT + 99 others); Mon, 23 May 2022 11:35:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237929AbiEWPfu (ORCPT ); Mon, 23 May 2022 11:35:50 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 03BDB54BDF for ; Mon, 23 May 2022 08:35:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653320148; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q2KAC1uUtSEkUItQB1W9uMOP2zx1Fex80FCDALCr5LA=; b=SUTjCLW+LtbWul7VqxuCAD4yZ+H6MyS+85rUF30hFmwMLwquWxF/V3AZn4CocPk4GAX5XG uKNJvsi+UpjFT/W+ne9ecLe+XGAx/vA6tsE0yAJ9xfVghuYS7GAvjmfdT0qiTMgn+xWS9H NZVBNLcYPOHnDyk799ZgRXwufF6NsNw= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-241-BL78one-OtGIYkhLZ8gTJA-1; Mon, 23 May 2022 11:35:46 -0400 X-MC-Unique: BL78one-OtGIYkhLZ8gTJA-1 Received: by mail-wr1-f70.google.com with SMTP id x4-20020a5d4444000000b0020d130e8a36so4125074wrr.9 for ; Mon, 23 May 2022 08:35:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=q2KAC1uUtSEkUItQB1W9uMOP2zx1Fex80FCDALCr5LA=; b=Z6KMGMyF/AFPic2OW8Tnb1vygcgAd/zph31MGlMM6BmH4kL0g/NiXSEIouy3TfIN1E /nH/xmnlCnDXm1DHB2hpAO+x9ZuQvGBktsQ7xXAaS27WGPGk//9Mi+QDp/ENAEEL3xhD EGeHcqoaZ8ZLK+vKaCKOKvTTcu1WGzvMqkh1xfWJwd27JHgAIvvb7SA5yO5pbK3wCFXK xKvKp7C41Zsnin/O0+NtmcK7lGOtK3zyUPRAaJ6MHsAsUhqipTmIeM7dKMB7rWWakpew g0apX/fxAEt5O8+JRp3vs/AK3GNV7w1Q/cZzJ0WwKL1PQtxZTyHyMYUe6z0TpzncxkgC lpMw== X-Gm-Message-State: AOAM530xaZ7e1sdVdPxOoftz7EfnAKPDThhKiuduc8uZ6RtgbJwoyxkC dphSVZwRG6f+toOFtzt5yr1K2SsF5YmCz/GZC2lVod2a3fTLN5XMzxMv8RP18w5XzzNEkAe2VZm vMlWBTJYNg3Y0I+sAClfIjb3l X-Received: by 2002:a05:6000:18a4:b0:20e:79a2:4613 with SMTP id b4-20020a05600018a400b0020e79a24613mr14059553wri.459.1653320143180; Mon, 23 May 2022 08:35:43 -0700 (PDT) X-Received: by 2002:a05:6000:18a4:b0:20e:79a2:4613 with SMTP id b4-20020a05600018a400b0020e79a24613mr14059537wri.459.1653320142852; Mon, 23 May 2022 08:35:42 -0700 (PDT) Received: from [192.168.1.129] (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id o3-20020a1c4d03000000b003942a244f30sm10357845wmh.9.2022.05.23.08.35.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 May 2022 08:35:42 -0700 (PDT) Message-ID: <6b5e584a-6d08-afc5-d503-7ef830ee1165@redhat.com> Date: Mon, 23 May 2022 17:35:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [RFC PATCH 2/3] fat: add renameat2 RENAME_EXCHANGE flag support Content-Language: en-US To: OGAWA Hirofumi Cc: linux-kernel@vger.kernel.org, Colin Walters , Peter Jones , Alexander Larsson , Alberto Ruiz , Christian Kellner , Lennart Poettering , Chung-Chiang Cheng References: <20220519092343.2776414-1-javierm@redhat.com> <20220519092343.2776414-3-javierm@redhat.com> <87fsl1cvl7.fsf@mail.parknet.co.jp> From: Javier Martinez Canillas In-Reply-To: <87fsl1cvl7.fsf@mail.parknet.co.jp> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hello OGAWA, Thanks a lot for your feedback. On 5/22/22 19:42, OGAWA Hirofumi wrote: > Javier Martinez Canillas writes: > >> The renameat2 RENAME_EXCHANGE flag allows to atomically exchange two paths >> but is currently not supported by the Linux vfat filesystem driver. >> >> Add a vfat_rename_exchange() helper function that implements this support. >> >> The super block lock is acquired during the operation to ensure atomicity, >> and in the error path actions made are reversed also with the mutex held, >> making the whole operation transactional. > > I'm not fully reviewed yet though (write order and race), basically > looks like good. > Thanks for looking at the patch. I agree with all your remarks and will address them in v2. Please let me know once you have reviewed if is OK from a write order and race point of view. -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat