All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] e2fsck: fix sparse bmap to extent conversion
@ 2017-05-23 19:00 Darrick J. Wong
  2017-05-24 11:30 ` Marc Thomas
  0 siblings, 1 reply; 5+ messages in thread
From: Darrick J. Wong @ 2017-05-23 19:00 UTC (permalink / raw)
  To: Marc Thomas; +Cc: linux-ext4, Theodore Ts'o

Marc,

If it's not too much trouble, can you build e2fsprogs with this patch
and see if the conversion corruption problem is fixed?  The supplied
regression test has a realmode.bin I made with your script, but it's
always good to re-verify with the bug filer.

--D

---
When e2fsck is trying to convert a sparse block-mapped file to an extent
file, we incorrectly merge block mappings that are physically contiguous
but not logically contiguous because of insufficient checking with the
extent we're constructing.  Therefore, compare the logical offsets for
contiguity as well.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 e2fsck/extents.c                     |    3 +
 tests/f_convert_bmap_sparse/expect.1 |   24 +++++++
 tests/f_convert_bmap_sparse/expect.2 |   12 +++
 tests/f_convert_bmap_sparse/image.gz |  Bin
 tests/f_convert_bmap_sparse/name     |    1 
 tests/f_convert_bmap_sparse/script   |  117 ++++++++++++++++++++++++++++++++++
 6 files changed, 156 insertions(+), 1 deletion(-)
 create mode 100644 tests/f_convert_bmap_sparse/expect.1
 create mode 100644 tests/f_convert_bmap_sparse/expect.2
 create mode 100644 tests/f_convert_bmap_sparse/image.gz
 create mode 100644 tests/f_convert_bmap_sparse/name
 create mode 100644 tests/f_convert_bmap_sparse/script

diff --git a/e2fsck/extents.c b/e2fsck/extents.c
index 98cf7c3..ef3146d 100644
--- a/e2fsck/extents.c
+++ b/e2fsck/extents.c
@@ -171,7 +171,8 @@ static int find_blocks(ext2_filsys fs, blk64_t *blocknr, e2_blkcnt_t blockcnt,
 					     list->count - 1;
 		blk64_t end = last->e_len + 1;
 
-		if (last->e_pblk + last->e_len == *blocknr &&
+		if (last->e_lblk + last->e_len == blockcnt &&
+		    last->e_pblk + last->e_len == *blocknr &&
 		    end < (1ULL << 32)) {
 			last->e_len++;
 #ifdef DEBUG
diff --git a/tests/f_convert_bmap_sparse/expect.1 b/tests/f_convert_bmap_sparse/expect.1
new file mode 100644
index 0000000..095fb2b
--- /dev/null
+++ b/tests/f_convert_bmap_sparse/expect.1
@@ -0,0 +1,24 @@
+debugfs: stat /realmode.bin
+Inode: 12   Type: regular    Mode:  0775   Flags: 0x0
+Generation: 2022334337    Version: 0x00000001
+User:  1000   Group:  1000   Size: 21080
+File ACL: 0
+Links: 1   Blockcount: 16
+Fragment:  Address: 0    Number: 0    Size: 0
+ctime: 0x5924849d -- Tue May 23 18:51:09 2017
+atime: 0x59247d36 -- Tue May 23 18:19:34 2017
+mtime: 0x591e1764 -- Thu May 18 21:51:32 2017
+BLOCKS:
+(0):513, (4-8):514-518, (IND):58, (20):2005
+TOTAL: 8
+
+Pass 1: Checking inodes, blocks, and sizes
+Pass 1E: Optimizing extent trees
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 12/256 files (8.3% non-contiguous), 65/2048 blocks
+Exit status is 0
diff --git a/tests/f_convert_bmap_sparse/expect.2 b/tests/f_convert_bmap_sparse/expect.2
new file mode 100644
index 0000000..e5a3d44
--- /dev/null
+++ b/tests/f_convert_bmap_sparse/expect.2
@@ -0,0 +1,12 @@
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+test_filesys: 12/256 files (8.3% non-contiguous), 65/2048 blocks
+Exit status is 0
+debugfs: ex /realmode.bin
+Level Entries       Logical      Physical Length Flags
+ 0/ 0   1/  3     0 -     0   513 -   513      1 
+ 0/ 0   2/  3     4 -     8   514 -   518      5 
+ 0/ 0   3/  3    20 -    20  2005 -  2005      1 
diff --git a/tests/f_convert_bmap_sparse/image.gz b/tests/f_convert_bmap_sparse/image.gz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&~u16#MQ~T?Mf_23J>~@LE*B><27r
z3rJ5=L3ZvkHM__`BSJ+~V&v|4%1R6FPM>;MH@lgb+pc&AS2I%?Bxl*plROK?@5GDV
z1aLW+w?zAUhT-Y{@W!^L&RY66`4Fbz*>=!wa_jtZ&UKo~lqqyOqwLJg<RC}jc!er$
z(EQFZm6^+7uJ;bV(mk3z-Xiz9J|H9C9mL7h+pUj}ch36YN4%k@rPvm&*F{Gnx36Hi
zpo80&WW$5Pg0owGlVmYZu6fB4fT1Ilt65=Y0bqXXmQ0bsD^zfrX1ZZj(>}lqFPh<C
zR;4eKq0_{EgjRi!(Iqco<&X}#t&I9ceW!po(L0?MI}+=K?ZAp29At<+WH9Aty-z3x
zQF32E`6S15gjs7MyQc?Ow{Vktvfs`^K*>y-F{}^DJUHj{Qy;5{9PnmkH1?eKE)AgS
zQA0%}FYvhQn-#UNCyMFGR|J&O6<^w9z%Mo&Mlbf{gnMt(whHha9{n(u=?<&^^jef{
z8_a>Z2v=URN_#q{^U2@-@?NE#vL!BLt%2N_rKe?0B>{_4T56KpOTOj}ns7p4>!}?@
z{_kY~kj4sfYIh*@WLB(apP*c=ShY+g(xxxUJA(N?^e23``klac0^bRIC-CnCekoW`
fJJ}sZB-bDL_r`yz*z_&LA=-1D`-cwwc<BECcW&nO

literal 0
HcmV?d00001

diff --git a/tests/f_convert_bmap_sparse/name b/tests/f_convert_bmap_sparse/name
new file mode 100644
index 0000000..dc3b985
--- /dev/null
+++ b/tests/f_convert_bmap_sparse/name
@@ -0,0 +1 @@
+convert sparse blockmap file to extents file
diff --git a/tests/f_convert_bmap_sparse/script b/tests/f_convert_bmap_sparse/script
new file mode 100644
index 0000000..89b7ed7
--- /dev/null
+++ b/tests/f_convert_bmap_sparse/script
@@ -0,0 +1,117 @@
+if [ "$DESCRIPTION"x != x ]; then
+	test_description="$DESCRIPTION"
+fi
+if [ "$IMAGE"x = x ]; then
+	IMAGE=$test_dir/image.gz
+fi
+
+if [ "$FSCK_OPT"x = x ]; then
+	FSCK_OPT=-yf
+fi
+
+if [ "$SECOND_FSCK_OPT"x = x ]; then
+	SECOND_FSCK_OPT=-yf
+fi
+
+if [ "$OUT1"x = x ]; then
+	OUT1=$test_name.1.log
+fi
+
+if [ "$OUT2"x = x ]; then
+	OUT2=$test_name.2.log
+fi
+
+if [ "$EXP1"x = x ]; then
+	if [ -f $test_dir/expect.1.gz ]; then
+		EXP1=$test_name.1.tmp
+		gunzip < $test_dir/expect.1.gz > $EXP1
+	else
+		EXP1=$test_dir/expect.1
+	fi
+fi
+
+if [ "$EXP2"x = x ]; then
+	if [ -f $test_dir/expect.2.gz ]; then
+		EXP2=$test_name.2.tmp
+		gunzip < $test_dir/expect.2.gz > $EXP2
+	else
+		EXP2=$test_dir/expect.2
+	fi
+fi
+
+if [ "$SKIP_GUNZIP" != "true" ] ; then
+	gunzip < $IMAGE > $TMPFILE
+fi
+
+cp /dev/null $OUT1
+
+eval $PREP_CMD
+
+echo 'stat /realmode.bin' > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE > $OUT1.new 2>&1
+rm -rf $TMPFILE.cmd
+$TUNE2FS -O extent $TMPFILE >> $OUT1.new 2>&1
+$FSCK $FSCK_OPT -E bmap2extent -N test_filesys $TMPFILE >> $OUT1.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT1.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT1.new >> $OUT1
+rm -f $OUT1.new
+
+$FSCK $SECOND_FSCK_OPT -N test_filesys $TMPFILE > $OUT2.new 2>&1 
+status=$?
+echo Exit status is $status >> $OUT2.new
+echo 'ex /realmode.bin' > $TMPFILE.cmd
+$DEBUGFS -f $TMPFILE.cmd $TMPFILE >> $OUT2.new 2>&1
+rm -rf $TMPFILE.cmd
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT2.new > $OUT2
+rm -f $OUT2.new
+
+eval $AFTER_CMD
+
+if [ "$SKIP_VERIFY" != "true" ] ; then
+	rm -f $test_name.ok $test_name.failed
+	cmp -s $OUT1 $EXP1
+	status1=$?
+	if [ "$ONE_PASS_ONLY" != "true" ]; then
+		cmp -s $OUT2 $EXP2
+		status2=$?
+	else
+		status2=0
+	fi
+	if [ "$PASS_ZERO" = "true" ]; then
+		cmp -s $test_name.0.log	$test_dir/expect.0
+		status3=$?
+	else
+		status3=0
+	fi
+
+	if [ -z "$test_description" ] ; then
+		description="$test_name"
+	else
+		description="$test_name: $test_description"
+	fi
+
+	if [ "$status1" -eq 0 -a "$status2" -eq 0 -a "$status3" -eq 0 ] ; then
+		echo "$description: ok"
+		touch $test_name.ok
+	else
+		echo "$description: failed"
+		rm -f $test_name.failed
+		if [ "$PASS_ZERO" = "true" ]; then
+			diff $DIFF_OPTS $test_dir/expect.0 \
+				$test_name.0.log >> $test_name.failed
+		fi
+		diff $DIFF_OPTS $EXP1 $OUT1 >> $test_name.failed
+		if [ "$ONE_PASS_ONLY" != "true" ]; then
+			diff $DIFF_OPTS $EXP2 $OUT2 >> $test_name.failed
+		fi
+	fi
+	rm -f tmp_expect
+fi
+
+if [ "$SKIP_CLEANUP" != "true" ] ; then
+	unset IMAGE FSCK_OPT SECOND_FSCK_OPT OUT1 OUT2 EXP1 EXP2 
+	unset SKIP_VERIFY SKIP_CLEANUP SKIP_GUNZIP ONE_PASS_ONLY PREP_CMD
+	unset DESCRIPTION SKIP_UNLINK AFTER_CMD PASS_ZERO
+fi
+

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] e2fsck: fix sparse bmap to extent conversion
  2017-05-23 19:00 [PATCH] e2fsck: fix sparse bmap to extent conversion Darrick J. Wong
@ 2017-05-24 11:30 ` Marc Thomas
  2017-05-25  2:21   ` Theodore Ts'o
  0 siblings, 1 reply; 5+ messages in thread
From: Marc Thomas @ 2017-05-24 11:30 UTC (permalink / raw)
  To: linux-ext4; +Cc: Darrick J. Wong, Theodore Ts'o

Hi Darrick,

Thanks very much for the patch. I applied it to the git-master and built
e2fsprogs. The new "make check" test for "f_convert_bmap_sparse" passes,
and indeed my test-case script now passes.
However the test for "f_detect_junk" is failing for me:

---
$ cat f_detect_junk.failed
--- ../../tests/f_detect_junk/expect    2017-05-24 08:58:29.025273717 +0000
+++ f_detect_junk.log   2017-05-24 09:23:41.426168239 +0000
@@ -13,6 +13,7 @@
 
 *** debugfs
 test.img: Bad magic number in super-block while opening filesystem
+Checksum errors in superblock!  Retrying...
 *** tune2fs
 ../misc/tune2fs: Bad magic number in super-block while trying to open
test.img
 *** mke2fs
---

I think the expect test maybe just needs updating.


I will now try the patched e2fsck on the full data-migration process I'm
doing and report back. This will take a few hours.

Kind Regards,
Marc

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] e2fsck: fix sparse bmap to extent conversion
  2017-05-24 11:30 ` Marc Thomas
@ 2017-05-25  2:21   ` Theodore Ts'o
  2017-05-25 13:11     ` Marc Thomas
  0 siblings, 1 reply; 5+ messages in thread
From: Theodore Ts'o @ 2017-05-25  2:21 UTC (permalink / raw)
  To: Marc Thomas; +Cc: linux-ext4, Darrick J. Wong

I've applied this patch to the maint branch (with a slight adjustment
to the expect file for f_convert_bmap_sprase), and then merged it into
the next/master branches (with the adjustment removed), thanks.

I wasn't able see any problems with f_detect_junk, on either the maint
or the next branch.  So I'm not sure what issue Marc was seeing there.

       	    	     	    	     	  - Ted

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] e2fsck: fix sparse bmap to extent conversion
  2017-05-25  2:21   ` Theodore Ts'o
@ 2017-05-25 13:11     ` Marc Thomas
  2017-05-25 17:13       ` Theodore Ts'o
  0 siblings, 1 reply; 5+ messages in thread
From: Marc Thomas @ 2017-05-25 13:11 UTC (permalink / raw)
  To: Theodore Ts'o, linux-ext4; +Cc: Darrick J. Wong

Thank you both for the rapid turn-around with this patch.
I can confirm it solves the original problem with the in-place ext3 to
ext4 conversion I'm doing.

As regards the f_detect_junk test, it seems a change in "debugfs" is
emitting an extra message "Checksum errors in superblock!  Retrying..."
which is not present in the "expect" output.
It appears this was introduced in commit
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/commit/?id=bf615bb0ccadeb1579463f94a2a4752e7ec53f57

Perhaps debugfs could print that message to stderr so it's not picked up?

I'm testing with the git master branch, but my git skills are weak so I
could well be doing something wrong!

Kind Regards,
Marc

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] e2fsck: fix sparse bmap to extent conversion
  2017-05-25 13:11     ` Marc Thomas
@ 2017-05-25 17:13       ` Theodore Ts'o
  0 siblings, 0 replies; 5+ messages in thread
From: Theodore Ts'o @ 2017-05-25 17:13 UTC (permalink / raw)
  To: Marc Thomas; +Cc: linux-ext4, Darrick J. Wong

On Thu, May 25, 2017 at 02:11:52PM +0100, Marc Thomas wrote:
> 
> As regards the f_detect_junk test, it seems a change in "debugfs" is
> emitting an extra message "Checksum errors in superblock!  Retrying..."
> which is not present in the "expect" output.
> It appears this was introduced in commit
> https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/commit/?id=bf615bb0ccadeb1579463f94a2a4752e7ec53f57

Ah, now I see.  This was not a regression from Darrick's patch, but
rather a pre-existing failure.  One that I hadn't noticed because I
don't have libmagic-dev installed on my new development laptop.  :-)

I've checked in a fix into my repository.

					- Ted
					
>From 1a4c6384c438f4ca4a0eae9a21c4d465cb7275ef Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <tytso@mit.edu>
Date: Thu, 25 May 2017 13:11:40 -0400
Subject: [PATCH] tests: fix expected output for f_detect_junk

The expect files for f_detect_junk had gotten out of sync with the
code base, and since this test is optional (it depends on libmagic
being installed), we hadn't noticed.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 tests/f_detect_junk/expect           | 1 +
 tests/f_detect_junk/expect.nodebugfs | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/f_detect_junk/expect b/tests/f_detect_junk/expect
index 4295886e..8febb84d 100644
--- a/tests/f_detect_junk/expect
+++ b/tests/f_detect_junk/expect
@@ -13,6 +13,7 @@ is corrupt, and you might try running e2fsck with an alternate superblock:
 
 *** debugfs
 test.img: Bad magic number in super-block while opening filesystem
+Checksum errors in superblock!  Retrying...
 *** tune2fs
 ../misc/tune2fs: Bad magic number in super-block while trying to open test.img
 *** mke2fs
diff --git a/tests/f_detect_junk/expect.nodebugfs b/tests/f_detect_junk/expect.nodebugfs
index 0d4ba54b..b528046c 100644
--- a/tests/f_detect_junk/expect.nodebugfs
+++ b/tests/f_detect_junk/expect.nodebugfs
@@ -11,11 +11,9 @@ is corrupt, and you might try running e2fsck with an alternate superblock:
  or
     e2fsck -b 32768 <device>
 
-test.img contains `PNG image data, 148 x 31, 8-bit/color RGBA, non-interlaced' data
 *** debugfs
 *** tune2fs
 ../misc/tune2fs: Bad magic number in super-block while trying to open test.img
-test.img contains `PNG image data, 148 x 31, 8-bit/color RGBA, non-interlaced' data
 *** mke2fs
 Creating filesystem with 16384 1k blocks and 4096 inodes
 Superblock backups stored on blocks: 
-- 
2.11.0.rc0.7.gbe5a750

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-05-25 17:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-23 19:00 [PATCH] e2fsck: fix sparse bmap to extent conversion Darrick J. Wong
2017-05-24 11:30 ` Marc Thomas
2017-05-25  2:21   ` Theodore Ts'o
2017-05-25 13:11     ` Marc Thomas
2017-05-25 17:13       ` Theodore Ts'o

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.