GNU bug report logs -
#48833
reflink copying does not check/set No_COW attribute and fail
Previous Next
Full log
Message #23 received at 48833 <at> debbugs.gnu.org (full text, mbox):
On 6/5/21 10:42 PM, Zygo Blaxell wrote:
> If cp -a implements the inode attribute propagation (or inheritance), then
> only users of cp -a are impacted. They are more likely to be aware that
> they may be creating new files with reduced-integrity storage attributes.
True, although I think this aspect of attribute-copying will typically
come as a surprise even to "cp -a" users.
> If the file is empty, you can chattr +C or -C. If the file is not
> empty, chattr fails with an error.
Although coreutils 'cp -a' currently truncates any already-existing
output file (by opening it with O_TRUNC), it then calls copy_file_range
before calling fsetxattr on the destination. Presumably cp should do the
equivalent of chattr +C before doing the copy_file_range stuff. (Perhaps
you've already mentioned this point; if so, my apologies for the
duplication.)
This bug report was last modified 2 years and 263 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.