linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the block tree
@ 2008-09-05  6:12 Stephen Rothwell
  2008-09-05  6:22 ` Jens Axboe
  2008-09-05 16:34 ` SCSI git tree splitting into scsi-misc-2.6 and scsi-post-merge-2.6 James Bottomley
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Rothwell @ 2008-09-05  6:12 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, David Woodhouse, Mike Christie, James Bottomley

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)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: manual merge of the block tree
  2008-09-05  6:12 linux-next: manual merge of the block tree Stephen Rothwell
@ 2008-09-05  6:22 ` 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
  1 sibling, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2008-09-05  6:22 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, David Woodhouse, Mike Christie, James Bottomley

On Fri, Sep 05 2008, Stephen Rothwell wrote:
> 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.

James, would it not have been a lot better to carry the block bits in
the block tree instead??

-- 
Jens Axboe

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: manual merge of the block tree
  2008-09-05  6:22 ` Jens Axboe
@ 2008-09-05 13:58   ` James Bottomley
  0 siblings, 0 replies; 4+ messages in thread
From: James Bottomley @ 2008-09-05 13:58 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Stephen Rothwell, linux-next, David Woodhouse, Mike Christie

On Fri, 2008-09-05 at 08:22 +0200, Jens Axboe wrote:
> On Fri, Sep 05 2008, Stephen Rothwell wrote:
> > 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.
> 
> James, would it not have been a lot better to carry the block bits in
> the block tree instead??

They're only a tiny piece of all of this ... and without them, my SCSI
tree won't compile.  I'll separate them into a post merge tree again to
resolve the conflicts.

However, this time, I really need linux-next to work out how it handles
post merge trees ... this will be the third time I've asked.

James

^ permalink raw reply	[flat|nested] 4+ messages in thread

* SCSI git tree splitting into scsi-misc-2.6 and scsi-post-merge-2.6
  2008-09-05  6:12 linux-next: manual merge of the block tree Stephen Rothwell
  2008-09-05  6:22 ` Jens Axboe
@ 2008-09-05 16:34 ` James Bottomley
  1 sibling, 0 replies; 4+ messages in thread
From: James Bottomley @ 2008-09-05 16:34 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Jens Axboe, linux-next, David Woodhouse, Mike Christie, linux-scsi

Due to conflicts with block#for-2.6.28 I'm splitting the tree to resolve
them.  The two trees are now

git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-post-merge-2.6.git
git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git

scsi-misc-2.6 will keep things that have no external dependencies, so
will be merged very early in the merge window.  scsi-post-merge-2.6 will
keep the other tree dependent pieces, and so won't be able to go until
after the other trees have gone in.

Since the trees will evolve semi-independently, you'll need to pull both
in to get all the changes.

Instructions for linux-next:

You need to include the scsi-post-merge-2.6 tree last (or at least after
all its component trees) and only the pieces from merge-base..master
(that will insulate you from rebasing effects).

James

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-09-05 16:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-05  6:12 linux-next: manual merge of the block tree Stephen Rothwell
2008-09-05  6:22 ` 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

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).