Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1861966pxu; Sun, 6 Dec 2020 09:45:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOXrUIrKHbf/5g8QE9kpIc4tKaj9oh+mSZlnPwvocwJkM+1WMOaDYui1l0vpG3zp81mLjJ X-Received: by 2002:a17:906:5293:: with SMTP id c19mr15866837ejm.72.1607276751510; Sun, 06 Dec 2020 09:45:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607276751; cv=none; d=google.com; s=arc-20160816; b=QZtQpVtRL3PcpIo6K36IKvKWo3FKlwDu+gmK2pb6VX7AFIscyqmAkLugzpqgX+VVqL mmn4lwXT/xMI6/GzW4ml+NnBssxTORGEdGEnEvmZu06i/PnKGgS4VfCSke0cO/ZYGBnM iUxP4QGnA+oYrL73hJvqnYPbZMRV1UmpFuNZnPqpH2qLXerPtGKeFWm1wO63imVI45wq DL6vLhZoma3rSrXMhAaoK3nZzuqv2YYWeGuceD3xaixaMuMlsmL1xRrK6cSxNodZXbRM zoIcGYCuTeJ7k4Z4Bl2hj+BXv/8eVYtQCy9apUUt21/6WHgSiNq3RmF46nNWPJ+dMt7b kKNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=HFIns3rd3El5QJgNIOadH2zH9dMi5jX8+CpShE10DEw=; b=woyPwk0VQpUAhrrknChfbkcM2aSK8x03+mFqtgbWJA4dpFqmcijStdC7TT4nPmCDc9 xXogaABudYb02IeNYgUdewxP5qhPUPwv48vW4fZ3hbakbAOTl3kREVngLvVDDZDf4tIT CUOwBJVpnDlmTsSzicLHOs6cXuFjZqLgFeD5/jjvEAGOj7KGlrwnukJHejyMyXyzeT5I YKaea8nJ80ielepQVUsKsryJt6N+QMl/8XFZzZmsR35I4Ngy/hJVL6rXjN3srhH3jRqU BJcc9ruDTtmqJ50N6AHYEMjQh85tGA+hV1/JWWtaRacLsqeZXy01ABlIKRgy1Ckn+J+Z 3JOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n7si5255208ejz.458.2020.12.06.09.45.27; Sun, 06 Dec 2020 09:45:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726370AbgLFRo7 (ORCPT + 99 others); Sun, 6 Dec 2020 12:44:59 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:38706 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726043AbgLFRo6 (ORCPT ); Sun, 6 Dec 2020 12:44:58 -0500 Received: from 139.35.155.90.in-addr.arpa ([90.155.35.139] helo=riva.pelham.vpn.ucam.org) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kly50-0007Ee-MO; Sun, 06 Dec 2020 17:44:14 +0000 Received: from ns1.pelham.vpn.ucam.org ([172.20.153.2] helo=riva.ucam.org) by riva.pelham.vpn.ucam.org with esmtp (Exim 4.92) (envelope-from ) id 1kly50-0005k9-14; Sun, 06 Dec 2020 17:44:14 +0000 Date: Sun, 6 Dec 2020 17:44:14 +0000 From: Colin Watson To: "Theodore Y. Ts'o" Cc: Paul Menzel , Andreas Dilger , linux-ext4@vger.kernel.org, Dimitri John Ledkov Subject: Re: ext4: Funny characters appended to file names Message-ID: <20201206174414.GA21819@riva.ucam.org> References: <20201204152802.GQ441757@mit.edu> <93fab357-5ed2-403d-3371-6580aedecaf4@molgen.mpg.de> <20201204180541.GC577125@mit.edu> <51a1939c-2a99-e86a-1799-c31248e21d89@molgen.mpg.de> <20201206144416.GM13361@riva.ucam.org> <20201206151527.GE577125@mit.edu> <20201206173746.GN13361@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201206173746.GN13361@riva.ucam.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Sun, Dec 06, 2020 at 05:37:46PM +0000, Colin Watson wrote: > I don't know why Dimitri chose to explicitly remove the new files first > rather than just renaming over the top and then removing any leftovers > at the end; that seems unnecessarily risky. Though this is code that's > apparently supposed to work on Windows as well, and the MoveFile > function that's used to implement grub_util_rename there requires the > destination file not to exist (sigh), so maybe it had something to do > with that. Incidentally, if this is actually the reason, then I think this would be a viable replacement: ret = !MoveFileEx (windows_from, windows_to, MOVEFILE_REPLACE_EXISTING); Not that I really speak the Windows API ... -- Colin Watson (he/him) [cjwatson@ubuntu.com]