All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: tytso@mit.edu, darrick.wong@oracle.com
Cc: linux-ext4@vger.kernel.org
Subject: [PATCH 19/25] tests: test e2fsck recovery of corrupt revoke blocks
Date: Mon, 08 Sep 2014 16:13:41 -0700	[thread overview]
Message-ID: <20140908231341.25904.75703.stgit@birch.djwong.org> (raw)
In-Reply-To: <20140908231135.25904.66591.stgit@birch.djwong.org>

Test e2fsck' ability to deal with (a) revoke blocks with a bad
checksum and (b) revoke blocks with an obviously bad block number.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/j_corrupt_revoke_block/expect   |   17 +++++++++++
 tests/j_corrupt_revoke_block/image.gz |  Bin
 tests/j_corrupt_revoke_block/name     |    1 +
 tests/j_corrupt_revoke_block/script   |   51 +++++++++++++++++++++++++++++++++
 tests/j_corrupt_revoke_csum/expect    |   17 +++++++++++
 tests/j_corrupt_revoke_csum/image.gz  |  Bin
 tests/j_corrupt_revoke_csum/name      |    1 +
 tests/j_corrupt_revoke_csum/script    |   51 +++++++++++++++++++++++++++++++++
 8 files changed, 138 insertions(+)
 create mode 100644 tests/j_corrupt_revoke_block/expect
 create mode 100644 tests/j_corrupt_revoke_block/image.gz
 create mode 100644 tests/j_corrupt_revoke_block/name
 create mode 100644 tests/j_corrupt_revoke_block/script
 create mode 100644 tests/j_corrupt_revoke_csum/expect
 create mode 100644 tests/j_corrupt_revoke_csum/image.gz
 create mode 100644 tests/j_corrupt_revoke_csum/name
 create mode 100644 tests/j_corrupt_revoke_csum/script


diff --git a/tests/j_corrupt_revoke_block/expect b/tests/j_corrupt_revoke_block/expect
new file mode 100644
index 0000000..52cda2c
--- /dev/null
+++ b/tests/j_corrupt_revoke_block/expect
@@ -0,0 +1,17 @@
+test_filesys: recovering journal
+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/128 files (8.3% non-contiguous), 1092/2048 blocks
+Exit status is 0
+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/128 files (8.3% non-contiguous), 1092/2048 blocks
+Exit status is 0
+debugfs: cat /a
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb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bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb!
 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb!
 bbbbbbbbbb
\ No newline at end of file
diff --git a/tests/j_corrupt_revoke_block/image.gz b/tests/j_corrupt_revoke_block/image.gz
new file mode 100644
index 0000000000000000000000000000000000000000..b165d00b46676b6c35d974053ee557c1a757bc09
GIT binary patch
literal 3038
zcmeIw*;7*o6bA4JGbS}!El`RI5(f)q!c<Ze5NeTH#Ssw{WfO=f9Rz{Ypp6*GWeJN=
z#1>OFB_It#(O^(w7Lu??U_iE_!2l*hiGT<piQX*SaBm;_#J|9B-oA(P@cqtlEW)5D
z#`#bS%f+`qfz4Tal*UVVIh9&feIo>jh>42Bz{fTn!G;#%G+Rq*kkg;}_j+jd(CJTc
z7^ESmrr@tTPyD(7o1Z!h_E`PcP;kO$i`AF^elC(&2^2y(YeER3qq)_P$zEA;zv8(U
zG&AGt>j9+_F^7cn!8v5ix#_tG0$uDqDE(?~(1|hOO>T5KVtX`zn%BZ1CkkSp!ELw4
zUsQVgoWjJNbEP+<4V#Gyoq32!j7eL{R`v^B#J5=!RH#0-N?tm1x94E&RrSl-6}(sU
z<k)_)e!gAT70LBHgEh6BDd}Te_@)?7Y&a_kfd;S_U*00vJP!>X1u32<21@)QOHZ@h
zl+MG)XHTl(3#s;d3$(@v*wCGEP)T62Y2bO{+{#qcP{yZ+OJNh)sMVuU+KGZ*CI^8~
zKy5K=iQAa>=*b?HGA(pVZs#9gn<&PsxyPqoJNQDjq_><V1LK(+om3RbmB(4vx0d%y
z9NNBbdPCTa?6vu5MynUhL?C|F>%I2ah(7bze&nIz2VOLsV@9j|aL5MJ)?VNcY^ig+
zgJhb~^+ec_D4Or`j{Hz8I0KXm9)FuBWw+0={7Y$VI|aPzlW(IWRF2Q3;F|ldb&@}q
zSl2)kaBrN9sQzJrS3>xDoh*r*Y{8D}e&5$Vw;)Z2opy}(*rI9{U$GHvE0hsu1UmxQ
zl!4*2#Q2Ll_R@4&Wzqf}4p$J;Q31b<jZQL{Wb*HRNq|1Iqi6kK!wRraCrlt#3*XNu
z5aL8Uw)2yWx$)gLu5_eKyXky*xh9K7+0{5H{XOuYYm2+jxX0aMM&Ky;0Gz${%31be
z<kt0gd6+<(kQVsdpbrvxK6M#zEupr}O;#L+!c%#?=F6&u*IDoKpC+d?*y?_6+{M6m
z=jpMzQ6RQe+2$_2XLtCDFSsuTNa%WHHkR&pJ=>>Cv3UGxkdqZEMs|*m@gN|#DyZ`6
z7EJ^Kkq%^A{C~^#MV5j~x=9tEOS!}YLHJ{ZyG)l(UMXtb_{BSp=S>Da^6*6aK9a&_
zY$b$}<Yep=W0_*ZslsJtZH%7pLQ7e?xASJ5=!2gonmPt#@WJL<fMoB6XE-||EgbGp
z=#5~0hfWgCnpTcjS}XHm!*c%M@FO^VT5B%Z2Xd!MuQ5-6fOaZOCSlOzqY9If^8jp~
zy6%HS$`;HIx2dty21NRine-dml}*)FB_asi6Q)L(ivvw>+>pSr14v-HMD2{^Pxp@S
ziz){YRr246X=>R-EPMtp^Kq-6c6A!Q(QVg=AKgw+7ZN;FBC*1u&Z^EywIWhjUkvMo
yeAS!Nfu7YX>uFtJU0^K=JmzjkUGg2wT#Mb-JFN?>WdR-o-hkUp??Rz)sQ&=iqgHMJ

literal 0
HcmV?d00001

diff --git a/tests/j_corrupt_revoke_block/name b/tests/j_corrupt_revoke_block/name
new file mode 100644
index 0000000..c7a0088
--- /dev/null
+++ b/tests/j_corrupt_revoke_block/name
@@ -0,0 +1 @@
+corrupt revoke block (csum v3)
diff --git a/tests/j_corrupt_revoke_block/script b/tests/j_corrupt_revoke_block/script
new file mode 100644
index 0000000..102feba
--- /dev/null
+++ b/tests/j_corrupt_revoke_block/script
@@ -0,0 +1,51 @@
+if test -x $DEBUGFS_EXE; then
+
+IMAGE=$test_dir/image.gz
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+	EXP=$test_name.tmp
+	gunzip < $test_dir/expect.gz > $EXP1
+else
+	EXP=$test_dir/expect
+fi
+
+cp /dev/null $OUT
+
+gzip -d < $IMAGE > $TMPFILE
+
+$FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
+rm -f $OUT.new
+
+$FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
+rm -f $OUT.new
+
+echo "cat /a" > $TMPFILE.cmd
+$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+rm -f $TMPFILE.cmd
+
+rm -f $TMPFILE
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+	echo "$test_name: $test_description: ok"
+	touch $test_name.ok
+else
+	echo "$test_name: $test_description: failed"
+	diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+	rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
+
+else #if test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi
diff --git a/tests/j_corrupt_revoke_csum/expect b/tests/j_corrupt_revoke_csum/expect
new file mode 100644
index 0000000..52cda2c
--- /dev/null
+++ b/tests/j_corrupt_revoke_csum/expect
@@ -0,0 +1,17 @@
+test_filesys: recovering journal
+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/128 files (8.3% non-contiguous), 1092/2048 blocks
+Exit status is 0
+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/128 files (8.3% non-contiguous), 1092/2048 blocks
+Exit status is 0
+debugfs: cat /a
+bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb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bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb!
 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb!
 bbbbbbbbbb
\ No newline at end of file
diff --git a/tests/j_corrupt_revoke_csum/image.gz b/tests/j_corrupt_revoke_csum/image.gz
new file mode 100644
index 0000000000000000000000000000000000000000..f505592079452ad78b22f5c096f951158d47981d
GIT binary patch
literal 3034
zcmeH_>o?m67{_DICZ~k0T2s|VXS2Fg=CoT}aw*!PV|K!EkGLIkO<YDSwMIwP$z0m4
znPM0gw^o=-G?GZ`oJu<fahqChCUXx#BqF!pUaW6=&i;bV^X~bc^St<cz7O<!Fi3Q;
z5%QMtmIzmNBF`4IBazXWqD<0;H!=bn6%RH99J^{7Lb2O<YQJ`Y`fdrrIM~PE-SoSi
zCUa7mKLvcl40qznNZE(SecH<~o{(cFm&`fvrp*IZ4NbsOTEs9Kw1>8mn)(`vc$<(v
z+;_2$E5d;<vuyl})4&4hT7gH2!F|HPYVCzRRe&IMz^_`3j*{;5?dGHo#rEIiP9!8?
zZR=fb_p}@znfKLRb0yp`tWI{*S;Q&%9OuVI-d_E;`kC%=p<`~RB_8HMR_#2Ut8+cO
zb{0v@%UZtY5)DnG6-IXY@u)fNf#-2foj50hV#!*OV8&C<3ifwdHmz2p+(!W&*MI7^
zOra^-R5#twmG3_*C`15SDWie#Ab5V5)PvsFXLV^&ni*nxmpAD3Q4`8V4#|V98skL%
z=rlnv>k}4bwI^YA+{UCX^y=V+L%x3Nb6A$P8ZQ}WlT-U$N(f_-j5)kza{q%d?wKJ(
zo6y4%fZbQ<Otxh@Nx|0#@O4$nf~F{c3}_Rh`Z0!Loyp&5JHY7B;yL-U!FUgP7bw!1
zB*z*WBUmfN?veY~upN>>QCPKaV)&xz^e+KuF$5bk`76Fl!ihND`w@SFqJ!;mdYe!{
z)r?@fF>0vS&D@jDVGq>G>Wb1Ml<B<1m%`C+hTns1C7uTH^C=1dlg)vZvr+rcl@q5(
zunPPaQd%%-=ZA~uAKTM`aVJ-iBs^wS5I6p${z5%K-j{0uwI6YE7(pHz=Kx&BGn<l{
zOgl*Dxs0k7nDo?>hELXw^$iFNbG)UR6q1xZIpy_pMfK-1%4VfD&&qOhX)Q_ECu<j~
z`<TmKT1^|Sjv2BN`mr!J#~}Nw_#qsN;3G-f8;if&M>0^e*AII`t16wBOI4<{W({o#
z4Xbp6jb_CJbAq7Uhw*9gy0O~(ok@qDx57xP>cvzp0NF|(QF5op9fCYf3NjY;gEDWU
ze|ub1VF&{FZ%9ekXNYMH2~Y-F6AlprhUI4OD|u`Pjz@jelo?k$7*|`R|1vnuUOjTl
zw2^%fPtk1hT?InRum1E}EfuH8H5RCOu~HI|sn4~32{mzcqIPJx8SE`Zzc>WnqmzG{
z3J_&8FXX<!4ZUx8N*KW2Eiil##LZNPBHJ)}T;XG?l0d_$28aeCJx!nMey@@ocFD`&
zcoO$c7Xhf?p$Du*Gleo5p>+$;LZg{_G6UV6(5LH;SyjW9^`&(>bKX><qWV%Du*(bu
z(0&^{vg5RLzUu8)q_6+&tF7n{XP!T{W`dF(UcPWnu2gPYpK<f_6-zdeZYw2hu9SZF
wfN1ugr$^zDfg=NNk^z2Nv{4a53I@MPP)96B2L1;IilWz{_JJk~AdnsCAAu!D7XSbN

literal 0
HcmV?d00001

diff --git a/tests/j_corrupt_revoke_csum/name b/tests/j_corrupt_revoke_csum/name
new file mode 100644
index 0000000..b63ea23
--- /dev/null
+++ b/tests/j_corrupt_revoke_csum/name
@@ -0,0 +1 @@
+corrupt revoke csum (csum v3)
diff --git a/tests/j_corrupt_revoke_csum/script b/tests/j_corrupt_revoke_csum/script
new file mode 100644
index 0000000..102feba
--- /dev/null
+++ b/tests/j_corrupt_revoke_csum/script
@@ -0,0 +1,51 @@
+if test -x $DEBUGFS_EXE; then
+
+IMAGE=$test_dir/image.gz
+FSCK_OPT=-fy
+OUT=$test_name.log
+if [ -f $test_dir/expect.gz ]; then
+	EXP=$test_name.tmp
+	gunzip < $test_dir/expect.gz > $EXP1
+else
+	EXP=$test_dir/expect
+fi
+
+cp /dev/null $OUT
+
+gzip -d < $IMAGE > $TMPFILE
+
+$FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
+rm -f $OUT.new
+
+$FSCK -fy -N test_filesys $TMPFILE > $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
+rm -f $OUT.new
+
+echo "cat /a" > $TMPFILE.cmd
+$DEBUGFS_EXE -f $TMPFILE.cmd $TMPFILE 2>&1 | sed -f $cmd_dir/filter.sed >> $OUT
+rm -f $TMPFILE.cmd
+
+rm -f $TMPFILE
+
+cmp -s $OUT $EXP
+status=$?
+
+if [ "$status" = 0 ] ; then
+	echo "$test_name: $test_description: ok"
+	touch $test_name.ok
+else
+	echo "$test_name: $test_description: failed"
+	diff $DIFF_OPTS $EXP $OUT > $test_name.failed
+	rm -f $test_name.tmp
+fi
+
+unset IMAGE FSCK_OPT OUT EXP
+
+else #if test -x $DEBUGFS_EXE; then
+	echo "$test_name: $test_description: skipped"
+fi


  parent reply	other threads:[~2014-09-08 23:13 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08 23:11 [PATCH 00/25] e2fsprogs Summer 2014 patchbomb, part 5.2 Darrick J. Wong
2014-09-08 23:11 ` [PATCH 01/25] e2fsck/debugfs: fix descriptor block size handling errors with journal_csum Darrick J. Wong
2014-09-11 16:43   ` Theodore Ts'o
2014-09-08 23:11 ` [PATCH 02/25] libext2fs: report bad magic over bad sb checksum Darrick J. Wong
2014-09-11 16:43   ` Theodore Ts'o
2014-09-08 23:11 ` [PATCH 03/25] misc: don't return ENOMEM if we run out of disk space Darrick J. Wong
2014-09-11 16:43   ` Theodore Ts'o
2014-09-08 23:12 ` [PATCH 04/25] libext2fs: write_journal_inode should check iterate return value Darrick J. Wong
2014-09-11 16:43   ` Theodore Ts'o
2014-09-08 23:12 ` [PATCH 05/25] mke2fs: allow creation of journal device with superblock checksum Darrick J. Wong
2014-09-11 16:43   ` Theodore Ts'o
2014-09-08 23:12 ` [PATCH 06/25] e2fsck: detect and repair external journal superblock checksum errors Darrick J. Wong
2014-09-11 16:43   ` Theodore Ts'o
2014-09-08 23:12 ` [PATCH 07/25] tune2fs: explicitly disallow tuning of journal devices Darrick J. Wong
2014-09-11 16:44   ` Theodore Ts'o
2014-09-08 23:12 ` [PATCH 08/25] dumpe2fs: display external journal feature flags Darrick J. Wong
2014-09-11 16:44   ` Theodore Ts'o
2014-09-08 23:12 ` [PATCH 09/25] misc: zero s_jnl_blocks when removing internal journal Darrick J. Wong
2014-09-11 16:44   ` Theodore Ts'o
2014-09-08 23:12 ` [PATCH 10/25] debugfs: create journal handling routines Darrick J. Wong
2014-09-11 18:53   ` Theodore Ts'o
2014-09-11 19:03     ` Darrick J. Wong
2014-09-11 20:14       ` Theodore Ts'o
2014-09-11 20:25         ` Darrick J. Wong
2014-09-08 23:12 ` [PATCH 11/25] e2fsck: fix minor errors in journal handling Darrick J. Wong
2014-09-11 20:58   ` Theodore Ts'o
2014-09-08 23:12 ` [PATCH 12/25] debugfs: add the ability to write transactions to the journal Darrick J. Wong
2014-09-11 20:58   ` Theodore Ts'o
2014-09-08 23:13 ` [PATCH 13/25] tests: test writing and recovering checksum-free 32/64bit journals Darrick J. Wong
2014-09-11 20:59   ` Theodore Ts'o
2014-09-08 23:13 ` [PATCH 14/25] tests: test writing and recovering 64bit csum_v3 journals Darrick J. Wong
2014-09-11 20:59   ` Theodore Ts'o
2014-09-08 23:13 ` [PATCH 15/25] tests: test writing and recovering 32bit " Darrick J. Wong
2014-09-11 20:59   ` Theodore Ts'o
2014-09-08 23:13 ` [PATCH 16/25] tests: write and replay blocks with the old journal checksum Darrick J. Wong
2014-09-11 20:59   ` Theodore Ts'o
2014-09-08 23:13 ` [PATCH 17/25] tests: test recovery of 32 and 64-bit journals with checksum v2 Darrick J. Wong
2014-09-11 20:59   ` Theodore Ts'o
2014-09-08 23:13 ` [PATCH 18/25] tests: test how e2fsck recovers from corrupt journal superblocks Darrick J. Wong
2014-09-11 21:04   ` Theodore Ts'o
2014-09-08 23:13 ` Darrick J. Wong [this message]
2014-09-11 21:04   ` [PATCH 19/25] tests: test e2fsck recovery of corrupt revoke blocks Theodore Ts'o
2014-09-08 23:13 ` [PATCH 20/25] tests: test e2fsck recovery with broken commit blocks Darrick J. Wong
2014-09-11 21:04   ` Theodore Ts'o
2014-09-08 23:13 ` [PATCH 21/25] tests: test e2fsck recovery of corrupt descriptor blocks Darrick J. Wong
2014-09-10  1:15   ` Darrick J. Wong
2014-09-11 17:33     ` Darrick J. Wong
2014-09-11 18:18       ` Theodore Ts'o
2014-09-11 18:40         ` Darrick J. Wong
2014-09-11 19:31   ` [PATCH 21/25 v2] " Darrick J. Wong
2014-09-11 22:34     ` Theodore Ts'o
2014-09-08 23:14 ` [PATCH 22/25] tests: test recovery from an external journal Darrick J. Wong
2014-09-11 21:04   ` Theodore Ts'o
2014-09-08 23:14 ` [PATCH 23/25] ext2fs: add readahead method to improve scanning Darrick J. Wong
2014-09-11 21:10   ` Theodore Ts'o
2014-09-11 21:29     ` [PATCH 23/25 v2] " Darrick J. Wong
2014-09-08 23:14 ` [PATCH 24/25] libext2fs/e2fsck: provide routines to read-ahead metadata Darrick J. Wong
2014-09-08 23:14 ` [PATCH 25/25] e2fsck: read-ahead metadata during passes 1, 2, and 4 Darrick J. Wong
2014-09-09 22:53 ` [PATCH 00/25] e2fsprogs Summer 2014 patchbomb, part 5.2 Andreas Dilger
2014-09-10  1:13   ` Darrick J. Wong
2014-09-11 19:41 ` [PATCH 26/25] libext2fs: call get_alloc_block hook when allocating blocks Darrick J. Wong
2014-09-11 22:05   ` Theodore Ts'o
2014-09-11 22:34     ` Darrick J. Wong
2014-09-12 17:35       ` Theodore Ts'o
2014-09-12 17:57         ` Darrick J. Wong
2014-09-12 22:17           ` Theodore Ts'o
2014-09-13  0:13             ` Darrick J. Wong
2014-09-11 19:43 ` [PATCH 27/25] tune2fs: always check disable_uninit_bg() return code Darrick J. Wong
2014-09-11 22:07   ` Theodore Ts'o
2014-09-11 19:44 ` [PATCH 28/25] e2fsck: ignore badblocks if it says badblocks inode is bad Darrick J. Wong
2014-09-11 22:09   ` Theodore Ts'o
2014-09-11 19:48 ` [PATCH 29/25] e2fsck: expand root dir if linking l+f fails Darrick J. Wong
2014-09-11 22:10   ` Theodore Ts'o
2014-09-11 20:17 ` [PATCH 30/25] libext2fs: check ea value offset when loading Darrick J. Wong
2014-09-11 22:11   ` Theodore Ts'o
2014-09-11 22:33 ` [PATCH 00/25] e2fsprogs Summer 2014 patchbomb, part 5.2 Theodore Ts'o
2014-09-11 22:50   ` Darrick J. Wong
2014-09-11 22:52     ` Theodore Ts'o
2014-09-11 23:07       ` Darrick J. Wong
2014-09-11 23:14         ` Theodore Ts'o
2014-09-11 23:30           ` Darrick J. Wong

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=20140908231341.25904.75703.stgit@birch.djwong.org \
    --to=darrick.wong@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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.