linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Linux Kernel <linux-kernel@vger.kernel.org>, Jens Axboe <axboe@suse.de>
Subject: [PATCH] set request fastfail bit
Date: Tue, 09 Mar 2004 22:39:32 -0800	[thread overview]
Message-ID: <404EB824.1030806@cs.wisc.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

The first three bio and request flags are no longer identical.
The bio barrier and rw flags are getting set in __make_request
and get_request respectively, and failfast is getting
left out. The attached patch (built against 2.6.4-rc3)
sets the request's failfast flag in __make_request when the bio's
flag is set.

Mike Chrisite

[-- Attachment #2: failfast.patch --]
[-- Type: text/plain, Size: 943 bytes --]

--- linux-2.6.4-rc3-orig/drivers/block/ll_rw_blk.c	2004-03-09 22:21:26.819208694 -0800
+++ linux-2.6.4-rc3-ff/drivers/block/ll_rw_blk.c	2004-03-09 22:37:02.395169904 -0800
@@ -2121,11 +2121,14 @@ get_rq:
 		goto again;
 	}
 
+	req->flags |= REQ_CMD;
+
 	/*
-	 * first three bits are identical in rq->flags and bio->bi_rw,
-	 * see bio.h and blkdev.h
+	 * inherit FAILFAST from bio and don't stack up
+	 * retries for read ahead
 	 */
-	req->flags = (bio->bi_rw & 7) | REQ_CMD;
+	if (ra || test_bit(BIO_RW_FAILFAST, &bio->bi_rw))	
+		req->flags |= REQ_FAILFAST;
 
 	/*
 	 * REQ_BARRIER implies no merging, but lets make it explicit
@@ -2133,12 +2136,6 @@ get_rq:
 	if (barrier)
 		req->flags |= (REQ_HARDBARRIER | REQ_NOMERGE);
 
-	/*
-	 * don't stack up retries for read ahead
-	 */
-	if (ra)
-		req->flags |= REQ_FAILFAST;
-
 	req->errors = 0;
 	req->hard_sector = req->sector = sector;
 	req->hard_nr_sectors = req->nr_sectors = nr_sectors;

             reply	other threads:[~2004-03-10  6:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-10  6:39 Mike Christie [this message]
2004-03-10  6:57 ` Mike Christie
2004-03-10  9:02 ` Jens Axboe

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=404EB824.1030806@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] set request fastfail bit' \
    /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

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox