linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Martin Jambor <jamborm@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: What happens to pages that failed to be written to disk?
Date: Thu, 28 Jul 2005 00:33:26 -0700	[thread overview]
Message-ID: <20050728003326.4add1a0f.akpm@osdl.org> (raw)
In-Reply-To: <8e70aacf05072717125bfc1c58@mail.gmail.com>

Martin Jambor <jamborm@gmail.com> wrote:
>
> Hi,
> 
> I have tried to find out how filesystems are supposed to handle the
> situation when an asynchronous writeout of a page fails and so had a
> look at the ext2 code. All I have found is that for example
> mpage_end_io_write sets the Error flag of both the page and its
> mapping... and that is about it.

yup.

> What happens to these pages later on?

They get reclaimed without being written.

> Does the memory manager attempt to write them again?

No.  Because if the error persists the machine will run out of memory in a
fatal manner.

> Is the error
> somehow signalled to anyone?

Yes, it's propagated into the file's address_space for a later
fsync()/fdatasync()/msync() to detect.

> Do filesystems try to relocate the data
> from bad blocks of the device?

Nope.  Disks will do that internally.  If a disk gets a write I/O error
it's generally dead.

Nowadays I/O errors generally arise from storage networks when something in
the network is disrupted.  Possibly our behaviour is wrong in that case,
although it could be argued that the retry logic should be implemented at
the storage layer and not the VFS layer.  The out-of-memory problem is a
killer.


  reply	other threads:[~2005-07-28  7:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-28  0:12 What happens to pages that failed to be written to disk? Martin Jambor
2005-07-28  7:33 ` Andrew Morton [this message]
2005-07-28  8:38   ` Szakacsits Szabolcs
2005-07-28 16:41     ` Bryan Henderson
2005-07-30 19:47   ` Martin Jambor
2005-07-30 21:13     ` Anton Altaparmakov

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=20050728003326.4add1a0f.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=jamborm@gmail.com \
    --cc=linux-fsdevel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).