All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc MERLIN <marc@merlins.org>
To: linux-btrfs@vger.kernel.org, Filipe David Manana <fdmanana@gmail.com>
Cc: Chris Mason <clm@fb.com>
Subject: Re: determining snapshot size -> adding "work to do" info to btrfs send
Date: Mon, 31 Mar 2014 09:35:31 -0700	[thread overview]
Message-ID: <20140331163531.GH2972@merlins.org> (raw)
In-Reply-To: <CAL3q7H5mxvN+TxtK3_Oeef=S3rVGu2QywD6d8Zd6ABUj1B44Nw@mail.gmail.com> <20140330002123.GP22552@merlins.org>

On Sat, Mar 29, 2014 at 05:21:23PM -0700, Marc MERLIN wrote:
> I had a look at
> http://bj0z.wordpress.com/2011/04/27/determining-snapshot-size-in-btrfs/#comment-35
> but it's quite old and does not work anymore since userland became
> incompatible with it.
> 
> Has anyone seen something newer or have a newer fixed version of this?

While watching a btrfs send|receive going for hours, keeping the
backup disk array spinning in my living room, and my wondering "how far
is it from being done", I was thinking:

Would it be reasonably simple for btrfs send -p to have a few more
features?
1) don't read all the data from disk, just read the metadata and tell me
how many megabytes it will take to send.
I can do this with 
btrfs send | wc -c 
I believe, but it would be better if it could do this without reading all
the data blocks to send when I'm only caring about the byte output

In turn this could be used to easily compute snapshot size diffs at
least from one another.


2) output a list of files added/changed/removed, maybe with how much
data is related to each.
Arguably this would supersede 1) above even if it would be a little bit
more work to do


3) when a real btrfs send is running, just like dd, I could send it a
USR1 signal and it would output some kind of progress report.
The Ted T'so motto (used for e2fsck) is "everything with a progress bar
is faster" :)
Note, the progress wouldn't have to be perfect, it could be by number of
blocks, number of files, anything reasonably easy to implement it on.

Does that sound reasonable?

Thanks,
Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/                         | PGP 1024R/763BE901

  reply	other threads:[~2014-03-31 16:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-30  0:28 Btrfs file content missmatch incrementally sending subvolumes containing systemd journal files Marc MERLIN
2014-03-30 21:05 ` Filipe David Manana
2014-03-30  0:21   ` determining snapshot size Marc MERLIN
2014-03-31 16:35     ` Marc MERLIN [this message]
2014-04-04 14:28       ` determining snapshot size -> adding "work to do" info to btrfs send Filipe David Manana

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=20140331163531.GH2972@merlins.org \
    --to=marc@merlins.org \
    --cc=clm@fb.com \
    --cc=fdmanana@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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.