From: Andrew Morton <akpm@osdl.org>
To: Oliver Xymoron <oxymoron@waste.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [2/3] writes: use flags in address space
Date: Sat, 2 Aug 2003 03:48:43 -0700 [thread overview]
Message-ID: <20030802034843.21cb8564.akpm@osdl.org> (raw)
In-Reply-To: <20030802041823.GB22824@waste.org>
Oliver Xymoron <oxymoron@waste.org> wrote:
>
> Combine mapping->error and ->gfp_mask into ->flags
Some tweaks here too.
- Robustify the logic a bit. At present if writepage() returns an error
which is not -EIO or -ENOSPC we lose track of it.
So instead, treat all unknown errors as -EIO.
fs/mpage.c | 12 ++++++------
mm/vmscan.c | 6 +++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff -puN fs/mpage.c~awe-use-gfp_flags-fixes fs/mpage.c
--- 25/fs/mpage.c~awe-use-gfp_flags-fixes 2003-08-02 03:40:29.000000000 -0700
+++ 25-akpm/fs/mpage.c 2003-08-02 03:40:29.000000000 -0700
@@ -566,10 +566,10 @@ confused:
/*
* The caller has a ref on the inode, so *mapping is stable
*/
- if (*ret == -EIO)
- set_bit(AS_EIO, &mapping->flags);
- else if (*ret == -ENOSPC)
+ if (*ret == -ENOSPC)
set_bit(AS_ENOSPC, &mapping->flags);
+ else
+ set_bit(AS_EIO, &mapping->flags);
out:
return bio;
}
@@ -671,10 +671,10 @@ mpage_writepages(struct address_space *m
test_clear_page_dirty(page)) {
if (writepage) {
ret = (*writepage)(page, wbc);
- if (ret == -EIO)
- set_bit(AS_EIO, &mapping->flags);
- else if (ret == -ENOSPC)
+ if (ret == -ENOSPC)
set_bit(AS_ENOSPC, &mapping->flags);
+ else
+ set_bit(AS_EIO, &mapping->flags);
} else {
bio = mpage_writepage(bio, page, get_block,
&last_block_in_bio, &ret, wbc);
diff -puN mm/vmscan.c~awe-use-gfp_flags-fixes mm/vmscan.c
--- 25/mm/vmscan.c~awe-use-gfp_flags-fixes 2003-08-02 03:40:29.000000000 -0700
+++ 25-akpm/mm/vmscan.c 2003-08-02 03:40:29.000000000 -0700
@@ -252,10 +252,10 @@ static void handle_write_error(struct ad
{
lock_page(page);
if (page->mapping == mapping) {
- if (error == -EIO)
- set_bit(AS_EIO, &mapping->flags);
- else if (error == -ENOSPC)
+ if (error == -ENOSPC)
set_bit(AS_ENOSPC, &mapping->flags);
+ else
+ set_bit(AS_EIO, &mapping->flags);
}
unlock_page(page);
}
_
prev parent reply other threads:[~2003-08-02 10:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-02 4:18 [PATCH] [2/3] writes: use flags in address space Oliver Xymoron
2003-08-02 10:48 ` Andrew Morton [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=20030802034843.21cb8564.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oxymoron@waste.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).