linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc MERLIN <marc@merlins.org>
To: james northrup <northrup.james@gmail.com>
Cc: "Norbert Scheibner" <scno@gmx.net>,
	"Jérôme Poulin" <jeromepoulin@gmail.com>,
	"Hubert Kario" <hka@qbs.com.pl>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: cross-subvolume cp --reflink
Date: Thu, 16 Aug 2012 22:20:11 -0700	[thread overview]
Message-ID: <20120817052011.GA28121@merlins.org> (raw)
In-Reply-To: <CAPkEcwjF6pvqySbKGX6tJXb_4k=Z2BLg4OahuH=r6dsSF5ynDg@mail.gmail.com>

On Thu, Aug 16, 2012 at 09:20:00PM -0700, james northrup wrote:
> dunno if this thread is dead, but im inclined to patch in cp --reflink
> to "fdupes" prog.  It  currently does provide a poor-man's dedupe via
> md5sum and hardlink, or delete.
> 
> all the better if the distro-kernels can backport cross-snapshot
> reflinks sooner than later.
 
So, I'd love for cp --reflink to bring back a deleted VM (huge file) from a
snapshot back to trunk without duplicating it.
But how would fdupes help? I can't hardlink between two snapshots, can I?

gandalfthegreat:/mnt/btrfs_pool1# ln usr_weekly_20120812_00\:02\:01/svn-commit.tmp  usr/test
ln: failed to create hard link `usr/test' => `usr_weekly_20120812_00:02:01/svn-commit.tmp': Invalid cross-device link

So, is there anything user space can do without kernel support?

Marc

> On Sun, Apr 29, 2012 at 1:05 PM, Norbert Scheibner <scno@gmx.net> wrote:
> > Am 29.04.2012, 01:53 Uhr, schrieb Hubert Kario <hka@qbs.com.pl>:
> >
> >
> >> On Sunday 01 of April 2012 11:42:23 Jérôme Poulin wrote:
> >>>
> >>> On Sun, Apr 1, 2012 at 11:27 AM, Norbert Scheibner <scno@gmx.net> wrote:
> >>> > Some users tested this patch successfully for week,s or months in 2 or
> >>> > 3
> >>> > kernel versions since then, true?
> >>> If this feature must be implented in VFS in another patch, why not
> >>> just activate what works and make the future patch disable it again?
> >>
> >>
> >> Why would (should) it be impleemented in VFS? reflink copy is completely
> >> different from normal copy and hard link.
> >
> >
> > I wouldn't make a VFS issue out of that. That should be another discussion.
> >
> > But:
> >
> >> Subvolumes in btrfs are barriers *only* in btrfs and not visible in VFS.
> >
> >
> > That is just a bug in my opinion, so it should work anyway, but to look at
> > it from VFS point of view is strengthening me in wanting the outstanding
> > patches integrated, as this feature could be supported by VFS in the future.
> >
> >
> >> IMHO it's strictly btrfs business and not supporting reflink copy between
> >> arbitrary directories is a bug.
> >
> >
> > I don't know exactly, but I think ZFS is another candidate for "cp
> > --reflink". For some of the log-structured filesystems this could be usefull
> > too, but I don't know if some of them already supports this or plan to
> > support this in the future.
> >
> > Greetings
> >     Norbert
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
"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/  

  reply	other threads:[~2012-08-17  5:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-01 15:27 cross-subvolume cp --reflink Norbert Scheibner
2012-04-01 15:30 ` Konstantinos Skarlatos
2012-04-01 16:41   ` Norbert Scheibner
2012-04-01 16:45     ` Konstantinos Skarlatos
2012-04-01 17:07       ` Norbert Scheibner
2012-04-01 17:19         ` Konstantinos Skarlatos
2012-04-01 18:11           ` Norbert Scheibner
2012-04-01 19:42             ` Konstantinos Skarlatos
     [not found]         ` <4F788EE2.4010105@univie.ac.at>
2012-04-01 18:39           ` Norbert Scheibner
2012-04-01 19:27             ` Konstantinos Skarlatos
2012-04-02  8:29               ` David Sterba
2012-04-01 15:42 ` Jérôme Poulin
2012-04-28 23:53   ` Hubert Kario
2012-04-29 20:05     ` Norbert Scheibner
2012-08-17  4:20       ` james northrup
2012-08-17  5:20         ` Marc MERLIN [this message]
2012-08-19  5:08           ` Mitch Harder
2012-08-19  6:43             ` Marc MERLIN
     [not found]       ` <CAPkEcwgSZ8umbFeuZ-fQAFAprBubL58eFSf4TQ=Z13ks8i9DOQ@mail.gmail.com>
2012-08-20 18:08         ` Jérôme Poulin
2012-08-21  0:20           ` james northrup

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=20120817052011.GA28121@merlins.org \
    --to=marc@merlins.org \
    --cc=hka@qbs.com.pl \
    --cc=jeromepoulin@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=northrup.james@gmail.com \
    --cc=scno@gmx.net \
    /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).