GNU bug report logs - #52193
mv broken on non-APFS filesystems on macOS on coreutils >= 9.0

Previous Next

Package: coreutils;

Reported by: Sudhip Nashi <sudhipnashi <at> icloud.com>

Date: Tue, 30 Nov 2021 00:52:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Sudhip Nashi <sudhipnashi <at> icloud.com>
Cc: 52193 <at> debbugs.gnu.org, Cameron Katri <me <at> cameronkatri.com>
Subject: bug#52193: mv broken on non-APFS filesystems on macOS on coreutils >= 9.0
Date: Tue, 7 Dec 2021 10:51:06 -0800
On 12/6/21 20:40, Sudhip Nashi wrote:
> The issue should be reproducible when moving directories and files within ~/mntpnt, but not between that filesystem and the parent APFS one, and vice versa.
> 

Thanks, but as I don't have access to a macOS machine I don't know what 
"the issue" is. What are the symptoms visible to the user? Can you do 
the equivalent of an strace to show us what system calls are being executed?

As near as I can make out, on macOS mv should be doing the equivalent of 
the following:

   sfd = open ("source", O_RDONLY | O_NOFOLLOW);
   if (fclonefileat (sfd, AT_FDCWD, "destination", 0) != 0)
     {
        dfd = open ("destination", O_WRONLY | O_CREAT | O_EXCL, mode);
        next_start = lseek (sfd, 0, SEEK_DATA);
        ...

and evidently something is going wrong at or after the "...". What is it?




This bug report was last modified 3 years and 220 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.