Re: [PATCH] A possible deadlock with stacked devices (was: [PATCH v4 08/12] block: Introduce new bio_split())

2012-08-29 Thread Mikulas Patocka
On Wed, 15 Aug 2012, Kent Overstreet wrote: > > Both md and dm use __GFP_WAIT allocations from mempools in > > generic_make_request. > > > > I think you found an interesting bug here. Suppose that we have three > > stacked devices: d1 depends on d2 and d2 depends on d3. > > > > Now, a bio

Re: [PATCH] A possible deadlock with stacked devices (was: [PATCH v4 08/12] block: Introduce new bio_split())

2012-08-29 Thread Mikulas Patocka
On Wed, 15 Aug 2012, Kent Overstreet wrote: Both md and dm use __GFP_WAIT allocations from mempools in generic_make_request. I think you found an interesting bug here. Suppose that we have three stacked devices: d1 depends on d2 and d2 depends on d3. Now, a bio b1 comes to d1.

Re: [PATCH] A possible deadlock with stacked devices (was: [PATCH v4 08/12] block: Introduce new bio_split())

2012-08-15 Thread Kent Overstreet
> Both md and dm use __GFP_WAIT allocations from mempools in > generic_make_request. > > I think you found an interesting bug here. Suppose that we have three > stacked devices: d1 depends on d2 and d2 depends on d3. > > Now, a bio b1 comes to d1. d1 splits it to two bios: b2.1 and b2.2 and >

Re: [PATCH] A possible deadlock with stacked devices (was: [PATCH v4 08/12] block: Introduce new bio_split())

2012-08-15 Thread Kent Overstreet
Both md and dm use __GFP_WAIT allocations from mempools in generic_make_request. I think you found an interesting bug here. Suppose that we have three stacked devices: d1 depends on d2 and d2 depends on d3. Now, a bio b1 comes to d1. d1 splits it to two bios: b2.1 and b2.2 and sends

[PATCH] A possible deadlock with stacked devices (was: [PATCH v4 08/12] block: Introduce new bio_split())

2012-07-26 Thread Mikulas Patocka
On Wed, 25 Jul 2012, Kent Overstreet wrote: > On Wed, Jul 25, 2012 at 02:55:40PM +0300, Boaz Harrosh wrote: > > On 07/24/2012 11:11 PM, Kent Overstreet wrote: > > > > > The new bio_split() can split arbitrary bios - it's not restricted to > > > single page bios, like the old bio_split()

[PATCH] A possible deadlock with stacked devices (was: [PATCH v4 08/12] block: Introduce new bio_split())

2012-07-26 Thread Mikulas Patocka
On Wed, 25 Jul 2012, Kent Overstreet wrote: On Wed, Jul 25, 2012 at 02:55:40PM +0300, Boaz Harrosh wrote: On 07/24/2012 11:11 PM, Kent Overstreet wrote: The new bio_split() can split arbitrary bios - it's not restricted to single page bios, like the old bio_split() (previously

Re: [PATCH v4 08/12] block: Introduce new bio_split()

2012-07-25 Thread Kent Overstreet
On Wed, Jul 25, 2012 at 02:55:40PM +0300, Boaz Harrosh wrote: > On 07/24/2012 11:11 PM, Kent Overstreet wrote: > > > The new bio_split() can split arbitrary bios - it's not restricted to > > single page bios, like the old bio_split() (previously renamed to > > bio_pair_split()). It also has

Re: [PATCH v4 08/12] block: Introduce new bio_split()

2012-07-25 Thread Boaz Harrosh
On 07/24/2012 11:11 PM, Kent Overstreet wrote: > The new bio_split() can split arbitrary bios - it's not restricted to > single page bios, like the old bio_split() (previously renamed to > bio_pair_split()). It also has different semantics - it doesn't allocate > a struct bio_pair, leaving it up

Re: [PATCH v4 08/12] block: Introduce new bio_split()

2012-07-25 Thread Kent Overstreet
On Wed, Jul 25, 2012 at 02:55:40PM +0300, Boaz Harrosh wrote: On 07/24/2012 11:11 PM, Kent Overstreet wrote: The new bio_split() can split arbitrary bios - it's not restricted to single page bios, like the old bio_split() (previously renamed to bio_pair_split()). It also has different

Re: [PATCH v4 08/12] block: Introduce new bio_split()

2012-07-25 Thread Boaz Harrosh
On 07/24/2012 11:11 PM, Kent Overstreet wrote: The new bio_split() can split arbitrary bios - it's not restricted to single page bios, like the old bio_split() (previously renamed to bio_pair_split()). It also has different semantics - it doesn't allocate a struct bio_pair, leaving it up to

[PATCH v4 08/12] block: Introduce new bio_split()

2012-07-24 Thread Kent Overstreet
The new bio_split() can split arbitrary bios - it's not restricted to single page bios, like the old bio_split() (previously renamed to bio_pair_split()). It also has different semantics - it doesn't allocate a struct bio_pair, leaving it up to the caller to handle completions. Signed-off-by:

[PATCH v4 08/12] block: Introduce new bio_split()

2012-07-24 Thread Kent Overstreet
The new bio_split() can split arbitrary bios - it's not restricted to single page bios, like the old bio_split() (previously renamed to bio_pair_split()). It also has different semantics - it doesn't allocate a struct bio_pair, leaving it up to the caller to handle completions. Signed-off-by: