linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liu Bo <bo.li.liu@oracle.com>
To: Roman Mamedov <rm@romanrm.net>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Can't cp --reflink files on a Ext4-converted FS w/o checksums
Date: Thu, 27 Nov 2014 11:31:08 +0800	[thread overview]
Message-ID: <20141127033107.GA2224@localhost.localdomain> (raw)
In-Reply-To: <20141127005527.42a7fe59@natsu>

On Thu, Nov 27, 2014 at 12:55:27AM +0500, Roman Mamedov wrote:
> Hello,
> 
> I used btrfs-convert to switch my FS from Ext4 to Btrfs. As it was a rather
> large 10 TB filesystem, to save on the conversion time, I used the "-d,
> disable data checksum" option of btrfs-convert.
> 
> Turns out now I can't "cp --reflink" any files that were already on the FS
> prior to conversion. The error message from cp is "failed to clone [...]
> Invalid argument".
> 
> I assume this is because of the lack of checksums; the only way to make old
> files cloneable is to plain copy them to a different place and then delete the
> originals, but that's what I was trying to avoid in the first place.
> 
> Also I thought maybe defragmenting will help, but nope, doesn't seem to be the
> case, even ordering it to recompress data to a different method doesn't fix
> the problem. (Even if it did, it's still a lot of unnecessary rewriting).
> 
> Is there really a good reason to stop these files without checksums from being
> cloneable? It's not like they have the noCoW attribute, so I'd assume any new
> write to these files would cause a CoW and proper checksums for all new blocks
> anyways.

Just FYI, I recently send a patch[1] to fix btrfs-convert's checksum
problem, it'll produce checksum for empty extents, which makes slow
btrrfs-convert even slower.

With this patch, you may try to convert your ext4 without disabling checksum and see if time is improved. 

[1]: Btrfs-progs: fix a bug of converting sparse ext2/3/4
https://patchwork.kernel.org/patch/5374741/

thanks,
-liubo
> 
> -- 
> With respect,
> Roman
> --
> 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

      parent reply	other threads:[~2014-11-27  3:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26 19:55 Can't cp --reflink files on a Ext4-converted FS w/o checksums Roman Mamedov
2014-11-26 23:18 ` Robert White
2014-11-26 23:33   ` Roman Mamedov
2014-11-27  0:00     ` Robert White
2014-11-27  0:20       ` Roman Mamedov
2014-11-27  0:31         ` Robert White
2014-11-27  0:57           ` Robert White
2014-11-27  0:20     ` Robert White
2014-11-27  0:28       ` Roman Mamedov
2014-11-27  0:45         ` Robert White
2014-11-27  9:27   ` Duncan
2014-11-28  7:12     ` Robert White
2014-11-27  3:31 ` Liu Bo [this message]

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=20141127033107.GA2224@localhost.localdomain \
    --to=bo.li.liu@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=rm@romanrm.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).