linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: linux-mm <linux-mm@kvack.org>
Cc: Andrew Morton <akpm@osdl.org>
Subject: [PATCH 2/1] mm: swap failure update
Date: Mon, 31 Jul 2006 09:56:52 +0200	[thread overview]
Message-ID: <1154332612.12981.1.camel@taijtu> (raw)
In-Reply-To: <1154005275.30621.19.camel@taijtu>

From: Peter Zijlstra <a.p.zijlstra@chello.nl>

Update the error message on write-failure to also print the bio->bi_sector.
And insert an equivalent message on the read-failure path.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>

---
 mm/page_io.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Index: linux-2.6/mm/page_io.c
===================================================================
--- linux-2.6.orig/mm/page_io.c
+++ linux-2.6/mm/page_io.c
@@ -63,9 +63,10 @@ static int end_swap_bio_write(struct bio
 		 * Also clear PG_reclaim to avoid rotate_reclaimable_page()
 		 */
 		set_page_dirty(page);
-		printk(KERN_ALERT "Write-error on swap-device (%d:%d)\n",
+		printk(KERN_ALERT "Write-error on swap-device (%u:%u:%Lu)\n",
 				imajor(bio->bi_bdev->bd_inode),
-				iminor(bio->bi_bdev->bd_inode));
+				iminor(bio->bi_bdev->bd_inode),
+				bio->bi_sector);
 		ClearPageReclaim(page);
 	}
 	end_page_writeback(page);
@@ -84,6 +85,10 @@ static int end_swap_bio_read(struct bio 
 	if (!uptodate) {
 		SetPageError(page);
 		ClearPageUptodate(page);
+		printk(KERN_ALERT "Read-error on swap-device (%u:%u:%Lu)\n",
+				imajor(bio->bi_bdev->bd_inode),
+				iminor(bio->bi_bdev->bd_inode),
+				bio->bi_sector);
 	} else {
 		SetPageUptodate(page);
 	}


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2006-07-31  7:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-27 13:01 [PATCH] mm: swap write failure fixup Peter Zijlstra
2006-07-31  7:56 ` Peter Zijlstra [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=1154332612.12981.1.camel@taijtu \
    --to=a.p.zijlstra@chello.nl \
    --cc=akpm@osdl.org \
    --cc=linux-mm@kvack.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