Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3afad5d authored by Bob Peterson's avatar Bob Peterson Committed by Greg Kroah-Hartman
Browse files

gfs2: slow the deluge of io error messages



[ Upstream commit b524abcc01483b2ac093cc6a8a2a7375558d2b64 ]

When an io error is hit, it calls gfs2_io_error_bh_i for every
journal buffer it can't write. Since we changed gfs2_io_error_bh_i
recently to withdraw later in the cycle, it sends a flood of
errors to the console. This patch checks for the file system already
being withdrawn, and if so, doesn't send more messages. It doesn't
stop the flood of messages, but it slows it down and keeps it more
reasonable.

Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 35c8125c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -623,6 +623,7 @@ enum {
	SDF_RORECOVERY		= 7, /* read only recovery */
	SDF_SKIP_DLM_UNLOCK	= 8,
	SDF_FORCE_AIL_FLUSH     = 9,
	SDF_AIL1_IO_ERROR	= 10,
};

enum gfs2_freeze_state {
+5 −2
Original line number Diff line number Diff line
@@ -108,7 +108,9 @@ __acquires(&sdp->sd_ail_lock)
		gfs2_assert(sdp, bd->bd_tr == tr);

		if (!buffer_busy(bh)) {
			if (!buffer_uptodate(bh)) {
			if (!buffer_uptodate(bh) &&
			    !test_and_set_bit(SDF_AIL1_IO_ERROR,
					      &sdp->sd_flags)) {
				gfs2_io_error_bh(sdp, bh);
				*withdraw = true;
			}
@@ -206,7 +208,8 @@ static void gfs2_ail1_empty_one(struct gfs2_sbd *sdp, struct gfs2_trans *tr,
		gfs2_assert(sdp, bd->bd_tr == tr);
		if (buffer_busy(bh))
			continue;
		if (!buffer_uptodate(bh)) {
		if (!buffer_uptodate(bh) &&
		    !test_and_set_bit(SDF_AIL1_IO_ERROR, &sdp->sd_flags)) {
			gfs2_io_error_bh(sdp, bh);
			*withdraw = true;
		}
+7 −6
Original line number Diff line number Diff line
@@ -256,6 +256,7 @@ void gfs2_io_error_bh_i(struct gfs2_sbd *sdp, struct buffer_head *bh,
			const char *function, char *file, unsigned int line,
			bool withdraw)
{
	if (!test_bit(SDF_SHUTDOWN, &sdp->sd_flags))
		fs_err(sdp,
		       "fatal: I/O error\n"
		       "  block = %llu\n"