problem = PR_1_EXTENT_BAD_START_BLK;
else if (extent.e_lblk < start_block)
problem = PR_1_OUT_OF_ORDER_EXTENTS;
+ else if (extent.e_len == 0)
+ problem = PR_1_EXTENT_LENGTH_ZERO;
else if (is_leaf &&
(extent.e_pblk + extent.e_len) >
ext2fs_blocks_count(ctx->fs->super))
N_("The bad @b @i looks @n. "),
PROMPT_CLEAR, 0 },
+ /* Extent has zero length */
+ { PR_1_EXTENT_LENGTH_ZERO,
+ N_("@i %i has zero length extent\n\t(@n logical @b %c, physical @b %b)\n"),
+ PROMPT_CLEAR, 0 },
+
/* Pass 1b errors */
/* Pass 1B: Rescan for duplicate/bad blocks */
/* Invalid bad inode */
#define PR_1_INVALID_BAD_INODE 0x010065
+/* Extent has zero length */
+#define PR_1_EXTENT_LENGTH_ZERO 0x010066
+
/*
* Pass 1b errors
*/
--- /dev/null
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has zero length extent
+ (invalid logical block 0, physical block 37)
+Clear? yes
+
+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/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 1
--- /dev/null
+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/16 files (0.0% non-contiguous), 21/100 blocks
+Exit status is 0
--- /dev/null
+extent with zero length