Project

General

Profile

Actions

Submit #2988

closed

cpdup should ignore UF_ARCHIVE when deciding whether to copy a file

Added by asomers over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Userland
Target version:
-
Start date:
03/24/2017
Due date:
% Done:

0%

Estimated time:

Description

On operating systems that support it (including Illumos, FreeBSD, and Windows), the UF_ARCHIVE flag means that a file needs to be archived. Filesystems that support this flag (including msdosfs and ZFS) will set it automatically when the file is created.

When deciding whether to copy a file, cpdup should ignore the UF_ARCHIVE file flag. If that flag is supported by the destination file system but it's cleared on a source file, then multiple invocations of cpdup would all copy the source file because its flags wouldn't match. OTOH, if the destination filesystem doesn't support UF_ARCHIVE, then there's no point in cpdup setting it.

Steps to reproduce, using ZFS on FreeBSD:
$ mkdir src dst
$ touch src/foo
$ chflags 0 src/foo
$ cpdup -v src dst
dst/foo copy-ok
$ cpdup -v src dst
dst/foo copy-ok


Files

submit_2988.diff (995 Bytes) submit_2988.diff asomers, 03/24/2017 03:48 PM
Actions #2

Updated by swildner about 7 years ago

  • Status changed from New to Closed

Pushed, thanks!

Actions

Also available in: Atom PDF