Sam James <[email protected]> writes:
> Collin Funk <[email protected]> writes:
>
>> Hi,
>>
>> Is there a reason that 'install --reflink' does not exist? I was curious
>> myself, and saw someone asked the same thing a few years ago [1]. As far
>> as I can tell they didn't get a response, but the lists.gnu.org
>> interface isn't great at tracking things across months so I could have
>> missed it.
>>
>> I can't immediately think of why it shouldn't be supported. Both cp and
>> install have --debug, though I suppose that is more useful for
>> --reflink=auto and copying items which may go to a different file
>> system.
>
> I have no objection to it, but I wonder if there's much value in it.
Maybe not, lets see what others think.
Outside of consistency and the code already being there,
--reflink=never also prevents copy_file_range from being used. That
would have helped at least slightly with the recent glibc bug that
affected copy_file_range [2]. Fingers crossed that those issues are
mostly behind us, so that API can have a rest from its suffering.
> install already defaults to --reflink=auto (*):
>
> (*) This was not the case at the time of the ML post you mention as [1].
Yes, I should have mentioned that for other readers. Thanks.
>
> static void
> cp_option_init (struct cp_options *x)
> {
> cp_options_default (x);
> x->copy_as_regular = true;
> x->reflink_mode = REFLINK_AUTO
> ...
> x->sparse_mode = SPARSE_AUTO;
> ...
> }
>
> Would we want to add a control for sparse too?
I think that makes sense.
Collin
[2] https://bugs.gnu.org/79139