All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: "Darrick J. Wong" <darrick.wong@oracle.com>, sandeen@redhat.com
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 3/3] xfs_io: fix the minimum arguments to the reflink command
Date: Thu, 15 Dec 2016 12:38:34 -0600	[thread overview]
Message-ID: <e5f24dd4-8c2b-7b72-0622-22a1e14e6ffc@sandeen.net> (raw)
In-Reply-To: <148182551808.24784.14290922921211733530.stgit@birch.djwong.org>

On 12/15/16 12:11 PM, Darrick J. Wong wrote:
> The reflink command can reflink the entirety of two files if the
> offsets and lengths are not specified... but we forgot to permit
> that case.

Could you do me a favor and also make that clear in the help output?
The manpage says:

       reflink  [ -C ] [ -q ] src_file [src_offset dst_offset length]


but the short help doesn't indicate that it's optional:

reflink infile src_off dst_off len -- reflinks a number of bytes at a specified offset

and neither it nor the long help mentions the -C & -q switches:

xfs_io> help reflink
reflink infile src_off dst_off len -- reflinks a number of bytes at a specified offset

 Links a range of bytes (in block size increments) from a file into a range
 of bytes in the open file.  The two extent ranges need not contain identical
 data.

 Example:
 'reflink some_file 0 4096 32768' - links 32768 bytes from some_file at
                                    offset 0 to into the open file at
                                    position 4096
 'reflink some_file' - links all bytes from some_file into the open file
                       at position 0

 Reflink a range of blocks from a given input file to the open file.  Both
 files share the same range of physical disk blocks; a write to the shared
 range of either file should result in the write landing in a new block and
 that range of the file being remapped (i.e. copy-on-write).  Both files
 must reside on the same filesystem.

V2 or patch 4/3 is fine :)

Thanks,
-Eric

> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  io/reflink.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 
> diff --git a/io/reflink.c b/io/reflink.c
> index a09e82d..d26cbdd 100644
> --- a/io/reflink.c
> +++ b/io/reflink.c
> @@ -302,7 +302,7 @@ reflink_init(void)
>  	reflink_cmd.name = "reflink";
>  	reflink_cmd.altname = "rl";
>  	reflink_cmd.cfunc = reflink_f;
> -	reflink_cmd.argmin = 4;
> +	reflink_cmd.argmin = 1;
>  	reflink_cmd.argmax = -1;
>  	reflink_cmd.flags = CMD_NOMAP_OK | CMD_FOREIGN_OK;
>  	reflink_cmd.args =
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2016-12-15 18:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-15 18:11 [PATCH 1/3] xfs_repair: fix some potential null pointer deferences Darrick J. Wong
2016-12-15 18:11 ` [PATCH 2/3] xfs_repair: fix bogus rmapbt record owner check Darrick J. Wong
2016-12-15 19:20   ` Eric Sandeen
2016-12-15 18:11 ` [PATCH 3/3] xfs_io: fix the minimum arguments to the reflink command Darrick J. Wong
2016-12-15 18:38   ` Eric Sandeen [this message]
2016-12-16  0:51     ` Darrick J. Wong
2016-12-21  4:24   ` Eric Sandeen
2016-12-15 23:17 ` [PATCH 1/3] xfs_repair: fix some potential null pointer deferences Eric Sandeen
2016-12-16  0:58   ` Darrick J. Wong
2016-12-16  1:39     ` Eric Sandeen
2016-12-16  0:52 ` [PATCH 4/3] xfs_io: fix some documentation problems Darrick J. Wong
2016-12-21  4:26   ` Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e5f24dd4-8c2b-7b72-0622-22a1e14e6ffc@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.