Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-30 Thread Dongsu Park
Hi Ming, On 29.05.2014 00:59, Ming Lei wrote: > On Wed, May 28, 2014 at 11:42 PM, Ming Lei wrote: > > Would you mind explaining why bi_iter.bi_size need to be > > decreased by 'len'? In the failure path, it wasn't added by > > 'len', was it? > > Actually, the correct thing may be like what did

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-30 Thread Dongsu Park
Hi Ming, On 29.05.2014 00:59, Ming Lei wrote: On Wed, May 28, 2014 at 11:42 PM, Ming Lei tom.leim...@gmail.com wrote: Would you mind explaining why bi_iter.bi_size need to be decreased by 'len'? In the failure path, it wasn't added by 'len', was it? Actually, the correct thing may be

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-29 Thread Ming Lei
On Thu, May 29, 2014 at 2:06 PM, Jet Chen wrote: > On 05/29/2014 01:44 AM, Ming Lei wrote: > This patch works, thanks. > > Tested-by: Jet Chen Jet, thanks for your test. On Thu, May 29, 2014 at 3:04 PM, Maurizio Lombardi wrote: > > Jens, can you review and merge it? I will prepare a formal

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-29 Thread Maurizio Lombardi
On Thu, May 29, 2014 at 02:06:18PM +0800, Jet Chen wrote: > This patch works, thanks. > > Tested-by: Jet Chen > > diff --git a/block/bio.c b/block/bio.c > index 0443694..f9bae56 100644 > --- a/block/bio.c > +++ b/block/bio.c > @@ -744,6 +744,7 @@ static int __bio_add_page(struct request_queue

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-29 Thread Jet Chen
On 05/29/2014 01:44 AM, Ming Lei wrote: On Thu, May 29, 2014 at 1:21 AM, Maurizio Lombardi wrote: Hi Ming, On Thu, May 29, 2014 at 12:59:19AM +0800, Ming Lei wrote: Actually, the correct thing may be like what did in the attached patch, as Maurizio discussed with me[1]. Very interestingly,

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-29 Thread Jet Chen
On 05/29/2014 01:44 AM, Ming Lei wrote: On Thu, May 29, 2014 at 1:21 AM, Maurizio Lombardi mlomb...@redhat.com wrote: Hi Ming, On Thu, May 29, 2014 at 12:59:19AM +0800, Ming Lei wrote: Actually, the correct thing may be like what did in the attached patch, as Maurizio discussed with me[1].

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-29 Thread Maurizio Lombardi
On Thu, May 29, 2014 at 02:06:18PM +0800, Jet Chen wrote: This patch works, thanks. Tested-by: Jet Chen jet.c...@intel.com diff --git a/block/bio.c b/block/bio.c index 0443694..f9bae56 100644 --- a/block/bio.c +++ b/block/bio.c @@ -744,6 +744,7 @@ static int __bio_add_page(struct

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-29 Thread Ming Lei
On Thu, May 29, 2014 at 2:06 PM, Jet Chen jet.c...@intel.com wrote: On 05/29/2014 01:44 AM, Ming Lei wrote: This patch works, thanks. Tested-by: Jet Chen jet.c...@intel.com Jet, thanks for your test. On Thu, May 29, 2014 at 3:04 PM, Maurizio Lombardi mlomb...@redhat.com wrote: Jens, can

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Jet Chen
On 05/29/2014 12:13 PM, Ming Lei wrote: On Thu, May 29, 2014 at 11:35 AM, Jet Chen wrote: On 05/29/2014 12:59 AM, Ming Lei wrote: On Wed, May 28, 2014 at 11:42 PM, Ming Lei wrote: Hi Dongsu, On Wed, May 28, 2014 at 11:09 PM, Dongsu Park wrote: From: Dongsu Park Commit

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Ming Lei
On Thu, May 29, 2014 at 11:35 AM, Jet Chen wrote: > On 05/29/2014 12:59 AM, Ming Lei wrote: >> On Wed, May 28, 2014 at 11:42 PM, Ming Lei wrote: >>> Hi Dongsu, >>> >>> On Wed, May 28, 2014 at 11:09 PM, Dongsu Park >>> wrote: From: Dongsu Park Commit

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Jet Chen
On 05/29/2014 12:59 AM, Ming Lei wrote: > On Wed, May 28, 2014 at 11:42 PM, Ming Lei wrote: >> Hi Dongsu, >> >> On Wed, May 28, 2014 at 11:09 PM, Dongsu Park >> wrote: >>> From: Dongsu Park >>> >>> Commit 3979ef4dcf3d1de55a560a3a4016c30a835df44d ("bio-modify- >>>

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Jet Chen
On 05/28/2014 11:09 PM, Dongsu Park wrote: > From: Dongsu Park > > Commit 3979ef4dcf3d1de55a560a3a4016c30a835df44d ("bio-modify- > __bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3") > introduced a regression as reported by Jet Chen. > That results in a kernel BUG at

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Ming Lei
On Thu, May 29, 2014 at 1:21 AM, Maurizio Lombardi wrote: > Hi Ming, > > On Thu, May 29, 2014 at 12:59:19AM +0800, Ming Lei wrote: >> >> Actually, the correct thing may be like what did in the >> attached patch, as Maurizio discussed with me[1]. >> >> Very interestingly, I have reproduced the

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Maurizio Lombardi
Hi Ming, On Thu, May 29, 2014 at 12:59:19AM +0800, Ming Lei wrote: > > Actually, the correct thing may be like what did in the > attached patch, as Maurizio discussed with me[1]. > > Very interestingly, I have reproduced the problem one time > with ext4/271 ext4/301 ext4/305, but won't with the

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Ming Lei
On Wed, May 28, 2014 at 11:42 PM, Ming Lei wrote: > Hi Dongsu, > > On Wed, May 28, 2014 at 11:09 PM, Dongsu Park > wrote: >> From: Dongsu Park >> >> Commit 3979ef4dcf3d1de55a560a3a4016c30a835df44d ("bio-modify- >> __bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3") >> introduced a

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Ming Lei
Hi Dongsu, On Wed, May 28, 2014 at 11:09 PM, Dongsu Park wrote: > From: Dongsu Park > > Commit 3979ef4dcf3d1de55a560a3a4016c30a835df44d ("bio-modify- > __bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3") > introduced a regression as reported by Jet Chen. > That results in a kernel

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Maurizio Lombardi
Hi, thanks for the patch On Wed, May 28, 2014 at 05:09:38PM +0200, Dongsu Park wrote: > From: Dongsu Park > > Commit 3979ef4dcf3d1de55a560a3a4016c30a835df44d ("bio-modify- > __bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3") > introduced a regression as reported by Jet Chen. >

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Jet Chen
On 05/28/2014 11:09 PM, Dongsu Park wrote: From: Dongsu Park dongsu.p...@profitbricks.com Commit 3979ef4dcf3d1de55a560a3a4016c30a835df44d (bio-modify- __bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3) introduced a regression as reported by Jet Chen. That results in a kernel

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Jet Chen
On 05/29/2014 12:59 AM, Ming Lei wrote: On Wed, May 28, 2014 at 11:42 PM, Ming Lei tom.leim...@gmail.com wrote: Hi Dongsu, On Wed, May 28, 2014 at 11:09 PM, Dongsu Park dongsu.p...@profitbricks.com wrote: From: Dongsu Park dongsu.p...@profitbricks.com Commit

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Ming Lei
On Thu, May 29, 2014 at 11:35 AM, Jet Chen jet.c...@intel.com wrote: On 05/29/2014 12:59 AM, Ming Lei wrote: On Wed, May 28, 2014 at 11:42 PM, Ming Lei tom.leim...@gmail.com wrote: Hi Dongsu, On Wed, May 28, 2014 at 11:09 PM, Dongsu Park dongsu.p...@profitbricks.com wrote: From: Dongsu Park

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Jet Chen
On 05/29/2014 12:13 PM, Ming Lei wrote: On Thu, May 29, 2014 at 11:35 AM, Jet Chen jet.c...@intel.com wrote: On 05/29/2014 12:59 AM, Ming Lei wrote: On Wed, May 28, 2014 at 11:42 PM, Ming Lei tom.leim...@gmail.com wrote: Hi Dongsu, On Wed, May 28, 2014 at 11:09 PM, Dongsu Park

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Maurizio Lombardi
Hi, thanks for the patch On Wed, May 28, 2014 at 05:09:38PM +0200, Dongsu Park wrote: From: Dongsu Park dongsu.p...@profitbricks.com Commit 3979ef4dcf3d1de55a560a3a4016c30a835df44d (bio-modify- __bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3) introduced a regression as

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Ming Lei
Hi Dongsu, On Wed, May 28, 2014 at 11:09 PM, Dongsu Park dongsu.p...@profitbricks.com wrote: From: Dongsu Park dongsu.p...@profitbricks.com Commit 3979ef4dcf3d1de55a560a3a4016c30a835df44d (bio-modify- __bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3) introduced a regression as

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Ming Lei
On Wed, May 28, 2014 at 11:42 PM, Ming Lei tom.leim...@gmail.com wrote: Hi Dongsu, On Wed, May 28, 2014 at 11:09 PM, Dongsu Park dongsu.p...@profitbricks.com wrote: From: Dongsu Park dongsu.p...@profitbricks.com Commit 3979ef4dcf3d1de55a560a3a4016c30a835df44d (bio-modify-

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Maurizio Lombardi
Hi Ming, On Thu, May 29, 2014 at 12:59:19AM +0800, Ming Lei wrote: Actually, the correct thing may be like what did in the attached patch, as Maurizio discussed with me[1]. Very interestingly, I have reproduced the problem one time with ext4/271 ext4/301 ext4/305, but won't with the

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Ming Lei
On Thu, May 29, 2014 at 1:21 AM, Maurizio Lombardi mlomb...@redhat.com wrote: Hi Ming, On Thu, May 29, 2014 at 12:59:19AM +0800, Ming Lei wrote: Actually, the correct thing may be like what did in the attached patch, as Maurizio discussed with me[1]. Very interestingly, I have reproduced