bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] cp: add --reflink=auto option to fall back to standard copy


From: Jim Meyering
Subject: Re: [PATCH] cp: add --reflink=auto option to fall back to standard copy
Date: Wed, 26 Aug 2009 11:55:29 +0200

Pádraig Brady wrote:
> Attached is a patch to add a new parameter to the --reflink option,
> which will perform a standard copy if COW is not supported.
>
> comments appreciated.
> cheers,
> Pádraig.
>>From b1ef11949b95446e6df08ce128d38554715e500b Mon Sep 17 00:00:00 2001
> From: =?utf-8?q?P=C3=A1draig=20Brady?= <address@hidden>
> Date: Wed, 26 Aug 2009 00:32:43 +0100
> Subject: [PATCH] cp: add --reflink=auto option to fall back to standard copy
>
> * doc/coreutils.texi (cp invocation): Document the new
> "auto" and "always" options to --reflink.
> * src/copy.c (copy_reg): Fall back to a standard copy
> when reflink() is not supported and --reflink=auto specified.
> * src/copy.h: Change the reflink option from bool to an enum.

* src/copy.h [struct cp_options] (reflink): Change type s/bool/enum/.

> * src/cp.c (usage): Describe the --reflink={always,auto} options
> and expand a little on what --reflink does.
> (main): parse the new parameters to --reflink.
> * src/install.c (cp_option_init): Init the enum instead of bool
> * src/mv.c (cp_option_init): Likewise.

Good idea.  This change looks fine.
Please add a NEWS entry.
Also, it'd be nice if you would add a test to exercise the new options.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]