Re: Ext4: deadlock occurs when running fsstress and ENOSPC errors are seen.

From: Theodore Ts'o
Date: Wed Apr 16 2014 - 01:07:48 EST


On Wed, Apr 16, 2014 at 10:30:10AM +0530, Amit Sahrawat wrote:
> 4) Corrupt the block group â1â by writing all â1â, we had one file
> with all 1âs, so using âddâ â
> dd if=i_file of=/dev/sdb1 bs=4096 seek=17 count=1
> After this mount the partition â create few random size files and then
> ran âfsstress,

Um, sigh. You didn't say that you were deliberately corrupting the
file system. That wasn't in the subject line, or anywhere else in the
original message.

So the question isn't how the file system got corrupted, but that
you'd prefer that the system recovers without hanging after this
corruption.

I wish you had *said* that. It would have saved me a lot of time,
since I was trying to figure out how the system had gotten so
corrupted (not realizing you had deliberately corrupted the file
system).

So I think if you run "tune2fs -e remount-ro /dev/sdb1" before you
started the fsstress, the file system would have remounted the
filesystem read-only at the first EXT4-fs error message. This would
avoid the hang that you saw, since the file system would hopefully
"failed fast", before th euser had the opportunity to put data into
the page cache that would be lost when the system discovered there was
no place to put the data.

Regards,

- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/