e2fsck: print runs of duplicate blocks instead of all of them

When pass1 finds blocks that are mapped to multiple files, it will
print every duplicated block.  If there are long sequences of
duplicate blocks (e.g. the e_pblk field is wrong in an extent), this
can cause a gigantic flood of output when a range could convey the
same information.  Therefore, teach pass1b to print ranges when
possible.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
diff --git a/e2fsck/problem.c b/e2fsck/problem.c
index 1282858..7f0ad6c 100644
--- a/e2fsck/problem.c
+++ b/e2fsck/problem.c
@@ -1073,6 +1073,11 @@
 	  N_("Error adjusting refcount for @a @b %b (@i %i): %m\n"),
 	  PROMPT_NONE, 0 },
 
+	/* Duplicate/bad block range in inode */
+	{ PR_1B_DUP_RANGE,
+	  " %b--%c",
+	  PROMPT_NONE, PR_LATCH_DBLOCK | PR_PREEN_NOHDR },
+
 	/* Pass 1C: Scan directories for inodes with multiply-claimed blocks. */
 	{ PR_1C_PASS_HEADER,
 	  N_("Pass 1C: Scanning directories for @is with @m @bs\n"),