From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-next@vger.kernel.org, David Woodhouse <dwmw2@infradead.org>,
Mike Christie <michaelc@cs.wisc.edu>,
James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: linux-next: manual merge of the block tree
Date: Fri, 5 Sep 2008 16:12:12 +1000 [thread overview]
Message-ID: <20080905161212.e3612601.sfr@canb.auug.org.au> (raw)
Hi Jens,
Today's linux-next merge of the block tree got a conflict in
include/linux/bio.h and include/linux/blkdev.h between commit
81449f3f2013d92ec3bcb9d2c1877ce3140d2271 ("[SCSI] block: separate
failfast into multiple bits") from the scsi tree and commit
5d112a624058caabe5b570d2c9827bce82c18be1 ("Add 'discard' request
handling") from the block tree.
Overlapping changes/additions to some bit definitions. I have fixed it
up as best I can (see below) and can carry the fix.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff --cc include/linux/bio.h
index 425a4ec,7af373f..0000000
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@@ -147,20 -125,18 +125,22 @@@ struct bio
* bit 0 -- read (not set) or write (set)
* bit 1 -- rw-ahead when set
* bit 2 -- barrier
- * bit 3 -- fail fast, don't want low level driver retries
- * bit 4 -- synchronous I/O hint: the block layer will unplug immediately
- * bit 5 -- metadata request
- * bit 6 -- discard sectors
+ * bit 3 -- synchronous I/O hint: the block layer will unplug immediately
+ * bit 4 -- meta data
+ * bit 5 -- fail fast device errors
+ * bit 6 -- fail fast transport errors
+ * bit 7 -- fail fast driver errors
++ * bit 8 -- discard sectors
*/
- #define BIO_RW 0
- #define BIO_RW_AHEAD 1
-#define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */
-#define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */
-#define BIO_RW_BARRIER 2
-#define BIO_RW_FAILFAST 3
-#define BIO_RW_SYNC 4
-#define BIO_RW_META 5
-#define BIO_RW_DISCARD 6
++#define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */
++#define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */
+#define BIO_RW_BARRIER 2
+#define BIO_RW_SYNC 3
+#define BIO_RW_META 4
+#define BIO_RW_FAILFAST_DEV 5
+#define BIO_RW_FAILFAST_TRANSPORT 6
+#define BIO_RW_FAILFAST_DRIVER 7
++#define BIO_RW_DISCARD 8
/*
* upper 16 bits of bi_rw define the io priority of this bio
@@@ -187,13 -163,11 +167,14 @@@
#define bio_sectors(bio) ((bio)->bi_size >> 9)
#define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER))
#define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC))
-#define bio_failfast(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST))
+#define bio_failfast_dev(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DEV))
+#define bio_failfast_transport(bio) \
+ ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_TRANSPORT))
+#define bio_failfast_driver(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DRIVER))
#define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD))
#define bio_rw_meta(bio) ((bio)->bi_rw & (1 << BIO_RW_META))
- #define bio_empty_barrier(bio) (bio_barrier(bio) && !(bio)->bi_size)
+ #define bio_discard(bio) ((bio)->bi_rw & (1 << BIO_RW_DISCARD))
+ #define bio_empty_barrier(bio) (bio_barrier(bio) && !bio_has_data(bio) && !bio_discard(bio))
static inline unsigned int bio_cur_sectors(struct bio *bio)
{
diff --cc include/linux/blkdev.h
index 2d8d90c,4cd8caa..0000000
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@@ -88,9 -86,8 +86,10 @@@ enum
*/
enum rq_flag_bits {
__REQ_RW, /* not set, read. set, write */
- __REQ_FAILFAST, /* no low level driver retries */
+ __REQ_FAILFAST_DEV, /* no driver retries of device errors */
+ __REQ_FAILFAST_TRANSPORT, /* no driver retries of transport errors */
+ __REQ_FAILFAST_DRIVER, /* no driver retries of driver errors */
+ __REQ_DISCARD, /* request to discard sectors */
__REQ_SORTED, /* elevator knows about this request */
__REQ_SOFTBARRIER, /* may not be passed by ioscheduler */
__REQ_HARDBARRIER, /* may not be passed by drive either */
@@@ -113,9 -110,8 +112,10 @@@
};
#define REQ_RW (1 << __REQ_RW)
+#define REQ_FAILFAST_DEV (1 << __REQ_FAILFAST_DEV)
+#define REQ_FAILFAST_TRANSPORT (1 << __REQ_FAILFAST_TRANSPORT)
+#define REQ_FAILFAST_DRIVER (1 << __REQ_FAILFAST_DRIVER)
+ #define REQ_DISCARD (1 << __REQ_DISCARD)
-#define REQ_FAILFAST (1 << __REQ_FAILFAST)
#define REQ_SORTED (1 << __REQ_SORTED)
#define REQ_SOFTBARRIER (1 << __REQ_SOFTBARRIER)
#define REQ_HARDBARRIER (1 << __REQ_HARDBARRIER)
@@@ -537,15 -535,10 +539,15 @@@ enum
#define blk_special_request(rq) ((rq)->cmd_type == REQ_TYPE_SPECIAL)
#define blk_sense_request(rq) ((rq)->cmd_type == REQ_TYPE_SENSE)
-#define blk_noretry_request(rq) ((rq)->cmd_flags & REQ_FAILFAST)
+#define blk_failfast_dev(rq) ((rq)->cmd_flags & REQ_FAILFAST_DEV)
+#define blk_failfast_transport(rq) ((rq)->cmd_flags & REQ_FAILFAST_TRANSPORT)
+#define blk_failfast_driver(rq) ((rq)->cmd_flags & REQ_FAILFAST_DRIVER)
+#define blk_noretry_request(rq) (blk_failfast_dev(rq) || \
+ blk_failfast_transport(rq) || \
+ blk_failfast_driver(rq))
#define blk_rq_started(rq) ((rq)->cmd_flags & REQ_STARTED)
- #define blk_account_rq(rq) (blk_rq_started(rq) && blk_fs_request(rq))
+ #define blk_account_rq(rq) (blk_rq_started(rq) && (blk_fs_request(rq) || blk_discard_rq(rq)))
#define blk_pm_suspend_request(rq) ((rq)->cmd_type == REQ_TYPE_PM_SUSPEND)
#define blk_pm_resume_request(rq) ((rq)->cmd_type == REQ_TYPE_PM_RESUME)
next reply other threads:[~2008-09-05 6:12 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-05 6:12 Stephen Rothwell [this message]
2008-09-05 6:22 ` linux-next: manual merge of the block tree Jens Axboe
2008-09-05 13:58 ` James Bottomley
2008-09-05 16:34 ` SCSI git tree splitting into scsi-misc-2.6 and scsi-post-merge-2.6 James Bottomley
-- strict thread matches above, loose matches on Subject: below --
2013-10-25 15:03 linux-next: Tree for Oct 25 Thierry Reding
2013-10-25 15:03 ` linux-next: manual merge of the block tree Thierry Reding
2013-10-14 14:48 linux-next: Tree for Oct 14 Thierry Reding
2013-10-14 14:48 ` linux-next: manual merge of the block tree Thierry Reding
2013-10-11 19:04 Mark Brown
2013-10-01 11:03 linux-next: Tree for Oct 1 Thierry Reding
2013-10-01 11:07 ` linux-next: manual merge of the block tree Thierry Reding
2013-09-30 11:26 linux-next: manual merge of the bcon tree Thierry Reding
2013-09-30 11:26 ` linux-next: manual merge of the block tree Thierry Reding
2008-12-15 7:08 Stephen Rothwell
2008-11-19 3:21 Stephen Rothwell
2008-11-19 9:14 ` Jens Axboe
2008-11-19 9:32 ` Stephen Rothwell
2008-11-07 6:14 Stephen Rothwell
2008-11-07 6:10 Stephen Rothwell
2008-11-07 9:50 ` Jens Axboe
2008-11-07 10:07 ` Stephen Rothwell
2008-10-15 7:40 Stephen Rothwell
2008-09-03 5:58 Stephen Rothwell
2008-09-03 5:55 Stephen Rothwell
2008-09-02 6:06 Stephen Rothwell
2008-09-02 5:59 Stephen Rothwell
2008-08-28 5:30 Stephen Rothwell
2008-08-27 5:48 Stephen Rothwell
2008-08-27 5:47 Stephen Rothwell
2008-06-27 6:13 Stephen Rothwell
2008-06-27 8:30 ` Ingo Molnar
2008-06-27 8:47 ` Jens Axboe
2008-06-27 9:26 ` Ingo Molnar
2008-06-27 9:57 ` Ingo Molnar
2008-06-27 10:11 ` Ingo Molnar
2008-06-27 11:21 ` Jens Axboe
2008-06-27 11:21 ` Jens Axboe
2008-06-27 11:18 ` Jens Axboe
2008-06-27 6:09 Stephen Rothwell
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=20080905161212.e3612601.sfr@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=James.Bottomley@HansenPartnership.com \
--cc=dwmw2@infradead.org \
--cc=jens.axboe@oracle.com \
--cc=linux-next@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
/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).