linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the block tree
@ 2008-06-27  6:13 Stephen Rothwell
  2008-06-27  8:30 ` Ingo Molnar
  0 siblings, 1 reply; 34+ messages in thread
From: Stephen Rothwell @ 2008-06-27  6:13 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, Thomas Gleixner, Ingo Molnar, H. Peter Anvin

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

Hi Jens,

Today's linux-next merge of the block tree got a trivial conflict in
include/asm-x86/smp.h between commit
a4c81cf684350797939416c99effb9d3ae46bca6 ("x86: extend e820 ealy_res
support 32bit") from the x86 tree and commit
3b16cf874861436725c43ba0b68bdd799297be7c ("x86: convert to generic
helpers for IPI function calls") from the block tree.

A case of contextually close deletions.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: manual merge of the block tree
  2008-06-27  6:13 linux-next: manual merge of the block tree Stephen Rothwell
@ 2008-06-27  8:30 ` Ingo Molnar
  2008-06-27  8:47   ` Jens Axboe
  0 siblings, 1 reply; 34+ messages in thread
From: Ingo Molnar @ 2008-06-27  8:30 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Jens Axboe, linux-next, Thomas Gleixner, H. Peter Anvin,
	the arch/x86 maintainers


* Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Jens,
> 
> Today's linux-next merge of the block tree got a trivial conflict in 
> include/asm-x86/smp.h between commit 
> a4c81cf684350797939416c99effb9d3ae46bca6 ("x86: extend e820 ealy_res 
> support 32bit") from the x86 tree and commit 
> 3b16cf874861436725c43ba0b68bdd799297be7c ("x86: convert to generic 
> helpers for IPI function calls") from the block tree.
> 
> A case of contextually close deletions.

Jens, would it be possible for you to prepare a pullable branch for us 
for the x86 and generic bits of the SMP generic helpers thing - 
independent of any block tree bits? (it can touch generic code but it 
should not break the build on other architectures)

That way we could pull it into tip/x86 and give it some testing on the 
x86 side, and resolve its integration effects. Would that be possible?

	Ingo

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

* Re: linux-next: manual merge of the block tree
  2008-06-27  8:30 ` Ingo Molnar
@ 2008-06-27  8:47   ` Jens Axboe
  2008-06-27  9:26     ` Ingo Molnar
  0 siblings, 1 reply; 34+ messages in thread
From: Jens Axboe @ 2008-06-27  8:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Stephen Rothwell, linux-next, Thomas Gleixner, H. Peter Anvin,
	the arch/x86 maintainers

On Fri, Jun 27 2008, Ingo Molnar wrote:
> 
> * Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > Hi Jens,
> > 
> > Today's linux-next merge of the block tree got a trivial conflict in 
> > include/asm-x86/smp.h between commit 
> > a4c81cf684350797939416c99effb9d3ae46bca6 ("x86: extend e820 ealy_res 
> > support 32bit") from the x86 tree and commit 
> > 3b16cf874861436725c43ba0b68bdd799297be7c ("x86: convert to generic 
> > helpers for IPI function calls") from the block tree.
> > 
> > A case of contextually close deletions.
> 
> Jens, would it be possible for you to prepare a pullable branch for us 
> for the x86 and generic bits of the SMP generic helpers thing - 
> independent of any block tree bits? (it can touch generic code but it 
> should not break the build on other architectures)
> 
> That way we could pull it into tip/x86 and give it some testing on the 
> x86 side, and resolve its integration effects. Would that be possible?

Currently I have two branches for this - one is generic-ipi, which
contains the generic bits and all the arch conversions. The other is
smp_call_function, which kills the unused argument to
smp_call_function() (and friends) and on_each_cpu(). If I separate out
the non-x86 archs, I'll have trouble getting it all in for 2.6.27 as
I'll be on vacation as of july 5th.

So it's not tied in with any block bits, but it does have all archs.
Even if it's a bit of a weird thing to put the whole thing into the x86
tree, I don't mind if we do that. Heck, it's in the block repo to begin
with :-)

So if you could pull:

git://git.kernel.dk/linux-2.6-block.git generic-ipi

and

git://git.kernel.dk/linux-2.6-block.git smp_call_function

and merge them with the x86 changes, that would be fine. It's also the
place where we currently have conflicts due to 32-bit and 64-bit stuff
being merged, so it would help Stephen as well.

-- 
Jens Axboe

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

* Re: linux-next: manual merge of the block tree
  2008-06-27  8:47   ` Jens Axboe
@ 2008-06-27  9:26     ` Ingo Molnar
  2008-06-27  9:57       ` Ingo Molnar
  2008-06-27 11:18       ` Jens Axboe
  0 siblings, 2 replies; 34+ messages in thread
From: Ingo Molnar @ 2008-06-27  9:26 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Stephen Rothwell, linux-next, Thomas Gleixner, H. Peter Anvin,
	the arch/x86 maintainers


* Jens Axboe <jens.axboe@oracle.com> wrote:

> > That way we could pull it into tip/x86 and give it some testing on 
> > the x86 side, and resolve its integration effects. Would that be 
> > possible?
> 
> Currently I have two branches for this - one is generic-ipi, which 
> contains the generic bits and all the arch conversions. The other is 
> smp_call_function, which kills the unused argument to 
> smp_call_function() (and friends) and on_each_cpu(). If I separate out 
> the non-x86 archs, I'll have trouble getting it all in for 2.6.27 as 
> I'll be on vacation as of july 5th.
> 
> So it's not tied in with any block bits, but it does have all archs. 
> Even if it's a bit of a weird thing to put the whole thing into the 
> x86 tree, I don't mind if we do that. Heck, it's in the block repo to 
> begin with :-)

i'll put this into tip/generic-ipi and wont put into the x86 topics 
towards linux-next - i just want to see the effects in practice.

This is the 102th -tip topic, there's space for all :-)

> So if you could pull:
> 
> git://git.kernel.dk/linux-2.6-block.git generic-ipi
> 
> and
> 
> git://git.kernel.dk/linux-2.6-block.git smp_call_function
> 
> and merge them with the x86 changes, that would be fine. It's also the 
> place where we currently have conflicts due to 32-bit and 64-bit stuff 
> being merged, so it would help Stephen as well.

i have an even better, brilliant plan :-)

what we could do is that we could offer an auto-generic-ipi-next 
integration branch that to Stephen that is tip/auto-x86-next plus 
tip/generic-ipi.

in fact i've just implemented this. You can pull the resulting 
tip/auto-generic-ipi-next tree from:

  git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git auto-generic-ipi-next

[ note: just first raw merge and conflict resolution, not tested yet. ]

note that it embedds your tree in a Git way and we can update the 
tip/generic-ipi branch in an append-only manner and it can go towards 
Linus in whatever way you prefer. (as long as you do not rebase the 
tree)

If you agree with this setup then this tree could be put after all these 
-next branches:

  auto-core-next
  auto-cpus4096-next
  auto-ftrace-next
  auto-genirq-next
  auto-safe-poison-pointers-next
  auto-sched-next
  auto-stackprotector-next
  auto-test
  auto-test-fixes
  auto-timers-next
  auto-x86-next

and then it will merge without conflicts. It's auto-updated to all these 
branches - i.e. when these branches are iterated then 
auto-generic-ipi-next will be iterated as well.

how does this sound to you? Nothing changes to your work flow (just keep 
those branches updated and let me know when i should pull from them), 
but conflicts are auto-eliminated from Stephen's flow and the conflict 
resolution workload and burden is put on those who generate them (the 
x86 folks and you).

	Ingo

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

* Re: linux-next: manual merge of the block tree
  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:18       ` Jens Axboe
  1 sibling, 2 replies; 34+ messages in thread
From: Ingo Molnar @ 2008-06-27  9:57 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Stephen Rothwell, linux-next, Thomas Gleixner, H. Peter Anvin,
	the arch/x86 maintainers


* Ingo Molnar <mingo@elte.hu> wrote:

> i'll put this into tip/generic-ipi and wont put into the x86 topics 
> towards linux-next - i just want to see the effects in practice.
> 
> This is the 102th -tip topic, there's space for all :-)

Jens, i've started testing this in -tip - there are three small build 
fixlets in the tip/generic-ipi branch so far.

If you dont have these fixes already then you can pull them from:

 git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git generic-ipi

	Ingo

------------->
commit 8b604d520799a995946437d041f46bae7d5bcc8c
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Jun 27 11:52:45 2008 +0200

    fix: "smp_call_function: get rid of the unused nonatomic/retry argument"
    
    drivers/char/sysrq.c: In function 'sysrq_showregs_othercpus':
    drivers/char/sysrq.c:218: error: too many arguments to function 'smp_call_function'
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index dbce126..8fdfe9c 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -215,7 +215,7 @@ static void showacpu(void *dummy)
 
 static void sysrq_showregs_othercpus(struct work_struct *dummy)
 {
-	smp_call_function(showacpu, NULL, 0, 0);
+	smp_call_function(showacpu, NULL, 0);
 }
 
 static DECLARE_WORK(sysrq_showallcpus, sysrq_showregs_othercpus);

commit ce0d1b6f73870878aae622b72e85fe8f7a16b51c
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Jun 27 11:50:32 2008 +0200

    fix: "smp_call_function: get rid of the unused nonatomic/retry argument"
    
    fix:
    
    kernel/smp.c: In function 'smp_call_function_mask':
    kernel/smp.c:303: error: too many arguments to function 'smp_call_function_single'
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/kernel/smp.c b/kernel/smp.c
index 7e0432a..4f582b2 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -300,7 +300,7 @@ int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info,
 		return 0;
 	else if (num_cpus == 1) {
 		cpu = first_cpu(mask);
-		return smp_call_function_single(cpu, func, info, 0, wait);
+		return smp_call_function_single(cpu, func, info, wait);
 	}
 
 	if (!wait) {

commit 127a237a1ff49fa5b8e00af91e841598aeea3513
Author: Ingo Molnar <mingo@elte.hu>
Date:   Fri Jun 27 11:48:22 2008 +0200

    fix "smp_call_function: get rid of the unused nonatomic/retry argument"
    
    fix:
    
    arch/x86/kernel/process.c: In function 'cpu_idle_wait':
    arch/x86/kernel/process.c:64: error: too many arguments to function 'smp_call_function'
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index ba370dc..2dad8fe 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -61,7 +61,7 @@ void cpu_idle_wait(void)
 {
 	smp_mb();
 	/* kick all the CPUs so that they exit out of pm_idle */
-	smp_call_function(do_nothing, NULL, 0, 1);
+	smp_call_function(do_nothing, NULL, 1);
 }
 EXPORT_SYMBOL_GPL(cpu_idle_wait);
 

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

* Re: linux-next: manual merge of the block tree
  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
  1 sibling, 1 reply; 34+ messages in thread
From: Ingo Molnar @ 2008-06-27 10:11 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Stephen Rothwell, linux-next, Thomas Gleixner, H. Peter Anvin,
	the arch/x86 maintainers


> Jens, i've started testing this in -tip - there are three small build 
> fixlets in the tip/generic-ipi branch so far.
> 
> If you dont have these fixes already then you can pull them from:
> 
>  git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git generic-ipi

this config is causing trouble too:

  http://redhat.com/~mingo/misc/config-Fri_Jun_27_12_03_13_CEST_2008.bad

it gives:

  include/asm-x86/mach-default/entry_arch.h: Assembler messages:
  include/asm-x86/mach-default/entry_arch.h:16: Error: undefined symbol `CALL_FUNCTION_SINGLE_VECTOR' in operation

the irq vector definitions got moved around in include/asm-x86, it's 
probably an integration effect of that. Stephen will likely see such 
problems in linux-next too.

My suggestion would be: lets work on finishing the integration in 
tip/auto-generic-ipi-next and then offer it to Stephen once that looks 
good in testing?

	Ingo

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

* Re: linux-next: manual merge of the block tree
  2008-06-27  9:26     ` Ingo Molnar
  2008-06-27  9:57       ` Ingo Molnar
@ 2008-06-27 11:18       ` Jens Axboe
  1 sibling, 0 replies; 34+ messages in thread
From: Jens Axboe @ 2008-06-27 11:18 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Stephen Rothwell, linux-next, Thomas Gleixner, H. Peter Anvin,
	the arch/x86 maintainers

On Fri, Jun 27 2008, Ingo Molnar wrote:
> 
> * Jens Axboe <jens.axboe@oracle.com> wrote:
> 
> > > That way we could pull it into tip/x86 and give it some testing on 
> > > the x86 side, and resolve its integration effects. Would that be 
> > > possible?
> > 
> > Currently I have two branches for this - one is generic-ipi, which 
> > contains the generic bits and all the arch conversions. The other is 
> > smp_call_function, which kills the unused argument to 
> > smp_call_function() (and friends) and on_each_cpu(). If I separate out 
> > the non-x86 archs, I'll have trouble getting it all in for 2.6.27 as 
> > I'll be on vacation as of july 5th.
> > 
> > So it's not tied in with any block bits, but it does have all archs. 
> > Even if it's a bit of a weird thing to put the whole thing into the 
> > x86 tree, I don't mind if we do that. Heck, it's in the block repo to 
> > begin with :-)
> 
> i'll put this into tip/generic-ipi and wont put into the x86 topics 
> towards linux-next - i just want to see the effects in practice.
> 
> This is the 102th -tip topic, there's space for all :-)
> 
> > So if you could pull:
> > 
> > git://git.kernel.dk/linux-2.6-block.git generic-ipi
> > 
> > and
> > 
> > git://git.kernel.dk/linux-2.6-block.git smp_call_function
> > 
> > and merge them with the x86 changes, that would be fine. It's also the 
> > place where we currently have conflicts due to 32-bit and 64-bit stuff 
> > being merged, so it would help Stephen as well.
> 
> i have an even better, brilliant plan :-)
> 
> what we could do is that we could offer an auto-generic-ipi-next 
> integration branch that to Stephen that is tip/auto-x86-next plus 
> tip/generic-ipi.
> 
> in fact i've just implemented this. You can pull the resulting 
> tip/auto-generic-ipi-next tree from:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git auto-generic-ipi-next
> 
> [ note: just first raw merge and conflict resolution, not tested yet. ]
> 
> note that it embedds your tree in a Git way and we can update the 
> tip/generic-ipi branch in an append-only manner and it can go towards 
> Linus in whatever way you prefer. (as long as you do not rebase the 
> tree)
> 
> If you agree with this setup then this tree could be put after all these 
> -next branches:
> 
>   auto-core-next
>   auto-cpus4096-next
>   auto-ftrace-next
>   auto-genirq-next
>   auto-safe-poison-pointers-next
>   auto-sched-next
>   auto-stackprotector-next
>   auto-test
>   auto-test-fixes
>   auto-timers-next
>   auto-x86-next
> 
> and then it will merge without conflicts. It's auto-updated to all these 
> branches - i.e. when these branches are iterated then 
> auto-generic-ipi-next will be iterated as well.
> 
> how does this sound to you? Nothing changes to your work flow (just keep 
> those branches updated and let me know when i should pull from them), 
> but conflicts are auto-eliminated from Stephen's flow and the conflict 
> resolution workload and burden is put on those who generate them (the 
> x86 folks and you).

Sounds good to me :-)

-- 
Jens Axboe

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

* Re: linux-next: manual merge of the block tree
  2008-06-27  9:57       ` Ingo Molnar
  2008-06-27 10:11         ` Ingo Molnar
@ 2008-06-27 11:21         ` Jens Axboe
  1 sibling, 0 replies; 34+ messages in thread
From: Jens Axboe @ 2008-06-27 11:21 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Stephen Rothwell, linux-next, Thomas Gleixner, H. Peter Anvin,
	the arch/x86 maintainers

On Fri, Jun 27 2008, Ingo Molnar wrote:
> 
> * Ingo Molnar <mingo@elte.hu> wrote:
> 
> > i'll put this into tip/generic-ipi and wont put into the x86 topics 
> > towards linux-next - i just want to see the effects in practice.
> > 
> > This is the 102th -tip topic, there's space for all :-)
> 
> Jens, i've started testing this in -tip - there are three small build 
> fixlets in the tip/generic-ipi branch so far.
> 
> If you dont have these fixes already then you can pull them from:
> 
>  git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git generic-ipi

Fallout from since last I checked the entire tree I guess, thanks Ingo!

I'll just let them sit in your tree and only commit other changes to
mine, then I'll disable the ipi stuff from what Stephen pulls from my
git tree. OK?

-- 
Jens Axboe

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

* Re: linux-next: manual merge of the block tree
  2008-06-27 10:11         ` Ingo Molnar
@ 2008-06-27 11:21           ` Jens Axboe
  0 siblings, 0 replies; 34+ messages in thread
From: Jens Axboe @ 2008-06-27 11:21 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Stephen Rothwell, linux-next, Thomas Gleixner, H. Peter Anvin,
	the arch/x86 maintainers

On Fri, Jun 27 2008, Ingo Molnar wrote:
> 
> > Jens, i've started testing this in -tip - there are three small build 
> > fixlets in the tip/generic-ipi branch so far.
> > 
> > If you dont have these fixes already then you can pull them from:
> > 
> >  git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git generic-ipi
> 
> this config is causing trouble too:
> 
>   http://redhat.com/~mingo/misc/config-Fri_Jun_27_12_03_13_CEST_2008.bad
> 
> it gives:
> 
>   include/asm-x86/mach-default/entry_arch.h: Assembler messages:
>   include/asm-x86/mach-default/entry_arch.h:16: Error: undefined symbol `CALL_FUNCTION_SINGLE_VECTOR' in operation
> 
> the irq vector definitions got moved around in include/asm-x86, it's 
> probably an integration effect of that. Stephen will likely see such 
> problems in linux-next too.
> 
> My suggestion would be: lets work on finishing the integration in 
> tip/auto-generic-ipi-next and then offer it to Stephen once that looks 
> good in testing?

Yep agreed, that's the best way forward.

-- 
Jens Axboe

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

* linux-next: manual merge of the block tree
  2013-10-25 15:03 linux-next: Tree for Oct 25 Thierry Reding
@ 2013-10-25 15:03 ` Thierry Reding
  0 siblings, 0 replies; 34+ messages in thread
From: Thierry Reding @ 2013-10-25 15:03 UTC (permalink / raw)
  To: Dave Kleikamp, Jens Axboe; +Cc: linux-next, linux-kernel

Today's linux-next tree of the block tree got conflicts in

	include/linux/blk_types.h

caused by commits 1063cee (nfs: simplify swap) and 8382f11 (block: make
rq->cmd_flags be 64-bit).

I fixed them up (see below). Please verify that the resolution looks good.

Thanks,
Thierry
---
diff --cc include/linux/blk_types.h
index 1bea25f,238ef0e..2c1c8c9
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@@ -176,7 -176,9 +176,8 @@@ enum rq_flag_bits 
  	__REQ_FLUSH_SEQ,	/* request for flush sequence */
  	__REQ_IO_STAT,		/* account I/O stat */
  	__REQ_MIXED_MERGE,	/* merge of different types, fail separately */
 -	__REQ_KERNEL, 		/* direct IO to kernel pages */
  	__REQ_PM,		/* runtime pm request */
+ 	__REQ_END,		/* last of chain of requests */
  	__REQ_NR_BITS,		/* stops here */
  };
  
@@@ -205,27 -207,29 +206,28 @@@
  #define REQ_NOMERGE_FLAGS \
  	(REQ_NOMERGE | REQ_STARTED | REQ_SOFTBARRIER | REQ_FLUSH | REQ_FUA)
  
- #define REQ_RAHEAD		(1 << __REQ_RAHEAD)
- #define REQ_THROTTLED		(1 << __REQ_THROTTLED)
- 
- #define REQ_SORTED		(1 << __REQ_SORTED)
- #define REQ_SOFTBARRIER		(1 << __REQ_SOFTBARRIER)
- #define REQ_FUA			(1 << __REQ_FUA)
- #define REQ_NOMERGE		(1 << __REQ_NOMERGE)
- #define REQ_STARTED		(1 << __REQ_STARTED)
- #define REQ_DONTPREP		(1 << __REQ_DONTPREP)
- #define REQ_QUEUED		(1 << __REQ_QUEUED)
- #define REQ_ELVPRIV		(1 << __REQ_ELVPRIV)
- #define REQ_FAILED		(1 << __REQ_FAILED)
- #define REQ_QUIET		(1 << __REQ_QUIET)
- #define REQ_PREEMPT		(1 << __REQ_PREEMPT)
- #define REQ_ALLOCED		(1 << __REQ_ALLOCED)
- #define REQ_COPY_USER		(1 << __REQ_COPY_USER)
- #define REQ_FLUSH		(1 << __REQ_FLUSH)
- #define REQ_FLUSH_SEQ		(1 << __REQ_FLUSH_SEQ)
- #define REQ_IO_STAT		(1 << __REQ_IO_STAT)
- #define REQ_MIXED_MERGE		(1 << __REQ_MIXED_MERGE)
- #define REQ_SECURE		(1 << __REQ_SECURE)
- #define REQ_PM			(1 << __REQ_PM)
+ #define REQ_RAHEAD		(1ULL << __REQ_RAHEAD)
+ #define REQ_THROTTLED		(1ULL << __REQ_THROTTLED)
+ 
+ #define REQ_SORTED		(1ULL << __REQ_SORTED)
+ #define REQ_SOFTBARRIER		(1ULL << __REQ_SOFTBARRIER)
+ #define REQ_FUA			(1ULL << __REQ_FUA)
+ #define REQ_NOMERGE		(1ULL << __REQ_NOMERGE)
+ #define REQ_STARTED		(1ULL << __REQ_STARTED)
+ #define REQ_DONTPREP		(1ULL << __REQ_DONTPREP)
+ #define REQ_QUEUED		(1ULL << __REQ_QUEUED)
+ #define REQ_ELVPRIV		(1ULL << __REQ_ELVPRIV)
+ #define REQ_FAILED		(1ULL << __REQ_FAILED)
+ #define REQ_QUIET		(1ULL << __REQ_QUIET)
+ #define REQ_PREEMPT		(1ULL << __REQ_PREEMPT)
+ #define REQ_ALLOCED		(1ULL << __REQ_ALLOCED)
+ #define REQ_COPY_USER		(1ULL << __REQ_COPY_USER)
+ #define REQ_FLUSH		(1ULL << __REQ_FLUSH)
+ #define REQ_FLUSH_SEQ		(1ULL << __REQ_FLUSH_SEQ)
+ #define REQ_IO_STAT		(1ULL << __REQ_IO_STAT)
+ #define REQ_MIXED_MERGE		(1ULL << __REQ_MIXED_MERGE)
+ #define REQ_SECURE		(1ULL << __REQ_SECURE)
 -#define REQ_KERNEL		(1ULL << __REQ_KERNEL)
+ #define REQ_PM			(1ULL << __REQ_PM)
+ #define REQ_END			(1ULL << __REQ_END)
  
  #endif /* __LINUX_BLK_TYPES_H */

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

* linux-next: manual merge of the block tree
  2013-10-14 14:48 linux-next: Tree for Oct 14 Thierry Reding
@ 2013-10-14 14:48 ` Thierry Reding
  0 siblings, 0 replies; 34+ messages in thread
From: Thierry Reding @ 2013-10-14 14:48 UTC (permalink / raw)
  To: Kent Overstreet, Jens Axboe; +Cc: linux-next, linux-kernel

Today's linux-next merge of the block tree got conflicts in

	drivers/md/bcache/bcache.h
	drivers/md/bcache/bset.c
	drivers/md/bcache/journal.c
	drivers/md/bcache/request.c
	drivers/md/bcache/writeback.c

I've fixed them up (see below). Please verify that the resolution looks
good.

Thanks,
Thierry
---
diff --cc drivers/md/bcache/btree.c
index f42fc7e,117a12a..1ccb702
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@@ -633,10 -712,10 +707,10 @@@ static unsigned long bch_mca_scan(struc
  			break;
  
  		if (++i > 3 &&
- 		    !mca_reap(b, NULL, 0)) {
+ 		    !mca_reap(b, 0, false)) {
  			mca_data_free(b);
  			rw_unlock(true, b);
 -			--nr;
 +			freed++;
  		}
  	}
  
diff --cc drivers/md/bcache/request.c
index b6a74bc,231b108..9e1ff8e
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@@ -979,67 -1059,52 +1059,54 @@@ static void cached_dev_write(struct cac
  
  	if (should_writeback(dc, s->orig_bio,
  			     cache_mode(dc, bio),
- 			     s->op.skip)) {
- 		s->op.skip = false;
- 		s->writeback = true;
+ 			     s->iop.bypass)) {
+ 		s->iop.bypass = false;
+ 		s->iop.writeback = true;
  	}
  
- 	if (s->op.skip)
- 		goto skip;
- 
- 	trace_bcache_write(s->orig_bio, s->writeback, s->op.skip);
+ 	if (s->iop.bypass) {
+ 		s->iop.bio = s->orig_bio;
+ 		bio_get(s->iop.bio);
  
- 	if (!s->writeback) {
- 		s->op.cache_bio = bio_clone_bioset(bio, GFP_NOIO,
- 						   dc->disk.bio_split);
- 
- 		closure_bio_submit(bio, cl, s->d);
- 	} else {
+ 		if (!(bio->bi_rw & REQ_DISCARD) ||
+ 		    blk_queue_discard(bdev_get_queue(dc->bdev)))
+ 			closure_bio_submit(bio, cl, s->d);
+ 	} else if (s->iop.writeback) {
  		bch_writeback_add(dc);
 +		s->op.cache_bio = bio;
  
 -		if (s->iop.flush_journal) {
 +		if (bio->bi_rw & REQ_FLUSH) {
  			/* Also need to send a flush to the backing device */
 -			s->iop.bio = bio_clone_bioset(bio, GFP_NOIO,
 -						      dc->disk.bio_split);
 +			struct bio *flush = bio_alloc_bioset(0, GFP_NOIO,
 +							     dc->disk.bio_split);
  
 -			bio->bi_size = 0;
 -			bio->bi_vcnt = 0;
 -			closure_bio_submit(bio, cl, s->d);
 -		} else {
 -			s->iop.bio = bio;
 +			flush->bi_rw	= WRITE_FLUSH;
 +			flush->bi_bdev	= bio->bi_bdev;
 +			flush->bi_end_io = request_endio;
 +			flush->bi_private = cl;
 +
 +			closure_bio_submit(flush, cl, s->d);
  		}
- 	}
- out:
- 	closure_call(&s->op.cl, bch_insert_data, NULL, cl);
- 	continue_at(cl, cached_dev_write_complete, NULL);
- skip:
- 	s->op.skip = true;
- 	s->op.cache_bio = s->orig_bio;
- 	bio_get(s->op.cache_bio);
+ 	} else {
+ 		s->iop.bio = bio_clone_bioset(bio, GFP_NOIO,
+ 					      dc->disk.bio_split);
  
- 	if ((bio->bi_rw & REQ_DISCARD) &&
- 	    !blk_queue_discard(bdev_get_queue(dc->bdev)))
- 		goto out;
+ 		closure_bio_submit(bio, cl, s->d);
+ 	}
  
- 	closure_bio_submit(bio, cl, s->d);
- 	goto out;
+ 	closure_call(&s->iop.cl, bch_data_insert, NULL, cl);
+ 	continue_at(cl, cached_dev_write_complete, NULL);
  }
  
- static void request_nodata(struct cached_dev *dc, struct search *s)
+ static void cached_dev_nodata(struct closure *cl)
  {
- 	struct closure *cl = &s->cl;
+ 	struct search *s = container_of(cl, struct search, cl);
  	struct bio *bio = &s->bio.bio;
  
- 	if (bio->bi_rw & REQ_DISCARD) {
- 		request_write(dc, s);
- 		return;
- 	}
- 
- 	if (s->op.flush_journal)
- 		bch_journal_meta(s->op.c, cl);
+ 	if (s->iop.flush_journal)
+ 		bch_journal_meta(s->iop.c, cl);
  
+ 	/* If it's a flush, we send the flush to the backing device too */
  	closure_bio_submit(bio, cl, s->d);
  
  	continue_at(cl, cached_dev_bio_complete, NULL);

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

* linux-next: manual merge of the block tree
@ 2013-10-11 19:04 Mark Brown
  0 siblings, 0 replies; 34+ messages in thread
From: Mark Brown @ 2013-10-11 19:04 UTC (permalink / raw)
  To: Jens Axboe, Kent Overstreet; +Cc: linux-next, linux-kernel, Thierry Reding

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

Today's linux-next merge of the block tree got additional conflicts due to
interaction between dd879364 (bcache: Break up struct search) and
c0f04d88 (bcache: Fix flushes in writeback mode) in Linus' tree.

I fixed it up (see below) and can carry as required. Please check if the
resolution looks correct.

diff --cc drivers/md/bcache/request.c
index b6a74bc,231b108..0000000
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@@ -979,67 -1059,52 +1059,53 @@@ static void cached_dev_write(struct cac
  
  	if (should_writeback(dc, s->orig_bio,
  			     cache_mode(dc, bio),
- 			     s->op.skip)) {
- 		s->op.skip = false;
- 		s->writeback = true;
+ 			     s->iop.bypass)) {
+ 		s->iop.bypass = false;
+ 		s->iop.writeback = true;
  	}
  
- 	if (s->op.skip)
- 		goto skip;
- 
- 	trace_bcache_write(s->orig_bio, s->writeback, s->op.skip);
+ 	if (s->iop.bypass) {
+ 		s->iop.bio = s->orig_bio;
+ 		bio_get(s->iop.bio);
  
- 	if (!s->writeback) {
- 		s->op.cache_bio = bio_clone_bioset(bio, GFP_NOIO,
- 						   dc->disk.bio_split);
- 
- 		closure_bio_submit(bio, cl, s->d);
- 	} else {
+ 		if (!(bio->bi_rw & REQ_DISCARD) ||
+ 		    blk_queue_discard(bdev_get_queue(dc->bdev)))
+ 			closure_bio_submit(bio, cl, s->d);
+ 	} else if (s->iop.writeback) {
  		bch_writeback_add(dc);
- 		s->op.cache_bio = bio;
  
 -		if (s->iop.flush_journal) {
 +		if (bio->bi_rw & REQ_FLUSH) {
  			/* Also need to send a flush to the backing device */
 -			s->iop.bio = bio_clone_bioset(bio, GFP_NOIO,
 -						      dc->disk.bio_split);
 +			struct bio *flush = bio_alloc_bioset(0, GFP_NOIO,
 +							     dc->disk.bio_split);
  
 -			bio->bi_size = 0;
 -			bio->bi_vcnt = 0;
 -			closure_bio_submit(bio, cl, s->d);
 -		} else {
 -			s->iop.bio = bio;
 +			flush->bi_rw	= WRITE_FLUSH;
 +			flush->bi_bdev	= bio->bi_bdev;
 +			flush->bi_end_io = request_endio;
 +			flush->bi_private = cl;
 +
 +			closure_bio_submit(flush, cl, s->d);
  		}
- 	}
- out:
- 	closure_call(&s->op.cl, bch_insert_data, NULL, cl);
- 	continue_at(cl, cached_dev_write_complete, NULL);
- skip:
- 	s->op.skip = true;
- 	s->op.cache_bio = s->orig_bio;
- 	bio_get(s->op.cache_bio);
+ 	} else {
+ 		s->iop.bio = bio_clone_bioset(bio, GFP_NOIO,
+ 					      dc->disk.bio_split);
  
- 	if ((bio->bi_rw & REQ_DISCARD) &&
- 	    !blk_queue_discard(bdev_get_queue(dc->bdev)))
- 		goto out;
+ 		closure_bio_submit(bio, cl, s->d);
+ 	}
  
- 	closure_bio_submit(bio, cl, s->d);
- 	goto out;
+ 	closure_call(&s->iop.cl, bch_data_insert, NULL, cl);
+ 	continue_at(cl, cached_dev_write_complete, NULL);
  }
  
- static void request_nodata(struct cached_dev *dc, struct search *s)
+ static void cached_dev_nodata(struct closure *cl)
  {
- 	struct closure *cl = &s->cl;
+ 	struct search *s = container_of(cl, struct search, cl);
  	struct bio *bio = &s->bio.bio;
  
- 	if (bio->bi_rw & REQ_DISCARD) {
- 		request_write(dc, s);
- 		return;
- 	}
- 
- 	if (s->op.flush_journal)
- 		bch_journal_meta(s->op.c, cl);
+ 	if (s->iop.flush_journal)
+ 		bch_journal_meta(s->iop.c, cl);
  
+ 	/* If it's a flush, we send the flush to the backing device too */
  	closure_bio_submit(bio, cl, s->d);
  
  	continue_at(cl, cached_dev_bio_complete, NULL);

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: manual merge of the block tree
  2013-10-01 11:03 linux-next: Tree for Oct 1 Thierry Reding
@ 2013-10-01 11:07 ` Thierry Reding
  0 siblings, 0 replies; 34+ messages in thread
From: Thierry Reding @ 2013-10-01 11:07 UTC (permalink / raw)
  To: Jens Axboe, Kent Overstreet; +Cc: linux-next, linux-kernel

Today's linux-next merge of the block tree got conflicts in:

	drivers/md/bcache/bcache.h
	drivers/md/bcache/bset.c
	drivers/md/bcache/journal.c
	drivers/md/bcache/request.c
	drivers/md/bcache/writeback.c

I fixed it up (see below). Please check if the resolution looks correct.

Thanks,
Thierry
---
diff --cc drivers/md/bcache/btree.c
index f42fc7e,117a12a..1ccb702
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@@ -633,10 -712,10 +707,10 @@@ static unsigned long bch_mca_scan(struc
  			break;
  
  		if (++i > 3 &&
- 		    !mca_reap(b, NULL, 0)) {
+ 		    !mca_reap(b, 0, false)) {
  			mca_data_free(b);
  			rw_unlock(true, b);
 -			--nr;
 +			freed++;
  		}
  	}
  
diff --cc drivers/md/bcache/request.c
index 71eb233,231b108..49ee1cf
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@@ -979,68 -1059,52 +1059,55 @@@ static void cached_dev_write(struct cac
  
  	if (should_writeback(dc, s->orig_bio,
  			     cache_mode(dc, bio),
- 			     s->op.skip)) {
- 		s->op.skip = false;
- 		s->writeback = true;
+ 			     s->iop.bypass)) {
+ 		s->iop.bypass = false;
+ 		s->iop.writeback = true;
  	}
  
- 	if (s->op.skip)
- 		goto skip;
- 
- 	trace_bcache_write(s->orig_bio, s->writeback, s->op.skip);
+ 	if (s->iop.bypass) {
+ 		s->iop.bio = s->orig_bio;
+ 		bio_get(s->iop.bio);
  
- 	if (!s->writeback) {
- 		s->op.cache_bio = bio_clone_bioset(bio, GFP_NOIO,
- 						   dc->disk.bio_split);
- 
- 		closure_bio_submit(bio, cl, s->d);
- 	} else {
+ 		if (!(bio->bi_rw & REQ_DISCARD) ||
+ 		    blk_queue_discard(bdev_get_queue(dc->bdev)))
+ 			closure_bio_submit(bio, cl, s->d);
+ 	} else if (s->iop.writeback) {
  		bch_writeback_add(dc);
  
 -		if (s->iop.flush_journal) {
 +		if (bio->bi_rw & REQ_FLUSH) {
  			/* Also need to send a flush to the backing device */
 -			s->iop.bio = bio_clone_bioset(bio, GFP_NOIO,
 -						      dc->disk.bio_split);
 +			struct bio *flush = bio_alloc_bioset(0, GFP_NOIO,
 +							     dc->disk.bio_split);
  
 -			bio->bi_size = 0;
 -			bio->bi_vcnt = 0;
 -			closure_bio_submit(bio, cl, s->d);
 +			flush->bi_rw	= WRITE_FLUSH;
 +			flush->bi_bdev	= bio->bi_bdev;
 +			flush->bi_end_io = request_endio;
 +			flush->bi_private = cl;
 +
 +			closure_bio_submit(flush, cl, s->d);
  		} else {
- 			s->op.cache_bio = bio;
+ 			s->iop.bio = bio;
  		}
- 	}
- out:
- 	closure_call(&s->op.cl, bch_insert_data, NULL, cl);
- 	continue_at(cl, cached_dev_write_complete, NULL);
- skip:
- 	s->op.skip = true;
- 	s->op.cache_bio = s->orig_bio;
- 	bio_get(s->op.cache_bio);
+ 	} else {
+ 		s->iop.bio = bio_clone_bioset(bio, GFP_NOIO,
+ 					      dc->disk.bio_split);
  
- 	if ((bio->bi_rw & REQ_DISCARD) &&
- 	    !blk_queue_discard(bdev_get_queue(dc->bdev)))
- 		goto out;
+ 		closure_bio_submit(bio, cl, s->d);
+ 	}
  
- 	closure_bio_submit(bio, cl, s->d);
- 	goto out;
+ 	closure_call(&s->iop.cl, bch_data_insert, NULL, cl);
+ 	continue_at(cl, cached_dev_write_complete, NULL);
  }
  
- static void request_nodata(struct cached_dev *dc, struct search *s)
+ static void cached_dev_nodata(struct closure *cl)
  {
- 	struct closure *cl = &s->cl;
+ 	struct search *s = container_of(cl, struct search, cl);
  	struct bio *bio = &s->bio.bio;
  
- 	if (bio->bi_rw & REQ_DISCARD) {
- 		request_write(dc, s);
- 		return;
- 	}
- 
- 	if (s->op.flush_journal)
- 		bch_journal_meta(s->op.c, cl);
+ 	if (s->iop.flush_journal)
+ 		bch_journal_meta(s->iop.c, cl);
  
+ 	/* If it's a flush, we send the flush to the backing device too */
  	closure_bio_submit(bio, cl, s->d);
  
  	continue_at(cl, cached_dev_bio_complete, NULL);

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

* linux-next: manual merge of the block tree
  2013-09-30 11:26 linux-next: manual merge of the bcon tree Thierry Reding
@ 2013-09-30 11:26 ` Thierry Reding
  0 siblings, 0 replies; 34+ messages in thread
From: Thierry Reding @ 2013-09-30 11:26 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, linux-kernel

Today's linux-next merge of the block tree got conflicts in

	drivers/md/bcache/bcache.h
	drivers/md/bcache/bset.c
	drivers/md/bcache/journal.c
	drivers/md/bcache/request.c
	drivers/md/bcache/writeback.c

I fixed it up (see below). Please check if the resolution looks correct.

Thanks,
Thierry

diff --cc drivers/md/bcache/btree.c
index f42fc7e,117a12a..1ccb702
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@@ -633,10 -712,10 +707,10 @@@ static unsigned long bch_mca_scan(struc
  			break;
  
  		if (++i > 3 &&
- 		    !mca_reap(b, NULL, 0)) {
+ 		    !mca_reap(b, 0, false)) {
  			mca_data_free(b);
  			rw_unlock(true, b);
 -			--nr;
 +			freed++;
  		}
  	}
  
diff --cc drivers/md/bcache/request.c
index 71eb233,231b108..49ee1cf
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@@ -979,68 -1059,52 +1059,55 @@@ static void cached_dev_write(struct cac
  
  	if (should_writeback(dc, s->orig_bio,
  			     cache_mode(dc, bio),
- 			     s->op.skip)) {
- 		s->op.skip = false;
- 		s->writeback = true;
+ 			     s->iop.bypass)) {
+ 		s->iop.bypass = false;
+ 		s->iop.writeback = true;
  	}
  
- 	if (s->op.skip)
- 		goto skip;
- 
- 	trace_bcache_write(s->orig_bio, s->writeback, s->op.skip);
+ 	if (s->iop.bypass) {
+ 		s->iop.bio = s->orig_bio;
+ 		bio_get(s->iop.bio);
  
- 	if (!s->writeback) {
- 		s->op.cache_bio = bio_clone_bioset(bio, GFP_NOIO,
- 						   dc->disk.bio_split);
- 
- 		closure_bio_submit(bio, cl, s->d);
- 	} else {
+ 		if (!(bio->bi_rw & REQ_DISCARD) ||
+ 		    blk_queue_discard(bdev_get_queue(dc->bdev)))
+ 			closure_bio_submit(bio, cl, s->d);
+ 	} else if (s->iop.writeback) {
  		bch_writeback_add(dc);
  
 -		if (s->iop.flush_journal) {
 +		if (bio->bi_rw & REQ_FLUSH) {
  			/* Also need to send a flush to the backing device */
 -			s->iop.bio = bio_clone_bioset(bio, GFP_NOIO,
 -						      dc->disk.bio_split);
 +			struct bio *flush = bio_alloc_bioset(0, GFP_NOIO,
 +							     dc->disk.bio_split);
  
 -			bio->bi_size = 0;
 -			bio->bi_vcnt = 0;
 -			closure_bio_submit(bio, cl, s->d);
 +			flush->bi_rw	= WRITE_FLUSH;
 +			flush->bi_bdev	= bio->bi_bdev;
 +			flush->bi_end_io = request_endio;
 +			flush->bi_private = cl;
 +
 +			closure_bio_submit(flush, cl, s->d);
  		} else {
- 			s->op.cache_bio = bio;
+ 			s->iop.bio = bio;
  		}
- 	}
- out:
- 	closure_call(&s->op.cl, bch_insert_data, NULL, cl);
- 	continue_at(cl, cached_dev_write_complete, NULL);
- skip:
- 	s->op.skip = true;
- 	s->op.cache_bio = s->orig_bio;
- 	bio_get(s->op.cache_bio);
+ 	} else {
+ 		s->iop.bio = bio_clone_bioset(bio, GFP_NOIO,
+ 					      dc->disk.bio_split);
  
- 	if ((bio->bi_rw & REQ_DISCARD) &&
- 	    !blk_queue_discard(bdev_get_queue(dc->bdev)))
- 		goto out;
+ 		closure_bio_submit(bio, cl, s->d);
+ 	}
  
- 	closure_bio_submit(bio, cl, s->d);
- 	goto out;
+ 	closure_call(&s->iop.cl, bch_data_insert, NULL, cl);
+ 	continue_at(cl, cached_dev_write_complete, NULL);
  }
  
- static void request_nodata(struct cached_dev *dc, struct search *s)
+ static void cached_dev_nodata(struct closure *cl)
  {
- 	struct closure *cl = &s->cl;
+ 	struct search *s = container_of(cl, struct search, cl);
  	struct bio *bio = &s->bio.bio;
  
- 	if (bio->bi_rw & REQ_DISCARD) {
- 		request_write(dc, s);
- 		return;
- 	}
- 
- 	if (s->op.flush_journal)
- 		bch_journal_meta(s->op.c, cl);
+ 	if (s->iop.flush_journal)
+ 		bch_journal_meta(s->iop.c, cl);
  
+ 	/* If it's a flush, we send the flush to the backing device too */
  	closure_bio_submit(bio, cl, s->d);
  
  	continue_at(cl, cached_dev_bio_complete, NULL);

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

* linux-next: manual merge of the block tree
@ 2008-12-15  7:08 Stephen Rothwell
  0 siblings, 0 replies; 34+ messages in thread
From: Stephen Rothwell @ 2008-12-15  7:08 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, Ingo Molnar

Hi Jens,

Today's linux-next merge of the block tree got a conflict in fs/bio.c
between commit 0bfc24559d7945506184d86739fe365a181f06b7 ("blktrace: port
to tracepoints, update") from the ftrace tree and commit
18e08407d87bed3a9c4205e53bb16fe36088a521 ("bio: allow individual slabs in
the bio_set") from the block tree.

Just an overlapping addition/removal.  I fixed it up (see below) and can
carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc fs/bio.c
index df99c88,3bd633d..0000000
--- a/fs/bio.c
+++ b/fs/bio.c
@@@ -26,12 -26,13 +26,16 @@@
  #include <linux/mempool.h>
  #include <linux/workqueue.h>
  #include <linux/blktrace_api.h>
 +#include <trace/block.h>
  #include <scsi/sg.h>		/* for struct sg_iovec */
  
 +DEFINE_TRACE(block_split);
 +
- static struct kmem_cache *bio_slab __read_mostly;
+ /*
+  * Test patch to inline a certain number of bi_io_vec's inside the bio
+  * itself, to shrink a bio data allocation from two mempool calls to one
+  */
+ #define BIO_INLINE_VECS		4
  
  static mempool_t *bio_split_pool __read_mostly;
  

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

* Re: linux-next: manual merge of the block tree
  2008-11-19  9:14 ` Jens Axboe
@ 2008-11-19  9:32   ` Stephen Rothwell
  0 siblings, 0 replies; 34+ messages in thread
From: Stephen Rothwell @ 2008-11-19  9:32 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, Zhaolei, Fernando Luis Vázquez Cao

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

Hi Jens,

On Wed, 19 Nov 2008 10:14:48 +0100 Jens Axboe <jens.axboe@oracle.com> wrote:
>
> Just noticed that myself as well, will update for-next now.

Thanks.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: manual merge of the block tree
  2008-11-19  3:21 Stephen Rothwell
@ 2008-11-19  9:14 ` Jens Axboe
  2008-11-19  9:32   ` Stephen Rothwell
  0 siblings, 1 reply; 34+ messages in thread
From: Jens Axboe @ 2008-11-19  9:14 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, Zhaolei, Fernando Luis Vázquez Cao

On Wed, Nov 19 2008, Stephen Rothwell wrote:
> Hi Jens,
> 
> Today's linux-next merge of the block tree got a conflict in
> drivers/block/xen-blkfront.c between commit
> 68aee07f9bad2c830a898cf6d6bfc11ea24efc40 ("Release old elevator on change
> elevator") from Linus' tree and commit
> f7ed11048c85660828fa2017ea2e3da27235f76a ("xen-blkfront: set queue
> paravirt flag") from the block tree.
> 
> I used the version from the block tree and will carry this fix for a
> while but assume that you will fix the conflict in the block tree soon.

Just noticed that myself as well, will update for-next now.

-- 
Jens Axboe

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

* linux-next: manual merge of the block tree
@ 2008-11-19  3:21 Stephen Rothwell
  2008-11-19  9:14 ` Jens Axboe
  0 siblings, 1 reply; 34+ messages in thread
From: Stephen Rothwell @ 2008-11-19  3:21 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, Zhaolei, Fernando Luis Vázquez Cao

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

Hi Jens,

Today's linux-next merge of the block tree got a conflict in
drivers/block/xen-blkfront.c between commit
68aee07f9bad2c830a898cf6d6bfc11ea24efc40 ("Release old elevator on change
elevator") from Linus' tree and commit
f7ed11048c85660828fa2017ea2e3da27235f76a ("xen-blkfront: set queue
paravirt flag") from the block tree.

I used the version from the block tree and will carry this fix for a
while but assume that you will fix the conflict in the block tree soon.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: manual merge of the block tree
  2008-11-07  9:50 ` Jens Axboe
@ 2008-11-07 10:07   ` Stephen Rothwell
  0 siblings, 0 replies; 34+ messages in thread
From: Stephen Rothwell @ 2008-11-07 10:07 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, Tejun Heo, Arnaldo Carvalho de Melo

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

Hi Jens,

On Fri, 7 Nov 2008 10:50:08 +0100 Jens Axboe <jens.axboe@oracle.com> wrote:
>
> Both of these merge errors will go away very shortly, since I'll rebase
> for-next on master again due to the recent merge.

Thanks, I expected as much.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: manual merge of the block tree
  2008-11-07  6:10 Stephen Rothwell
@ 2008-11-07  9:50 ` Jens Axboe
  2008-11-07 10:07   ` Stephen Rothwell
  0 siblings, 1 reply; 34+ messages in thread
From: Jens Axboe @ 2008-11-07  9:50 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, Tejun Heo, Arnaldo Carvalho de Melo

On Fri, Nov 07 2008, Stephen Rothwell wrote:
> Hi Jens,
> 
> Today's linux-next merge of the block tree got a conflict in
> block/elevator.c between commit 2920ebbd65f3e80c318adf5191ac0987142bda80
> ("block: add timer on blkdev_dequeue_request() not elv_next_request()")
> from Linus' tree and commit 8b3806453dd25d15a7ca7d537124af14ba8546bc
> ("blktrace: port to tracepoints") from the block tree.
> 
> Just a context change.  I fixed it up (see below) and assume it will be
> fixed in your tree soon.

Both of these merge errors will go away very shortly, since I'll rebase
for-next on master again due to the recent merge.

-- 
Jens Axboe

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

* linux-next: manual merge of the block tree
@ 2008-11-07  6:14 Stephen Rothwell
  0 siblings, 0 replies; 34+ messages in thread
From: Stephen Rothwell @ 2008-11-07  6:14 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, Alan Stern

Hi Jens,

Today's linux-next merge of the block tree got a conflict in
block/blk-timeout.c between commit
7838c15b8dd18e78a523513749e5b54bda07b0cb ("Block: use round_jiffies_up
()") from Linus' tree and commit 514054ea03191f529c6783bc0048e173e5194a27
("block: optimizations in blk_rq_timed_out_timer()") from the block tree.

Just a context change.  I fixed it up (see below) and assume it will be
fixed in your tree shortly.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc block/blk-timeout.c
index 69185ea,151790e..0000000
--- a/block/blk-timeout.c
+++ b/block/blk-timeout.c
@@@ -126,16 -133,19 +126,19 @@@ void blk_rq_timed_out_timer(unsigned lo
  			if (blk_mark_rq_complete(rq))
  				continue;
  			blk_rq_timed_out(rq);
+ 		} else {
+ 			if (!next || time_after(next, rq->deadline))
+ 				next = rq->deadline;
  		}
- 		if (!next_set) {
- 			next = rq->deadline;
- 			next_set = 1;
- 		} else if (time_after(next, rq->deadline))
- 			next = rq->deadline;
  	}
  
- 	if (next_set && !list_empty(&q->timeout_list))
+ 	/*
+ 	 * next can never be 0 here with the list non-empty, since we always
+ 	 * bump ->deadline to 1 so we can detect if the timer was ever added or not.
+ 	 * See comment in blk_add_timer()
+ 	 */
+ 	if (next)
 -		mod_timer(&q->timeout, round_jiffies(next));
 +		mod_timer(&q->timeout, round_jiffies_up(next));
  
  	spin_unlock_irqrestore(q->queue_lock, flags);
  }

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

* linux-next: manual merge of the block tree
@ 2008-11-07  6:10 Stephen Rothwell
  2008-11-07  9:50 ` Jens Axboe
  0 siblings, 1 reply; 34+ messages in thread
From: Stephen Rothwell @ 2008-11-07  6:10 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, Tejun Heo, Arnaldo Carvalho de Melo

Hi Jens,

Today's linux-next merge of the block tree got a conflict in
block/elevator.c between commit 2920ebbd65f3e80c318adf5191ac0987142bda80
("block: add timer on blkdev_dequeue_request() not elv_next_request()")
from Linus' tree and commit 8b3806453dd25d15a7ca7d537124af14ba8546bc
("blktrace: port to tracepoints") from the block tree.

Just a context change.  I fixed it up (see below) and assume it will be
fixed in your tree soon.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc block/elevator.c
index 9ac82dd,e09183b..0000000
--- a/block/elevator.c
+++ b/block/elevator.c
@@@ -772,7 -787,13 +787,7 @@@ struct request *elv_next_request(struc
  			 * not be passed by new incoming requests
  			 */
  			rq->cmd_flags |= REQ_STARTED;
- 			blk_add_trace_rq(q, rq, BLK_TA_ISSUE);
+ 			trace_block_rq_issue(q, rq);
 -
 -			/*
 -			 * We are now handing the request to the hardware,
 -			 * add the timeout handler
 -			 */
 -			blk_add_timer(rq);
  		}
  
  		if (!q->boundary_rq || q->boundary_rq == rq) {

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

* linux-next: manual merge of the block tree
@ 2008-10-15  7:40 Stephen Rothwell
  0 siblings, 0 replies; 34+ messages in thread
From: Stephen Rothwell @ 2008-10-15  7:40 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-next, Alexey Dobriyan, David S. Miller, Ingo Molnar, Andrew Morton

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

Hi Jens,

Today's linux-next merge of the block tree got conflicts in
include/linux/interrupt.h and kernel/softirq.c between commit
978b0116cd225682a29e3d1d5010319bf2de32c2 ("softirq: allocate less
vectors") from the tip-core tree and commit
c065c007d92de6ed071c9939bd1982d3a35ebd0f ("softirq: Define and use
NR_SOFTIRQ") from the block tree.

These two commits seem to do the same thing.  I have used the latter as
other things in the block tree depend on it.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 34+ 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; 34+ 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] 34+ messages in thread

* Re: 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 13:58   ` James Bottomley
  0 siblings, 1 reply; 34+ 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] 34+ messages in thread

* linux-next: manual merge of the block tree
@ 2008-09-05  6:12 Stephen Rothwell
  2008-09-05  6:22 ` Jens Axboe
  0 siblings, 1 reply; 34+ 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] 34+ messages in thread

* linux-next: manual merge of the block tree
@ 2008-09-03  5:58 Stephen Rothwell
  0 siblings, 0 replies; 34+ messages in thread
From: Stephen Rothwell @ 2008-09-03  5:58 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, FUJITA Tomonori, Tejun Heo

Hi Jens,

Today's linux-next merge of the block tree got a conflict in
block/cmd-filter.c between commit
bb23b431db7405f6d79f989ad0236bf6428ba1cb ("remove blk_register_filter and
blk_unregister_filter in gendisk") from Linus' tree and commit
d68103f74be7c93f36705651a2115da177308751 ("block: move holder_dir from
disk to part0") from the block tree.

Just a trivial add/removal clash.  I fixed it up (see below) and can
carry the fix while necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc block/cmd-filter.c
index 228b644,df450d6..0000000
--- a/block/cmd-filter.c
+++ b/block/cmd-filter.c
@@@ -230,6 -225,4 +226,5 @@@ void blk_unregister_filter(struct gendi
  	struct blk_cmd_filter *filter = &disk->queue->cmd_filter;
  
  	kobject_put(&filter->kobj);
- 	kobject_put(disk->holder_dir->parent);
  }
 +EXPORT_SYMBOL(blk_unregister_filter);

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

* linux-next: manual merge of the block tree
@ 2008-09-03  5:55 Stephen Rothwell
  0 siblings, 0 replies; 34+ messages in thread
From: Stephen Rothwell @ 2008-09-03  5:55 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, Tejun Heo, FUJITA Tomonori

Hi Jens,

Today's linux-next merge of the block tree got a conflicts in
block/genhd.c between commits bb23b431db7405f6d79f989ad0236bf6428ba1cb
("remove blk_register_filter and blk_unregister_filter in gendisk") and
ddef43a843f620c6742a06633739887a901ec06b ("block: restore original
behavior of /proc/partition when there's no partition") from Linus' tree
and commits 8d5ceff5828d044eeb93656093f50e6f522f9d71 ("block: implement
and use {disk|part}_to_dev()") and
f21bb156d79de8404a0e04eb311141a01b459c92 ("block: use class_dev_iterator
instead of class_for_each_device()") from the block tree.

I fixed them up (see below) and can carry the fixes while needed.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc block/genhd.c
index c114a43,9c27e15..0000000
--- a/block/genhd.c
+++ b/block/genhd.c
@@@ -183,17 -484,41 +484,40 @@@ static int exact_lock(dev_t devt, void 
  void add_disk(struct gendisk *disk)
  {
  	struct backing_dev_info *bdi;
+ 	dev_t devt;
  	int retval;
  
+ 	/* minors == 0 indicates to use ext devt from part0 and should
+ 	 * be accompanied with EXT_DEVT flag.  Make sure all
+ 	 * parameters make sense.
+ 	 */
+ 	WARN_ON(disk->minors && !(disk->major || disk->first_minor));
+ 	WARN_ON(!disk->minors && !(disk->flags & GENHD_FL_EXT_DEVT));
+ 
  	disk->flags |= GENHD_FL_UP;
- 	blk_register_region(MKDEV(disk->major, disk->first_minor),
- 			    disk->minors, NULL, exact_match, exact_lock, disk);
+ 
+ 	retval = blk_alloc_devt(&disk->part0, &devt);
+ 	if (retval) {
+ 		WARN_ON(1);
+ 		return;
+ 	}
+ 	disk_to_dev(disk)->devt = devt;
+ 
+ 	/* ->major and ->first_minor aren't supposed to be
+ 	 * dereferenced from here on, but set them just in case.
+ 	 */
+ 	disk->major = MAJOR(devt);
+ 	disk->first_minor = MINOR(devt);
+ 
+ 	blk_register_region(disk_devt(disk), disk->minors, NULL,
+ 			    exact_match, exact_lock, disk);
  	register_disk(disk);
  	blk_register_queue(disk);
 -	blk_register_filter(disk);
  
  	bdi = &disk->queue->backing_dev_info;
- 	bdi_register_dev(bdi, MKDEV(disk->major, disk->first_minor));
- 	retval = sysfs_create_link(&disk->dev.kobj, &bdi->dev->kobj, "bdi");
+ 	bdi_register_dev(bdi, disk_devt(disk));
+ 	retval = sysfs_create_link(&disk_to_dev(disk)->kobj, &bdi->dev->kobj,
+ 				   "bdi");
  	WARN_ON(retval);
  }
  
@@@ -202,11 -527,11 +526,10 @@@ EXPORT_SYMBOL(del_gendisk);	/* in parti
  
  void unlink_gendisk(struct gendisk *disk)
  {
- 	sysfs_remove_link(&disk->dev.kobj, "bdi");
 -	blk_unregister_filter(disk);
+ 	sysfs_remove_link(&disk_to_dev(disk)->kobj, "bdi");
  	bdi_unregister(&disk->queue->backing_dev_info);
  	blk_unregister_queue(disk);
- 	blk_unregister_region(MKDEV(disk->major, disk->first_minor),
- 			      disk->minors);
+ 	blk_unregister_region(disk_devt(disk), disk->minors);
  }
  
  /**
@@@ -319,51 -683,37 +681,48 @@@ static void *disk_seqf_next(struct seq_
  	return NULL;
  }
  
- static int find_next(struct device *dev, void *data)
+ static void disk_seqf_stop(struct seq_file *seqf, void *v)
  {
- 	if (dev->type == &disk_type)
- 		return 1;
- 	return 0;
- }
+ 	struct class_dev_iter *iter = seqf->private;
  
- static void *part_next(struct seq_file *part, void *v, loff_t *pos)
- {
- 	struct gendisk *gp = v;
- 	struct device *dev;
- 	++*pos;
- 	dev = class_find_device(&block_class, &gp->dev, NULL, find_next);
- 	if (dev) {
- 		put_device(dev);
- 		return dev_to_disk(dev);
+ 	/* stop is called even after start failed :-( */
+ 	if (iter) {
+ 		class_dev_iter_exit(iter);
+ 		kfree(iter);
  	}
- 	return NULL;
  }
  
- static void part_stop(struct seq_file *part, void *v)
+ static void *show_partition_start(struct seq_file *seqf, loff_t *pos)
  {
- 	mutex_unlock(&block_class_lock);
+ 	static void *p;
+ 
+ 	p = disk_seqf_start(seqf, pos);
+ 	if (!IS_ERR(p) && p)
+ 		seq_puts(seqf, "major   minor   #blocks  name\n\n");
+ 	return p;
  }
  
- static int show_partition(struct seq_file *part, void *v)
+ static int show_partition(struct seq_file *seqf, void *v)
  {
  	struct gendisk *sgp = v;
- 	int n;
+ 	struct disk_part_iter piter;
+ 	struct hd_struct *part;
  	char buf[BDEVNAME_SIZE];
  
 +	/*
 +	 * Print header if start told us to do.  This is to preserve
 +	 * the original behavior of not printing header if no
 +	 * partition exists.  This hackery will be removed later with
 +	 * class iteration clean up.
 +	 */
 +	if (part->private) {
 +		seq_puts(part, "major minor  #blocks  name\n\n");
 +		part->private = NULL;
 +	}
 +
  	/* Don't show non-partitionable removeable devices or empty devices */
- 	if (!get_capacity(sgp) ||
- 			(sgp->minors == 1 && (sgp->flags & GENHD_FL_REMOVABLE)))
+ 	if (!get_capacity(sgp) || (!disk_partitionable(sgp) &&
+ 				   (sgp->flags & GENHD_FL_REMOVABLE)))
  		return 0;
  	if (sgp->flags & GENHD_FL_SUPPRESS_PARTITION_INFO)
  		return 0;

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

* linux-next: manual merge of the block tree
@ 2008-09-02  6:06 Stephen Rothwell
  0 siblings, 0 replies; 34+ messages in thread
From: Stephen Rothwell @ 2008-09-02  6:06 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, Ananth N Mavinakayanahalli, Tejun Heo

Hi Jens,

Today's linux-next merge of the block tree got a conflict in
lib/Kconfig.debug between commits
94a97a3018e55a27d1c29e011b3c38fee01a967f ("Move backtrace selftests to
tests/") and 0f6add4bafdbff7a822e37dec0436e2392864d9a ("Move lkdtm to
tests/") from the tests tree and the three commits dealing with
CONFIG_DEBUG_BLOCK_EXT_DEVT from the block tree.

Just overlapping adds/removes.  I fixed it up (see below) and can carry
the fix.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc lib/Kconfig.debug
index f62c706,2a50e95..0000000
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@@ -572,6 -624,44 +572,28 @@@ config RCU_CPU_STAL
  
  	  Say N if you are unsure.
  
+ config DEBUG_BLOCK_EXT_DEVT
+         bool "Force extended block device numbers and spread them"
+ 	depends on DEBUG_KERNEL
+ 	depends on BLOCK
+ 	default n
+ 	help
+ 	  Conventionally, block device numbers are allocated from
+ 	  predetermined contiguous area.  However, extended block area
+ 	  may introduce non-contiguous block device numbers.  This
+ 	  option forces most block device numbers to be allocated from
+ 	  the extended space and spreads them to discover kernel or
+ 	  userland code paths which assume predetermined contiguous
+ 	  device number allocation.
+ 
+ 	  Note that turning on this debug option shuffles all the
+ 	  device numbers for all IDE and SCSI devices including libata
+ 	  ones, so root partition specified using device number
+ 	  directly (via rdev or root=MAJ:MIN) won't work anymore.
+ 	  Textual device names (root=/dev/sdXn) will continue to work.
+ 
+ 	  Say N if you are unsure.
+ 
 -config LKDTM
 -	tristate "Linux Kernel Dump Test Tool Module"
 -	depends on DEBUG_KERNEL
 -	depends on KPROBES
 -	depends on BLOCK
 -	default n
 -	help
 -	This module enables testing of the different dumping mechanisms by
 -	inducing system failures at predefined crash points.
 -	If you don't need it: say N
 -	Choose M here to compile this code as a module. The module will be
 -	called lkdtm.
 -
 -	Documentation on how to use the module can be found in
 -	drivers/misc/lkdtm.c
 -
  config FAULT_INJECTION
  	bool "Fault-injection framework"
  	depends on DEBUG_KERNEL

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

* linux-next: manual merge of the block tree
@ 2008-09-02  5:59 Stephen Rothwell
  0 siblings, 0 replies; 34+ messages in thread
From: Stephen Rothwell @ 2008-09-02  5:59 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, Mike Anderson, Kiyoshi Ueda, Alasdair G Kergon

Hi Jens,

Today's linux-next merge of the block tree got a conflict in
drivers/md/dm-mpath.c between commit
a51365f80fbb8b5152d1655581f93704dd989f86
("dm-mpath-remove-is_active-from-struct-dm_path") from the device-mapper
tree and commit 5ee80e583691a8d2012384d380afdff15dd28c8a ("dm: Call
blk_abort_queue on failed paths") from the block tree.

Just changes in context.  I fixed it up (see below) and can carry the
patch.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc drivers/md/dm-mpath.c
index 1a62196,2e16ea9..0000000
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@@ -122,8 -123,10 +124,10 @@@ static struct pgpath *alloc_pgpath(void
  {
  	struct pgpath *pgpath = kzalloc(sizeof(*pgpath), GFP_KERNEL);
  
- 	if (pgpath)
+ 	if (pgpath) {
 -		pgpath->path.is_active = 1;
 +		pgpath->is_active = 1;
+ 		INIT_WORK(&pgpath->deactivate_path, deactivate_path);
+ 	}
  
  	return pgpath;
  }

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

* linux-next: manual merge of the block tree
@ 2008-08-28  5:30 Stephen Rothwell
  0 siblings, 0 replies; 34+ messages in thread
From: Stephen Rothwell @ 2008-08-28  5:30 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, Tejun Heo, FUJITA Tomonori

Hi Jens,

Today's linux-next merge of the block tree got a conflict in
include/linux/genhd.h between commit
abf5439370491dd6fbb4fe1a7939680d2a9bc9d4 ("block: move cmdfilter from
gendisk to request_queue") from Linus' tree (which also exists in the
block tree) and commit 53b83963cc042f14b9773a1cee5a831799f6fd1a ("block:
make partition array dynamic") from the block tree.

It looks as though the latter patch has readded some bits that were
moved to include/linux/blkdev.h by the former patch.  I fixed it up (see
below).
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc include/linux/genhd.h
index be4f5e5,206cdf9..0000000
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@@ -108,9 -115,27 +115,18 @@@ struct hd_struct 
  #define GENHD_FL_CD				8
  #define GENHD_FL_UP				16
  #define GENHD_FL_SUPPRESS_PARTITION_INFO	32
- #define GENHD_FL_FAIL				64
+ #define GENHD_FL_EXT_DEVT			64 /* allow extended devt */
+ 
 -#define BLK_SCSI_MAX_CMDS	(256)
 -#define BLK_SCSI_CMD_PER_LONG	(BLK_SCSI_MAX_CMDS / (sizeof(long) * 8))
 -
 -struct blk_scsi_cmd_filter {
 -	unsigned long read_ok[BLK_SCSI_CMD_PER_LONG];
 -	unsigned long write_ok[BLK_SCSI_CMD_PER_LONG];
 -	struct kobject kobj;
 -};
 -
+ struct disk_part_tbl {
+ 	struct rcu_head rcu_head;
+ 	int len;
+ 	struct hd_struct *part[];
+ };
  
  struct gendisk {
+ 	/* major, first_minor and minors are input parameters only,
+ 	 * don't use directly.  Use disk_devt() and disk_max_parts().
+ 	 */
  	int major;			/* major number of driver */
  	int first_minor;
  	int minors;                     /* maximum number of minors, =1 for

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

* linux-next: manual merge of the block tree
@ 2008-08-27  5:48 Stephen Rothwell
  0 siblings, 0 replies; 34+ messages in thread
From: Stephen Rothwell @ 2008-08-27  5:48 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, Tejun Heo, Bartlomiej Zolnierkiewicz

Hi Jens,

Today's linux-next merge of the block tree got a conflict in
drivers/ide/ide-disk.c between commits
be86ba965ac551f6a0e22ba0867b706a52c0c4e7 ("ide-disk: move /proc handling
to ide-disk_proc.c"), 71f28011298d2aee36ab3340572bb6b1fa9868a0
("ide-disk: move all ioctl handling to ide-disk_ioctl.c") and
2c01090494d8c4d3bc02c4a578005d44df55000c ("ide: add device flags") from
the ide tree and several commits from the block tree.

I fixed it up as best I could (see below) and will carry the fix.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc drivers/ide/ide-disk.c
index 8e9191f,e6776c4..0000000
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@@ -39,8 -41,20 +39,14 @@@
  #include <asm/io.h>
  #include <asm/div64.h>
  
 +#include "ide-disk.h"
 +
+ #if !defined(CONFIG_DEBUG_BLOCK_EXT_DEVT)
+ #define IDE_DISK_MINORS		(1 << PARTN_BITS)
+ #else
+ #define IDE_DISK_MINORS		0
+ #endif
+ 
 -struct ide_disk_obj {
 -	ide_drive_t	*drive;
 -	ide_driver_t	*driver;
 -	struct gendisk	*disk;
 -	struct kref	kref;
 -	unsigned int	openers;	/* protected by BKL for now */
 -};
 -
  static DEFINE_MUTEX(idedisk_ref_mutex);
  
  #define to_ide_disk(obj) container_of(obj, struct ide_disk_obj, kref)
@@@ -950,19 -1190,19 +955,20 @@@ static int ide_disk_probe(ide_drive_t *
  	drive->driver_data = idkp;
  
  	idedisk_setup(drive);
 -	if ((!drive->head || drive->head > 16) && !drive->select.b.lba) {
 +	if ((drive->dev_flags & IDE_DFLAG_LBA) == 0 &&
 +	    (drive->head == 0 || drive->head > 16)) {
  		printk(KERN_ERR "%s: INVALID GEOMETRY: %d PHYSICAL HEADS?\n",
  			drive->name, drive->head);
 -		drive->attach = 0;
 +		drive->dev_flags &= ~IDE_DFLAG_ATTACH;
  	} else
 -		drive->attach = 1;
 +		drive->dev_flags |= IDE_DFLAG_ATTACH;
  
- 	g->minors = 1 << PARTN_BITS;
+ 	g->minors = IDE_DISK_MINORS;
  	g->driverfs_dev = &drive->gendev;
+ 	g->flags |= GENHD_FL_EXT_DEVT;
 -	if (drive->removable)
 +	if (drive->dev_flags & IDE_DFLAG_REMOVABLE)
- 		g->flags = GENHD_FL_REMOVABLE;
+ 		g->flags |= GENHD_FL_REMOVABLE;
 -	set_capacity(g, idedisk_capacity(drive));
 +	set_capacity(g, ide_disk_capacity(drive));
  	g->fops = &idedisk_ops;
  	add_disk(g);
  	return 0;

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

* linux-next: manual merge of the block tree
@ 2008-08-27  5:47 Stephen Rothwell
  0 siblings, 0 replies; 34+ messages in thread
From: Stephen Rothwell @ 2008-08-27  5:47 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-next, Ananth N Mavinakayanahalli

Hi Jens,

Today's linux-next merge of the block tree got a conflict in
lib/Kconfig.debug between commits
0f6add4bafdbff7a822e37dec0436e2392864d9a ("Move lkdtm to tests/") and 94a97a3018e55a27d1c29e011b3c38fee01a967f ("Move backtrace selftests to
tests/") from the test tree and commit
3e5ba59bbab878f60b8b87004ac55a464bddc819 ("block: implement
CONFIG_DEBUG_BLOCK_EXT_DEVT") from the block tree.

Just overlapping add/removes.  I fixed it up (see below) and can carry
the fix.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc lib/Kconfig.debug
index f62c706,1bc3c07..0000000
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@@ -572,6 -624,38 +572,22 @@@ config RCU_CPU_STAL
  
  	  Say N if you are unsure.
  
+ config DEBUG_BLOCK_EXT_DEVT
+         bool "Force extended block device numbers and spread them"
+ 	depends on DEBUG_KERNEL
+ 	depends on BLOCK
+ 	default y
+ 	help
+ 	  Conventionally, block device numbers are allocated from
+ 	  predetermined contiguous area.  However, extended block area
+ 	  may introduce non-contiguous block device numbers.  This
+ 	  option forces most block device numbers to be allocated from
+ 	  the extended space and spreads them to discover kernel or
+ 	  userland code paths which assume predetermined contiguous
+ 	  device number allocation.
+ 
+ 	  Say N if you are unsure.
+ 
 -config LKDTM
 -	tristate "Linux Kernel Dump Test Tool Module"
 -	depends on DEBUG_KERNEL
 -	depends on KPROBES
 -	depends on BLOCK
 -	default n
 -	help
 -	This module enables testing of the different dumping mechanisms by
 -	inducing system failures at predefined crash points.
 -	If you don't need it: say N
 -	Choose M here to compile this code as a module. The module will be
 -	called lkdtm.
 -
 -	Documentation on how to use the module can be found in
 -	drivers/misc/lkdtm.c
 -
  config FAULT_INJECTION
  	bool "Fault-injection framework"
  	depends on DEBUG_KERNEL

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

* linux-next: manual merge of the block tree
@ 2008-06-27  6:09 Stephen Rothwell
  0 siblings, 0 replies; 34+ messages in thread
From: Stephen Rothwell @ 2008-06-27  6:09 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-next, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Glauber Costa

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

Hi Jens,

Today's linux-next merge of the block tree got a conflict in
arch/x86/kernel/smpboot.c between commit
b9bcb3696f0c121bb0bdbb5cbdde059ee6f95d51 ("x86: change __setup_vector_irq
with setup_vector_irq") from the x86 tree and commit
3b16cf874861436725c43ba0b68bdd799297be7c ("x86: convert to generic
helpers for IPI function calls") from the block tree.

It is merely contextual, and I can carry the fixup.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

end of thread, other threads:[~2013-10-25 15:03 UTC | newest]

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

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