linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Phillip Susi <psusi@ubuntu.com>
Cc: tytso@mit.edu, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 2/4] e2image: perform in-place move
Date: Thu, 26 Dec 2013 00:24:44 -0500	[thread overview]
Message-ID: <20131226052444.GB13533@thunk.org> (raw)
In-Reply-To: <20131226044857.GA13533@thunk.org>

On Wed, Dec 25, 2013 at 11:48:57PM -0500, Theodore Ts'o wrote:
> Sigh, I've had to revert this change since it is causing test
> failures.  **Please** run the regression test suite before you submit
> patches.

I figured out the problem.  The issue is that you changed e2image to
no longer truncate the output file (i.e., you removed O_TRUNC).

The test failure was caused by the fact that previously written data
blocks that were in unallocated blocks weren't getting over written,
and so this would cause the md5 checksums to break.  I can work around
this in the test by deleting the output files, but I think I'll also
modify your comment to avoid the truncate only when trying to create a
raw image dump.  For qcow2 and normal e2image files, it's better to
keep the existing behavior of truncating the output when we first open
it.

This change of your also turned up a bug which I had to fix up.  It
could happen today when people used e2image to copy a file system to
another block device:

commit aa2c743331f392e49d5b168b5e3d8c8a8084b8b4
Author: Theodore Ts'o <tytso@mit.edu>
Date:   Wed Dec 25 16:33:52 2013 -0500

    e2image: only skip writing zero blocks when writing to a new file
    
    The e2image progam was originally intended to create image files.
    However, some people have started using e2image to copy a file system
    from one block device to another, since it is more efficient than
    using dd because it only copies the blocks which are in use.  If we
    are doing this, however, we must not skip writing blocks which are all
    zero in the source device, since they may not be zero in the
    destination device.
    
    Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
    Cc: Phillip Susi <psusi@ubuntu.com>

						- Ted

  reply	other threads:[~2013-12-26  5:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-08 15:56 [PATCH 0/4] Add handy fs move features Phillip Susi
2013-10-08 15:56 ` [PATCH 1/4] e2image: add offset switches Phillip Susi
2013-12-16  4:32   ` Theodore Ts'o
2013-12-16 16:30     ` Phillip Susi
2013-12-16 16:32       ` Phillip Susi
2013-12-25  4:58         ` Theodore Ts'o
2013-10-08 15:56 ` [PATCH 2/4] e2image: perform in-place move Phillip Susi
2013-12-16  4:33   ` Theodore Ts'o
2013-12-16 16:30     ` Phillip Susi
2013-12-16 16:33       ` Phillip Susi
2013-12-25  4:58         ` Theodore Ts'o
2013-12-26  4:48           ` Theodore Ts'o
2013-12-26  5:24             ` Theodore Ts'o [this message]
2013-10-08 15:56 ` [PATCH 3/4] e2image: add progress indicator Phillip Susi
2013-12-25  4:58   ` Theodore Ts'o
2013-10-08 15:56 ` [PATCH 4/4] e2image: handle SIGINT safely Phillip Susi
2013-12-25  4:58   ` Theodore Ts'o

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=20131226052444.GB13533@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=psusi@ubuntu.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 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).