public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: torvalds@transmeta.com (Linus Torvalds)
To: linux-kernel@vger.kernel.org
Subject: Re: [BUG] Failed writes marked clean?
Date: Fri, 8 Nov 2002 20:53:56 +0000 (UTC)	[thread overview]
Message-ID: <aqh894$13t$1@penguin.transmeta.com> (raw)
In-Reply-To: 3DCC1EB5.4020303@google.com

In article <3DCC1EB5.4020303@google.com>, Ross Biro <rossb@google.com> wrote:
>
>Perhaps I'm reading the code incorrectly, but in kernel versions 2.4.18 
>and 2.5.46 it looks to me like in the case of a write, ll_rw_block 
>always clears the dirty bit.  In the event of an error, nothing resets 
>the dirty bit and the uptodate flag is cleared.

Correct. 

There's not all that much else it could do. Keeping the dirty bit set is
not an option - that would bring the whole system down on IO errors.

As it is, higher layers that care _can_ figure the IO error out, simply
by noticing that the page is not up-to-date after the write. It's then
totally up to the higher layers (ie user space) to write the thing anew
if it cares about the data.

(In other words: this is why we have fsync() and error codes).

		Linus

  reply	other threads:[~2002-11-08 20:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-08 20:29 [BUG] Failed writes marked clean? Ross Biro
2002-11-08 20:53 ` Linus Torvalds [this message]
2002-11-08 20:57 ` Andrew Morton
2002-11-08 21:30   ` Ross Biro
2002-11-08 23:35   ` Theodore Ts'o
2002-11-09  1:29     ` Bernd Eckenfels
2002-11-12 20:04     ` Pavel Machek

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='aqh894$13t$1@penguin.transmeta.com' \
    --to=torvalds@transmeta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox