All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Andrew Morton <akpm@digeo.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch] Fix file-corrupting bug, kernels 2.5.41 to 2.5.44
Date: Mon, 28 Oct 2002 12:04:27 +0100	[thread overview]
Message-ID: <20021028110427.GD844@suse.de> (raw)
In-Reply-To: <3DBCB904.FA9CC188@digeo.com>

On Sun, Oct 27 2002, Andrew Morton wrote:
> 
> 
> This patch fixes a filesystem corrupting bug, present in 2.5.41 through
> 2.5.44.  It can cause ext2 indirect blocks to not be written out.  A
> fsck will fix it up.
> 
> Under heavy memory pressure a PF_MEMALLOC task attemtps to write out a
> blockdev page whose buffers are already under writeback and which were
> dirtied while under writeback.

Nasty, it's odd how noone else seems to have noticed this?

> The writepage call returns -EAGAIN but because the caller is
> PF_MEMALLOC, the page was not being marked dirty again.
> 
> The page sits on mapping->clean_pages for ever and it not written out.
> 
> The fix is to mark that page dirty again for all callers, regardless of
> PF_MEMALLOC state.

I can confirm that this fixes my 'loosing data under vm pressure' bug,
both for O_DIRECT case and sgio. It passed 1 iteration of both tests, it
would not even get past the 10% mark before. Thanks!

BTW, 2.5.44-mm6 showed some funnies and corrupted data in other
interesting ways. I'm hesitant to report this as a bug right now, as it
may just have been that the target fs had not been fsck'ed after being
run under one of the buggy kernels. But it did crash in the end, dumping
lots of hot/cold warnings. The above verification was run under 2.5.44 +
sgio patches + your standalone __set_page_dirty() fix.

-- 
Jens Axboe


      reply	other threads:[~2002-10-28 10:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-28  4:11 [patch] Fix file-corrupting bug, kernels 2.5.41 to 2.5.44 Andrew Morton
2002-10-28 11:04 ` Jens Axboe [this message]

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=20021028110427.GD844@suse.de \
    --to=axboe@suse.de \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.