Re: [Ocfs2-devel] [PATCH] ocfs2: submit another bio if current bio is full

2018-05-14 Thread Changwei Ge
Hi Jun, IMO, o2hb_issue_node_write() just needs _one_ vec so there is no problem in it. Calculating bio number might be get related code more complicated which I think is not necessary. It doesn't solve any existed problem or improve performance or clean code. :( Thanks, Changwei On

Re: [Ocfs2-devel] [PATCH] ocfs2: submit another bio if current bio is full

2018-05-14 Thread piaojun
Hi Changwei, I got your point, we should let the caller retry if bio is not enough, right? But some caller like o2hb_issue_node_write() won't retry once error happens, though the bio will always be enough. I think if we could calculate the number of bio we need before calling bio_add_page()?

Re: [Ocfs2-devel] [PATCH] ocfs2: submit another bio if current bio is full

2018-05-13 Thread Changwei Ge
Hi Jun, Right now, I am afraid that the easiest and fasted way to fix this issue is to revert your patch. From comments before function bio_add_page(), we can see that it only fails if either ::bi_vcnt == ::bi_max_vecs or it's a cloned bio. So we can judge if bio is full from its return

Re: [Ocfs2-devel] [PATCH] ocfs2: submit another bio if current bio is full

2018-05-09 Thread Changwei Ge
On 2018/5/10 8:24, piaojun wrote: > > On 2018/5/9 20:01, Changwei Ge wrote: >> Hi Jun, >> >> >> On 2018/5/9 18:08, piaojun wrote: >>> Hi Changwei, >>> >>> On 2018/4/13 13:51, Changwei Ge wrote: If cluster scale exceeds 16 nodes, bio will be full and bio_add_page() returns 0 when adding

Re: [Ocfs2-devel] [PATCH] ocfs2: submit another bio if current bio is full

2018-05-09 Thread piaojun
On 2018/5/9 20:01, Changwei Ge wrote: > Hi Jun, > > > On 2018/5/9 18:08, piaojun wrote: >> Hi Changwei, >> >> On 2018/4/13 13:51, Changwei Ge wrote: >>> If cluster scale exceeds 16 nodes, bio will be full and bio_add_page() >>> returns 0 when adding pages to bio. Returning -EIO to

Re: [Ocfs2-devel] [PATCH] ocfs2: submit another bio if current bio is full

2018-05-09 Thread Changwei Ge
Hi Jun, On 2018/5/9 18:08, piaojun wrote: > Hi Changwei, > > On 2018/4/13 13:51, Changwei Ge wrote: >> If cluster scale exceeds 16 nodes, bio will be full and bio_add_page() >> returns 0 when adding pages to bio. Returning -EIO to o2hb_read_slots() >> from o2hb_setup_one_bio() will lead to

Re: [Ocfs2-devel] [PATCH] ocfs2: submit another bio if current bio is full

2018-05-09 Thread piaojun
Hi Changwei, On 2018/4/13 13:51, Changwei Ge wrote: > If cluster scale exceeds 16 nodes, bio will be full and bio_add_page() > returns 0 when adding pages to bio. Returning -EIO to o2hb_read_slots() > from o2hb_setup_one_bio() will lead to losing chance to allocate more > bios to present all

Re: [Ocfs2-devel] [PATCH] ocfs2: submit another bio if current bio is full

2018-05-09 Thread Changwei Ge
Hi Jun, On 2018/5/9 17:13, piaojun wrote: > Hi Changwei, > > I understand your fix already, but I'm still confused by the comments > "If cluster scale exceeds 16 nodes, ...". > Do you mean that this problem will happen if nodes' count exceeds 16. True. Or we can say that if slot number exceeds

Re: [Ocfs2-devel] [PATCH] ocfs2: submit another bio if current bio is full

2018-05-09 Thread piaojun
Hi Changwei, I understand your fix already, but I'm still confused by the comments "If cluster scale exceeds 16 nodes, ...". Do you mean that this problem will happen if nodes' count exceeds 16. thanks, Jun On 2018/5/9 17:06, Changwei Ge wrote: > Hi Jun, > > > On 2018/5/9 16:50, piaojun

Re: [Ocfs2-devel] [PATCH] ocfs2: submit another bio if current bio is full

2018-05-09 Thread Changwei Ge
Hi Jun, On 2018/5/9 16:50, piaojun wrote: > Hi Changwei, > > On 2018/5/8 23:57, Changwei Ge wrote: >> Hi Jun, >> >> Sorry for this so late reply since I was very busy those days. >> >> >> On 04/16/2018 11:44 AM, piaojun wrote: >>> Hi Changwei, >>> >>> Do you mean that if the slotnum exceed 16

Re: [Ocfs2-devel] [PATCH] ocfs2: submit another bio if current bio is full

2018-05-09 Thread piaojun
Hi Changwei, On 2018/5/8 23:57, Changwei Ge wrote: > Hi Jun, > > Sorry for this so late reply since I was very busy those days. > > > On 04/16/2018 11:44 AM, piaojun wrote: >> Hi Changwei, >> >> Do you mean that if the slotnum exceed 16 like 'mkfs.ocfs2 -N 17', you >> still let it go rather

Re: [Ocfs2-devel] [PATCH] ocfs2: submit another bio if current bio is full

2018-05-08 Thread Changwei Ge
Hi Jun, Sorry for this so late reply since I was very busy those days. On 04/16/2018 11:44 AM, piaojun wrote: > Hi Changwei, > > Do you mean that if the slotnum exceed 16 like 'mkfs.ocfs2 -N 17', you > still let it go rather than reture error? If your assumption is right, do you mean that

Re: [Ocfs2-devel] [PATCH] ocfs2: submit another bio if current bio is full

2018-04-15 Thread piaojun
Hi Changwei, Do you mean that if the slotnum exceed 16 like 'mkfs.ocfs2 -N 17', you still let it go rather than reture error? thanks, Jun On 2018/4/13 13:51, Changwei Ge wrote: > If cluster scale exceeds 16 nodes, bio will be full and bio_add_page() > returns 0 when adding pages to bio.