From: David Sterba <dsterba@suse.cz>
To: Mark Fasheh <mfasheh@suse.de>,
Gabriel de Perthuis <g2p.code@gmail.com>,
Josef Bacik <jbacik@fusionio.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PROGS PATCH] Import btrfs-extent-same
Date: Tue, 3 Sep 2013 15:41:29 +0200 [thread overview]
Message-ID: <20130903134129.GB18147@suse.cz> (raw)
In-Reply-To: <20130902164358.GE23113@twin.jikos.cz>
On Mon, Sep 02, 2013 at 06:43:58PM +0200, David Sterba wrote:
> > So I would suggest maybe something like the syhntax of btrfs-extent-same.c:
> >
> > btrfs dedupe files len file1 loff1 file2 loff2 ...
>
> I'm not sure I see what 'len' means here, length of the dedup block?
Now I'm reading more carefully, the arguments are the same as for
btrfs-extent-same that does only the simple task of deduping just one
extent, but that's not the point behind 'btrfs dedup files *'.
So there are 2 usecases:
1 - give it a bunch of files and try to dedup as much as possible among
their data
2 - what btrfs-extent-same does, dedup just a specified range in 2 files
I'm not sure if #2 is going to be used widely though it would bring some
flexibility and fine tuning, besides testing purposes.
I think it would be good to keep both modes under one command, so it's a
matter of a sane UI.
#2 would look like:
$ btrfs dedup files --length 4096 --src-offset 0 --dest-offset 4096 file1 file2
and fail if != 2 files are given
#1 :
$ btrfs dedup files --min-length 65536 file1 file2 file3 ...
I think we could come up with more hints like 'min-length' based on user
requirements, but I'd like to get some agreement if this is the way to
go.
thanks,
david
next prev parent reply other threads:[~2013-09-03 13:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 22:38 [PROGS PATCH] Import btrfs-extent-same Gabriel de Perthuis
2013-08-06 15:31 ` David Sterba
2013-08-13 19:35 ` Mark Fasheh
2013-09-02 16:43 ` David Sterba
[not found] ` <2014964.FiAiDKtOtq@f17simon>
2013-09-03 13:28 ` David Sterba
2013-09-03 13:41 ` David Sterba [this message]
2013-09-03 17:18 ` Mark Fasheh
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=20130903134129.GB18147@suse.cz \
--to=dsterba@suse.cz \
--cc=g2p.code@gmail.com \
--cc=jbacik@fusionio.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=mfasheh@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).