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

2018-05-14 Thread Changwei Ge
ber of bio we need before calling bio_add_page()? > > Thanks > Jun > > On 2018/5/14 11:21, Changwei Ge wrote: >> Hi Jun, >> >> Right now, I am afraid that the easiest and fasted way to fix this issue >> is to revert your patch. >> >> From comm

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

2018-05-13 Thread Changwei Ge
value is zero or not. Thanks, Changwei On 2018/5/10 9:13, Changwei Ge wrote: > > > 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: >>

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

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 o2h

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

2018-05-09 Thread Changwei Ge
at if slot number exceeds 16. Thanks, Changwei > > thanks, > Jun > > On 2018/5/9 17:06, Changwei Ge wrote: >> Hi Jun, >> >> >> On 2018/5/9 16:50, piaojun wrote: >>> Hi Changwei, >>> >>> On 2018/5/8 23:57, Changwei Ge

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 Chang

Re: [Ocfs2-devel] 答复: [PATCH] ocfs2: Correct the offset comments of the structure ocfs2_dir_block_trailer.

2018-05-08 Thread Changwei Ge
Hi Zhonghua and Jospeh, I'm afraid that it can't be easy to find the offest 0x20 since ::db_signature only occupy 8 bytes. Thanks, Changwei On 2018/5/9 10:50, Guozhonghua wrote: > Good Idea, I will send patch v2 for review. > > Thanks. > > Guozhonghua. > > -邮件原件- > 发件人: Joseph Qi

Re: [Ocfs2-devel] [PATCH] ocfs2: don't use iocb when EIOCBQUEUED returns

2018-05-08 Thread Changwei Ge
figured out why iocb > was freed. Though you fix won't bring any side effect, it looks like a > workaround. > That means, the freed iocb may still have risk in other place. > > Thanks, > Joseph > > On 18/5/8 23:23, Changwei Ge wrote: >> Hi Gang, >> >> I don

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

2018-05-08 Thread Changwei Ge
ks, Changwei > > 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. Returning -EIO to o2hb_read_slots() >> from o2hb_setup_one_bio() will l

Re: [Ocfs2-devel] [PATCH] ocfs2: don't use iocb when EIOCBQUEUED returns

2018-05-08 Thread Changwei Ge
like a code bug, and 'iocb' should not be freed at this place. >>> Could this BUG reproduced easily? >> Actually, it's not easy to be reproduced since IO is much slower than CPU >> executing instructions. But the logic here is broken, we'd better fix this. >> >> Thanks

Re: [Ocfs2-devel] [PATCH] ocfs2: don't put and assign null to bh allocated outside

2018-05-08 Thread Changwei Ge
Friendly ping after one month's silence for this patch. Andrew had picked this patch into -mm tree. Can anyone help review my patch or give some comments.:-) Thanks, Changwei On 04/10/2018 07:35 PM, Changwei Ge wrote: > ocfs2_read_blocks() and ocfs2_read_blocks_sync() are both used to r

Re: [Ocfs2-devel] [PATCH] fix a compiling warning

2018-05-08 Thread Changwei Ge
Hi Larry, It would be better for you to paste the compilation warning and gcc version. So we can justify if it is deserved to be fixed. Thanks, Changwei On 2018/5/7 11:06 AM, Larry Chen wrote: > Hi Jun > > Yeah,I know your logic is right. > It's just a compile warning that made me feel

Re: [Ocfs2-devel] [PATCH] ocfs2: Correct the offset comments of the structure ocfs2_dir_block_trailer.

2018-05-08 Thread Changwei Ge
It looks good to me. On 2018/5/8 5:46 PM, Guozhonghua wrote: > Correct the offset comments of the structure ocfs2_dir_block_trailer. Reviewed-by: Changwei Ge <ge.chang...@h3c.com> > > Signed-off-by: guozhonghua <guozhong...@h3c.com> > --- > fs/ocfs2/ocfs2_fs.h |4

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

2018-04-12 Thread Changwei Ge
ERROR: status = -5 Fixes: ba16ddfbeb9d ("ocfs2/o2hb: check len for bio_add_page() to avoid getting incorrect bio" Signed-off-by: Changwei Ge <ge.chang...@h3c.com> --- fs/ocfs2/cluster/heartbeat.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/ocfs2/clu

Re: [Ocfs2-devel] OCFS2 BUG with 2 different kernels

2018-04-12 Thread Changwei Ge
Hi Daniel, It's not easy to analyze your problem unless you can provide *ocfs2_lock_res* *dlm_lock_resource* *dlm_ctxt* through _crash tool_ Thanks, Changwei On 2018/4/11 17:46, Daniel Sobe wrote: > Hi, > > having used OCFS2 successfully for a while using Debian 8 with its default > kernel

Re: [Ocfs2-devel] [PATCH] ocfs2: don't put and assign null to bh allocated outside

2018-04-10 Thread Changwei Ge
Hi Jun, On 2018/4/11 9:43, piaojun wrote: > Hi Changwei, > > On 2018/4/11 9:14, Changwei Ge wrote: >> Hi Jun, >> >> Thanks for your review. >> >> On 2018/4/11 8:40, piaojun wrote: >>> Hi Changwei, >>> >>> On 2018/4/10 19:35, Chan

Re: [Ocfs2-devel] [PATCH] ocfs2/o2hb: check len for bio_add_page() to avoid submitting incorrect bio

2018-04-10 Thread Changwei Ge
Hi Jun, Thanks for your patch. I just applied your patch into my tree and triggered ocfs2-test. Unfortunately, the very first case fails in making fs since bio can't accommodate more than 16 vecs. Of course this is not introduced by your patch. You patch just makes this hidden issue visible.

Re: [Ocfs2-devel] [PATCH] ocfs2: don't use iocb when EIOCBQUEUED returns

2018-04-10 Thread Changwei Ge
write_iter() and read_iter(). I don't see any risk accessing freed iocb yet. The root cause is clear for this issue. iocb is freed by aio_complete(). You can refer to path: dio_complete aio_complete kiocb_free Thanks, Changwei > > thanks, > Jun > > On 2018/4/11 9:07, C

Re: [Ocfs2-devel] [PATCH] ocfs2: don't put and assign null to bh allocated outside

2018-04-10 Thread Changwei Ge
Hi Jun, Thanks for your review. On 2018/4/11 8:40, piaojun wrote: > Hi Changwei, > > On 2018/4/10 19:35, Changwei Ge wrote: >> ocfs2_read_blocks() and ocfs2_read_blocks_sync() are both used to read >> several blocks from disk. Currently, the input argument

Re: [Ocfs2-devel] [PATCH] ocfs2: don't use iocb when EIOCBQUEUED returns

2018-04-10 Thread Changwei Ge
e logic here is broken, we'd better fix this. Thanks, Changwei > > thanks, > Jun > > On 2018/4/10 20:00, Changwei Ge wrote: >> When -EIOCBQUEUED returns, it means that aio_complete() will be called >> from dio_complete(), which is an asynchronous progress against write_iter. &

Re: [Ocfs2-devel] [PATCH] ocfs2/dlm: clean up unused stack variable in dlm_do_local_ast()

2018-04-10 Thread Changwei Ge
Hi Jun, On 2018/4/11 8:43, piaojun wrote: > Hi Changwei, > > This patch had been merged into mainline already. > > Please see patch a43d24cb3b0b. Oops, I forgot to rebase my tree... :( Thanks for your reminder. Changwei > > thanks, > Jun > > On 2018

[Ocfs2-devel] [PATCH] ocfs2: don't use iocb when EIOCBQUEUED returns

2018-04-10 Thread Changwei Ge
[ocfs2] ? ocfs2_check_range_for_refcount+0x150/0x150 [ocfs2] aio_run_iocb+0x229/0x2f0 ? try_to_wake_up+0x380/0x380 do_io_submit+0x291/0x540 ? syscall_trace_leave+0xad/0x130 SyS_io_submit+0x10/0x20 system_call_fastpath+0x16/0x75 Signed-off-by: Changwei Ge <ge.chang...@h3c.com> --- fs/ocfs2/file.c | 4 ++-- 1

[Ocfs2-devel] [PATCH] ocfs2/dlm: clean up unused stack variable in dlm_do_local_ast()

2018-04-10 Thread Changwei Ge
Signed-off-by: Changwei Ge <ge.chang...@h3c.com> --- fs/ocfs2/dlm/dlmast.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/ocfs2/dlm/dlmast.c b/fs/ocfs2/dlm/dlmast.c index fd6..39831fc 100644 --- a/fs/ocfs2/dlm/dlmast.c +++ b/fs/ocfs2/dlm/dlmast.c @@ -224,14 +224,12 @

[Ocfs2-devel] [PATCH] ocfs2: don't put and assign null to bh allocated outside

2018-04-10 Thread Changwei Ge
, thus crash. Also, we should put bhs which have succeeded in reading before current read failure. Signed-off-by: Changwei Ge <ge.chang...@h3c.com> --- fs/ocfs2/buffer_head_io.c | 77 --- 1 file changed, 59 insertions(+), 18 deletions(-) diff --gi

[Ocfs2-devel] [PATCH] ocfs2/dlm: clean up unused variable in dlm_process_recovery_data

2018-04-02 Thread Changwei Ge
Signed-off-by: Changwei Ge <ge.chang...@h3c.com> --- fs/ocfs2/dlm/dlmrecovery.c | 4 1 file changed, 4 deletions(-) diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index ec8f758..be6b067 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c @@ -

Re: [Ocfs2-devel] [PATCH] ocfs2/dlm: wait for dlm recovery done when migrating all lock resources

2018-04-02 Thread Changwei Ge
On 2018/4/2 12:32, piaojun wrote: > Hi Changwei, > > On 2018/4/2 10:59, Changwei Ge wrote: >> Hi Jun, >> >> It seems that you have ever posted this patch, If I remember correctly. >> My concern is still if you disable dlm recovery via ::migrate_done. Then flag

Re: [Ocfs2-devel] [PATCH] ocfs2/dlm: wait for dlm recovery done when migrating all lock resources

2018-04-01 Thread Changwei Ge
Hi Jun, It seems that you have ever posted this patch, If I remember correctly. My concern is still if you disable dlm recovery via ::migrate_done. Then flag DLM_LOCK_RES_RECOVERING can't be cleared. So we can't purge the problematic lock resource since __dlm_lockres_unused() needs to check

Re: [Ocfs2-devel] [PATCH] ocfs2: don't evaluate buffer head to NULL managed by caller

2018-03-30 Thread Changwei Ge
On 2018/3/30 10:38, Joseph Qi wrote: > > > On 18/3/30 10:17, Changwei Ge wrote: >>>>> Since we assume caller has to pass either all NULL or all non-NULL, >>>>> here we will only put bh internal allocated. Am I missing something? >>>> Th

Re: [Ocfs2-devel] [PATCH] ocfs2: don't evaluate buffer head to NULL managed by caller

2018-03-29 Thread Changwei Ge
Hi Joseph, On 2018/3/30 10:04, Joseph Qi wrote: > > > On 18/3/30 09:31, Changwei Ge wrote: >> Hi Joseph, >> >> On 2018/3/30 9:27, Joseph Qi wrote: >>> >>> >>> On 18/3/29 10:06, Changwei Ge wrote: >>>> ocfs2_read_blocks() i

Re: [Ocfs2-devel] [PATCH] ocfs2: don't evaluate buffer head to NULL managed by caller

2018-03-29 Thread Changwei Ge
Hi Joseph, On 2018/3/30 9:27, Joseph Qi wrote: > > > On 18/3/29 10:06, Changwei Ge wrote: >> ocfs2_read_blocks() is used to read several blocks from disk. >> Currently, the input argument *bhs* can be NULL or NOT. It depends on >> the caller's behavior. If the funct

Re: [Ocfs2-devel] [PATCH] ocfs2: don't evaluate buffer head to NULL managed by caller

2018-03-29 Thread Changwei Ge
Hi Andrew, On 2018/3/30 5:45, Andrew Morton wrote: > On Thu, 29 Mar 2018 10:06:02 +0800 Changwei Ge <ge.chang...@h3c.com> wrote: > >> ocfs2_read_blocks() is used to read several blocks from disk. >> Currently, the input argument *bhs* can be NULL or NOT. It depends on

Re: [Ocfs2-devel] [PATCH] ocfs2: don't evaluate buffer head to NULL managed by caller

2018-03-29 Thread Changwei Ge
Hi Larry, On 2018/3/29 18:33, Larry Chen wrote: > Hi Changwei, > > On 03/29/2018 05:50 PM, piaojun wrote: >> Hi Changwei, >> >> On 2018/3/29 10:06, Changwei Ge wrote: >>> ocfs2_read_blocks() is used to read several blocks from disk. >>> Cu

Re: [Ocfs2-devel] [PATCH] ocfs2: don't evaluate buffer head to NULL managed by caller

2018-03-29 Thread Changwei Ge
Hi Jun, On 2018/3/29 17:51, piaojun wrote: > Hi Changwei, > > On 2018/3/29 10:06, Changwei Ge wrote: >> ocfs2_read_blocks() is used to read several blocks from disk. >> Currently, the input argument *bhs* can be NULL or NOT. It depends on >> the caller's beha

Re: [Ocfs2-devel] [PATCH] ocfs2: don't evaluate buffer head to NULL managed by caller

2018-03-29 Thread Changwei Ge
k. >>>> Currently, the input argument *bhs* can be NULL or NOT. It depends on >>>> the caller's behavior. If the function fails in reading blocks from >>>> disk, the corresponding bh will be assigned to NULL and put. >>>> >>>> Obviously, above

Re: [Ocfs2-devel] [PATCH] ocfs2: don't evaluate buffer head to NULL managed by caller

2018-03-28 Thread Changwei Ge
bh will be assigned to NULL and put. >> >> Obviously, above process for non-NULL input bh is not appropriate. >> Because the caller doesn't even know its bhs are put and re-assigned. >> >> If buffer head is managed by caller, ocfs2_read_blocks should not >> ev

[Ocfs2-devel] [PATCH] ocfs2: don't evaluate buffer head to NULL managed by caller

2018-03-28 Thread Changwei Ge
-NULL input bh is not appropriate. Because the caller doesn't even know its bhs are put and re-assigned. If buffer head is managed by caller, ocfs2_read_blocks should not evaluate it to NULL. It will cause caller accessing illegal memory, thus crash. Signed-off-by: Changwei Ge <ge.chang...@h3c.

Re: [Ocfs2-devel] [PATCH] ocfs2/o2hb: check len for bio_add_page() to avoid submitting incorrect bio

2018-03-28 Thread Changwei Ge
noticed that several other callers just use ENOMEM, so I think >>> EINVAL or ENOMEM may be better. >> >> __bio_add_page has been deleted in patch c66a14d07c13, and I notice that >> other callers always use -EFAULT or -EIO. I'm afraid we are not basing on >> the sam

[Ocfs2-devel] [PATCH] ocfs2: correct spelling mistake for migratable for all

2018-03-20 Thread Changwei Ge
Inspired from patch ocfs2-fix-spelling-mistake-migrateable-migratable.patch, I checked all ocfs2 files and found more spelling mistakes. So correct them all. Signed-off-by: Changwei Ge <ge.chang...@h3c.com> --- fs/ocfs2/dlm/dlmmaster.c | 10 +- 1 file changed, 5 insertions

[Ocfs2-devel] [PATCH 1/2] ocfs2/dlm: clean up unused argument for dlm_destroy_recovery_area()

2018-03-15 Thread Changwei Ge
Signed-off-by: Changwei Ge <ge.chang...@h3c.com> --- fs/ocfs2/dlm/dlmrecovery.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index ec8f758..b36808c 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocf

[Ocfs2-devel] [PATCH 2/2] ocfs2/dlm: clean up unused stack variable in dlm_do_local_ast()

2018-03-15 Thread Changwei Ge
Signed-off-by: Changwei Ge <ge.chang...@h3c.com> --- fs/ocfs2/dlm/dlmast.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/ocfs2/dlm/dlmast.c b/fs/ocfs2/dlm/dlmast.c index fd6..39831fc 100644 --- a/fs/ocfs2/dlm/dlmast.c +++ b/fs/ocfs2/dlm/dlmast.c @@ -224,14 +224,12 @

Re: [Ocfs2-devel] [PATCH v3] ocfs2/dlm: don't handle migrate lockres if already in shutdown

2018-03-05 Thread Changwei Ge
Looks good to me. Reviewed-by: Changwei Ge <ge.chang...@h3c.com> On 2018/3/5 11:45, piaojun wrote: > We should not handle migrate lockres if we are already in > 'DLM_CTXT_IN_SHUTDOWN', as that will cause lockres remains after leaving > dlm domain. At last other nodes will get stuc

Re: [Ocfs2-devel] [PATCH] Correct a comment error

2018-03-01 Thread Changwei Ge
Hi Jun, On 2018/3/2 10:16, piaojun wrote: > Hi Changwei, > > On 2018/3/2 9:59, Changwei Ge wrote: >> Hi Jun, >> I think the comments for both two functions are OK. >> No need to rework them. >> As we know, ocfs2 lock name(lock id) are composed of several par

Re: [Ocfs2-devel] [PATCH] Correct a comment error

2018-03-01 Thread Changwei Ge
Hi Jun, I think the comments for both two functions are OK. No need to rework them. As we know, ocfs2 lock name(lock id) are composed of several parts including block number. Thanks, Changw2ei On 2018/3/1 20:58, piaojun wrote: > Hi Larry, > > There is the same mistake in

Re: [Ocfs2-devel] 答复: Re: [PATCH] Correct a comment error

2018-03-01 Thread Changwei Ge
number for > comparision. And it's really misleading for new beginners ,e, like me. It's OK. Any behavior to fix, improve ocfs2 is encouraged. -Changwei > > :) > > Thanks, > Larry > > > > >>>> Changwei Ge <ge.chang...@h3c.com> 20

Re: [Ocfs2-devel] [PATCH 0/6] ocfs2: Fix various quota recovery

2018-02-28 Thread Changwei Ge
Hi Jan, On 2018/2/28 19:18, Jan Kara wrote: > Hello, > > this patch series fixes various issues I've found with ocfs2 quota recovery. > There were possible quota recovery failures or deadlocks when it raced with > umount in a wrong way. Also quota recovery would fail if the filesystem was >

Re: [Ocfs2-devel] [PATCH] Correct a comment error

2018-02-28 Thread Changwei Ge
Hi Larry, On 2018/2/28 18:18, Larry Chen wrote: > The function ocfs2_double_lock tries to lock the inode with lower > blockid first, not lockid. As ocfs2's lock name includes block number, so I think the comment you want to rework is all right. So nack. Thanks, Changwei > > Signed-off-by:

Re: [Ocfs2-devel] [PATCH] ocfs2: clean up two unused functions in suballoc.c

2018-02-25 Thread Changwei Ge
e, I'd like to give up this patch. Thanks, Changwei > > > Thanks > Gang > > >>>> >> The two functions are no longer used. >> >> Signed-off-by: Changwei Ge <ge.chang...@h3c.com> >> --- >> fs/ocfs2/suballoc.c | 49 -

[Ocfs2-devel] [PATCH] ocfs2: clean up two unused functions in suballoc.c

2018-02-25 Thread Changwei Ge
The two functions are no longer used. Signed-off-by: Changwei Ge <ge.chang...@h3c.com> --- fs/ocfs2/suballoc.c | 49 - 1 file changed, 49 deletions(-) diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c index 9f0b95a..328be8b 100644 --

Re: [Ocfs2-devel] [PATCH] ocfs2/dlm: clean unrelated comment

2018-02-23 Thread Changwei Ge
Hi Jun, On 2018/2/23 17:13, piaojun wrote: > Hi changwei, > > On 2018/2/23 15:30, ge.chang...@h3c.com wrote: >> From: Changwei Ge <ge.chang...@h3c.com> > This line seems unnecessary, others looks good to me. I used git send-email, thus this line was added by parameter --f

Re: [Ocfs2-devel] [PATCH] ocfs2: clean up some unused function declaration

2018-02-08 Thread Changwei Ge
It looks good to me. Reviewed-by: Changwei Ge <ge.chang...@h3c.com> On 2018/2/9 11:09, piaojun wrote: > Clean up some unused function declaration in dlmcommon.h > > Signed-off-by: Jun Piao <piao...@huawei.com> > Reviewed-by: Yiwen Jiang <jiangyi...@huawei.com> >

Re: [Ocfs2-devel] [PATCH v3] ocfs2: return error when we attempt to access a dirty bh in jbd2

2018-01-28 Thread Changwei Ge
It looks good to me. Reviewed-by: Changwei Ge <ge.chang...@h3c.com> On 2018/1/29 10:02, piaojun wrote: > We should not reuse the dirty bh in jbd2 directly due to the following > situation: > > 1. When removing extent rec, we will dirty the bhs of extent rec and > tru

Re: [Ocfs2-devel] [PATCH v2] ocfs2: return error when we attempt to access a dirty bh in jbd2

2018-01-27 Thread Changwei Ge
Hi Jun, On 2018/1/27 16:28, piaojun wrote: > We should not reuse the dirty bh in jbd2 directly due to the following > situation: > > 1. When removing extent rec, we will dirty the bhs of extent rec and > truncate log at the same time, and hand them over to jbd2. > 2. The bhs are submitted to

Re: [Ocfs2-devel] [PATCH] ocfs2: return error when we attempt to access a dirty bh in jbd2

2018-01-26 Thread Changwei Ge
ocfs2. > > I suggest ocfs2 should handle this problem. > > thanks, > Jun > > On 2018/1/26 10:03, Changwei Ge wrote: >> On 2018/1/26 9:45, piaojun wrote: >>> Hi Changwei, >>> >>> On 2018/1/26 9:00, Changwei Ge wrote: >>>> Hi Jun, >>>&g

Re: [Ocfs2-devel] [PATCH] ocfs2: return error when we attempt to access a dirty bh in jbd2

2018-01-25 Thread Changwei Ge
On 2018/1/26 9:45, piaojun wrote: > Hi Changwei, > > On 2018/1/26 9:00, Changwei Ge wrote: >> Hi Jun, >> Good morning:-) >> >> On 2018/1/25 20:45, piaojun wrote: >>> Hi Changwei, >>> >>> On 2018/1/25 20:30, Changwei Ge wrote: >&g

Re: [Ocfs2-devel] [PATCH] ocfs2: return error when we attempt to access a dirty bh in jbd2

2018-01-25 Thread Changwei Ge
Hi Jun, Good morning:-) On 2018/1/25 20:45, piaojun wrote: > Hi Changwei, > > On 2018/1/25 20:30, Changwei Ge wrote: >> Hi Jun, >> >> On 2018/1/25 20:18, piaojun wrote: >>> Hi Changwei, >>> >>> On 2018/1/25 19:59, Changwei Ge wrote: &g

Re: [Ocfs2-devel] [PATCH] ocfs2: return error when we attempt to access a dirty bh in jbd2

2018-01-25 Thread Changwei Ge
Hi Jun, On 2018/1/25 10:41, piaojun wrote: > We should not reuse the dirty bh in jbd2 directly due to the following > situation: > > 1. When removing extent rec, we will dirty the bhs of extent rec and Quick questions: Do you mean current code puts modifying extent records belonging to a certain

Re: [Ocfs2-devel] [PATCH] ocfs2: return error when we attempt to access a dirty bh in jbd2

2018-01-25 Thread Changwei Ge
Hi Jun, On 2018/1/25 20:18, piaojun wrote: > Hi Changwei, > > On 2018/1/25 19:59, Changwei Ge wrote: >> Hi Jun, >> >> On 2018/1/25 10:41, piaojun wrote: >>> We should not reuse the dirty bh in jbd2 directly due to the following >>> situation: >&

[Ocfs2-devel] [PATCH] ocfs2: unlock bh_state if bg check fails

2018-01-24 Thread Changwei Ge
We should unlock bh_stat if bg->bg_free_bits_count > bg->bg_bits Suggested-by: Jan Kara <j...@suse.cz> Signed-off-by: Changwei Ge <ge.chang...@h3c.com> --- fs/ocfs2/suballoc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c i

Re: [Ocfs2-devel] OCFS2 encountered a hang issue when running on Multi-nodes RefcountBlock Group Test

2018-01-23 Thread Changwei Ge
Hi Gang, Never met such a lockup issue so far with o2cb stack applied. And I don't know how to debug this with fs/dlm. What I suspect currently is that this lock resource was once QUEUED but fail to re-QUEUED since BLOCKED has been marked. Thanks, Changwei On 2018/1/24 14:30, Gang He wrote: >

Re: [Ocfs2-devel] [Ocfs2-dev] BUG: deadlock with umount and ocfs2 workqueue triggered by ocfs2rec thread

2018-01-18 Thread Changwei Ge
Hi Jun, On 2018/1/19 11:59, piaojun wrote: > Hi Changwei, > > On 2018/1/19 11:38, Changwei Ge wrote: >> Hi Jun, >> >> On 2018/1/19 11:17, piaojun wrote: >>> Hi Jan, Eric and Changwei, >>> >>> Could we use another mutex lock to protect quota

Re: [Ocfs2-devel] [Ocfs2-dev] BUG: deadlock with umount and ocfs2 workqueue triggered by ocfs2rec thread

2018-01-18 Thread Changwei Ge
t to get rid of race that quota has freed structs that will be used by quota recovery in ocfs2. > > On 2018/1/19 9:48, Changwei Ge wrote: >> Hi Jan, >> >> On 2018/1/18 0:03, Jan Kara wrote: >>> On Wed 17-01-18 16:21:35, Jan Kara wrote: >>>>

Re: [Ocfs2-devel] [Ocfs2-dev] BUG: deadlock with umount and ocfs2 workqueue triggered by ocfs2rec thread

2018-01-18 Thread Changwei Ge
Hi Jan, On 2018/1/18 0:03, Jan Kara wrote: > On Wed 17-01-18 16:21:35, Jan Kara wrote: >> Hello, >> >> On Fri 12-01-18 16:25:56, Eric Ren wrote: >>> On 01/12/2018 11:43 AM, Shichangkuo wrote: Hi all,   Now we are testing ocfs2 with 4.14 kernel, and we finding a deadlock with

Re: [Ocfs2-devel] [PATCH v2 2/2] ocfs2: add trimfs lock to avoid duplicated trims in cluster

2018-01-16 Thread Changwei Ge
It looks good to me. Reviewed-by: Changwei Ge <ge.chang...@h3c.com> On 2017/12/14 13:16, Gang He wrote: > As you know, ocfs2 has support trim the underlying disk via > fstrim command. But there is a problem, ocfs2 is a shared disk > cluster file system, if the user configures a s

Re: [Ocfs2-devel] [PATCH v2 1/2] ocfs2: add trimfs dlm lock resource

2018-01-16 Thread Changwei Ge
It looks good to me. Reviewed-by: Changwei Ge <ge.chang...@h3c.com> On 2017/12/14 13:16, Gang He wrote: > Introduce a new dlm lock resource, which will be used to > communicate during fstrim a ocfs2 device from cluster nodes. > > Signed-off-by: Gang He <g...@suse.co

[Ocfs2-devel] [PATCH] ocfs2: clean dead code up in alloc.c

2018-01-16 Thread Changwei Ge
Some stack variables are no longer used but still assigned. Trim them. Signed-off-by: Changwei Ge <ge.chang...@h3c.com> --- fs/ocfs2/alloc.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index addd7c5..edef99c 100644 --

Re: [Ocfs2-devel] kernel bug

2018-01-11 Thread Changwei Ge
HiCédric, Sorry I can't answer your question, but we are trying to. Please be patient. On 2018/1/11 19:52, BASSAGET Cédric wrote: > Hi Changwei, > > short question : Will the stable release of kernel 4.15 fix this bug ? > Regards > > 2018-01-11 8:06 GMT+01:00 Changwei Ge &l

Re: [Ocfs2-devel] [PATCH] ocfs2/xattr: assign errno to 'ret' in ocfs2_calc_xattr_init()

2018-01-11 Thread Changwei Ge
Acked-by: Changwei Ge <ge.chang...@h3c.com> On 2018/1/11 16:14, piaojun wrote: > We need catch the errno returned by ocfs2_xattr_get_nolock() and assign > it to 'ret' for printing and noticing upper callers. > > Signed-off-by: Jun Piao <piao...@huawei.com> > Rev

Re: [Ocfs2-devel] [PATCH v2 2/2] ocfs2: add trimfs lock to avoid duplicated trims in cluster

2018-01-11 Thread Changwei Ge
On 2018/1/11 15:57, Gang He wrote: > > > >> On 2018/1/11 15:19, Gang He wrote: >>> >>> >>> >> On 2018/1/11 12:31, Gang He wrote: > Hi Changwei, > > >> On 2018/1/11 11:33, Gang He wrote: >>> Hi Changwei, >>> >>> >> On 2018/1/11

Re: [Ocfs2-devel] [PATCH v2 2/2] ocfs2: add trimfs lock to avoid duplicated trims in cluster

2018-01-10 Thread Changwei Ge
On 2018/1/11 15:19, Gang He wrote: > > > >> On 2018/1/11 12:31, Gang He wrote: >>> Hi Changwei, >>> >>> >> On 2018/1/11 11:33, Gang He wrote: > Hi Changwei, > > >> On 2018/1/11 10:07, Gang He wrote: >>> Hi Changwei, >>> >>> >>

Re: [Ocfs2-devel] kernel bug

2018-01-10 Thread Changwei Ge
018-01-11 2:03 GMT+01:00 Changwei Ge <ge.chang...@h3c.com > <mailto:ge.chang...@h3c.com>>: > > Hi Cédric, > > These two patches are already picked by Andrew being merged into -mm tree > for now. > So you can refer to below links for them: > &g

Re: [Ocfs2-devel] [PATCH v2 2/2] ocfs2: add trimfs lock to avoid duplicated trims in cluster

2018-01-10 Thread Changwei Ge
On 2018/1/11 12:31, Gang He wrote: > Hi Changwei, > > >> On 2018/1/11 11:33, Gang He wrote: >>> Hi Changwei, >>> >>> >> On 2018/1/11 10:07, Gang He wrote: > Hi Changwei, > > >> On 2018/1/10 18:14, Gang He wrote: >>> Hi Changwei, >>> >>>

Re: [Ocfs2-devel] [PATCH v2 2/2] ocfs2: add trimfs lock to avoid duplicated trims in cluster

2018-01-10 Thread Changwei Ge
On 2018/1/11 11:33, Gang He wrote: > Hi Changwei, > > >> On 2018/1/11 10:07, Gang He wrote: >>> Hi Changwei, >>> >>> >> On 2018/1/10 18:14, Gang He wrote: > Hi Changwei, > > >> On 2018/1/10 17:05, Gang He wrote: >>> Hi Changwei, >>> >>>

Re: [Ocfs2-devel] [PATCH v2 2/2] ocfs2: add trimfs lock to avoid duplicated trims in cluster

2018-01-10 Thread Changwei Ge
On 2018/1/11 10:07, Gang He wrote: > Hi Changwei, > > >> On 2018/1/10 18:14, Gang He wrote: >>> Hi Changwei, >>> >>> >> On 2018/1/10 17:05, Gang He wrote: > Hi Changwei, > > >> Hi Gang, >> >> On 2017/12/14 13:16, Gang He wrote: >>> As you know,

Re: [Ocfs2-devel] kernel bug

2018-01-10 Thread Changwei Ge
Hi BASSAGET, We ocfs2 developers are solving a DIO crash issue which may share the same root cause with yours. You can refer to my patch set of 2 and backport them into your kernel to see if the issue can be kicked away. ocfs2: make metadata estimation accurate and clear ocfs2: try to

Re: [Ocfs2-devel] [PATCH v2 2/2] ocfs2: add trimfs lock to avoid duplicated trims in cluster

2018-01-10 Thread Changwei Ge
On 2018/1/10 18:14, Gang He wrote: > Hi Changwei, > > >> On 2018/1/10 17:05, Gang He wrote: >>> Hi Changwei, >>> >>> >> Hi Gang, On 2017/12/14 13:16, Gang He wrote: > As you know, ocfs2 has support trim the underlying disk via > fstrim command. But there is a

Re: [Ocfs2-devel] [PATCH v2 2/2] ocfs2: add trimfs lock to avoid duplicated trims in cluster

2018-01-10 Thread Changwei Ge
Hi Gang, On 2018/1/10 18:14, Gang He wrote: > Hi Changwei, > > >> On 2018/1/10 17:05, Gang He wrote: >>> Hi Changwei, >>> >>> >> Hi Gang, On 2017/12/14 13:16, Gang He wrote: > As you know, ocfs2 has support trim the underlying disk via > fstrim command. But there

Re: [Ocfs2-devel] [PATCH v2 2/2] ocfs2: add trimfs lock to avoid duplicated trims in cluster

2018-01-10 Thread Changwei Ge
On 2018/1/4 10:09, Gang He wrote: > Hi Alex, > > >> Hi Gang, >> >> On 2017/12/14 13:14, Gang He wrote: >>> As you know, ocfs2 has support trim the underlying disk via >>> fstrim command. But there is a problem, ocfs2 is a shared disk >>> cluster file system, if the user configures a

Re: [Ocfs2-devel] [PATCH v2 2/2] ocfs2: add trimfs lock to avoid duplicated trims in cluster

2018-01-10 Thread Changwei Ge
On 2018/1/10 17:05, Gang He wrote: > Hi Changwei, > > >> Hi Gang, >> >> On 2017/12/14 13:16, Gang He wrote: >>> As you know, ocfs2 has support trim the underlying disk via >>> fstrim command. But there is a problem, ocfs2 is a shared disk >>> cluster file system, if the user configures a

Re: [Ocfs2-devel] [PATCH v2 1/2] ocfs2: add trimfs dlm lock resource

2018-01-09 Thread Changwei Ge
Hi Gang, On 2017/12/14 13:16, Gang He wrote: > Introduce a new dlm lock resource, which will be used to > communicate during fstrim a ocfs2 device from cluster nodes. > > Signed-off-by: Gang He > --- > fs/ocfs2/dlmglue.c | 86 >

Re: [Ocfs2-devel] [PATCH v2 2/2] ocfs2: add trimfs lock to avoid duplicated trims in cluster

2018-01-09 Thread Changwei Ge
Hi Gang, On 2017/12/14 13:16, Gang He wrote: > As you know, ocfs2 has support trim the underlying disk via > fstrim command. But there is a problem, ocfs2 is a shared disk > cluster file system, if the user configures a scheduled fstrim > job on each file system node, this will trigger multiple

[Ocfs2-devel] [PATCH RESEND v3 1/2] ocfs2: make metadata estimation accurate and clear

2018-01-08 Thread Changwei Ge
For Andrew's convenience, resend this patch Current code assume that ::w_unwritten_list always has only one item on. This is not right and hard to get understood. So improve how to count unwritten item. Reported-by: John Lightsey <j...@nixnuts.net> Signed-off-by: Changwei Ge <ge.chang..

[Ocfs2-devel] [PATCH RESEND v3 2/2] ocfs2: try to reuse extent block in dealloc without meta_alloc

2018-01-08 Thread Changwei Ge
ace of local slot at higher priority. Reported-by: John Lightsey <j...@nixnuts.net> Signed-off-by: Changwei Ge <ge.chang...@h3c.com> --- fs/ocfs2/alloc.c | 208 --- fs/ocfs2/alloc.h | 1 + fs/ocfs2/aops.c | 6 ++ 3 files changed,

Re: [Ocfs2-devel] [PATCH 1/2] ocfs2: make metadata estimation accurate and clear

2018-01-08 Thread Changwei Ge
Hi Andrew On 2018/1/9 9:24, Andrew Morton wrote: > On Mon, 8 Jan 2018 01:36:05 +0000 Changwei Ge <ge.chang...@h3c.com> wrote: > >> Current code assume that ::w_unwritten_list always has only one item on. >> This is not right and hard to get understood. >> So impro

[Ocfs2-devel] [PATCH 1/2] ocfs2: make metadata estimation accurate and clear

2018-01-07 Thread Changwei Ge
Current code assume that ::w_unwritten_list always has only one item on. This is not right and hard to get understood. So improve how to count unwritten item. Reported-by: John Lightsey <j...@nixnuts.net> Signed-off-by: Changwei Ge <ge.chang...@h3c.com> --- fs/ocfs2/aops.c | 4 +

[Ocfs2-devel] [PATCH 2/2 v3] ocfs2: try to reuse extent block in dealloc without

2018-01-07 Thread Changwei Ge
-by: John Lightsey <j...@nixnuts.net> Signed-off-by: Changwei Ge <ge.chang...@h3c.com> --- fs/ocfs2/alloc.c | 208 --- fs/ocfs2/alloc.h | 1 + fs/ocfs2/aops.c | 6 ++ 3 files changed, 205 insertions(+), 10 deletions(-) dif

Re: [Ocfs2-devel] [PATCH v2] ocfs2: try to reuse extent block in dealloc without meta_alloc

2018-01-07 Thread Changwei Ge
Hi John, Sorry for reply you so late since too busy these days. Thanks for your contribution for this issue. Thanks to the reproducer you provided, I have reproduced the crash issue you reported. The back trace was found. ocfs2_mark_extent_written ocfs2_change_extent_flag

Re: [Ocfs2-devel] [PATCH v2] ocfs2: try to reuse extent block in dealloc without meta_alloc

2018-01-02 Thread Changwei Ge
Hi Junxiao, On 2018/1/2 16:18, Junxiao Bi wrote: > On 12/27/2017 08:21 PM, Changwei Ge wrote: >> Hi Junxiao, >> >> On 2017/12/27 18:02, Junxiao Bi wrote: >>> Hi Changwei, >>> >>> >>> On 12/26/2017 03:55 PM, Changwei Ge wrote: >>>

Re: [Ocfs2-devel] [PATCH v2] ocfs2: try a blocking lock before return AOP_TRUNCATED_PAGE

2017-12-28 Thread Changwei Ge
8 97224 S 0.333 6.017 0:01.33 corosync > > ocfs2test@tb-node2:~>multiple_run.sh -i ens3 -k ~/linux-4.4.21-69.tar.gz -o > ~/ocfs2mullog -C hacluster -s pcmk -n tb-node2,tb-node1,tb-node3 -d > /dev/sda1 -b 4096 -c 32768 -t multi_mmap /mnt/shared > Tests with "-b 4096 -C 32768&

Re: [Ocfs2-devel] [PATCH v2] ocfs2: try to reuse extent block in dealloc without meta_alloc

2017-12-27 Thread Changwei Ge
Hi Alex, On 2017/12/28 14:22, alex chen wrote: > Hi Changwei, > >> @@ -1347,8 +1362,15 @@ static int ocfs2_shift_tree_depth(handle_t *handle, >> struct ocfs2_extent_list *root_el; >> @@ -1762,8 +1764,8 @@ int ocfs2_write_begin_nolock(struct address_space >> *mapping, >> */

Re: [Ocfs2-devel] [PATCH v2] ocfs2: try to reuse extent block in dealloc without meta_alloc

2017-12-27 Thread Changwei Ge
Hi Jun, On 2017/12/27 16:48, piaojun wrote: > Hi Changwei, > > On 2017/12/26 15:55, Changwei Ge wrote: >> A crash issue was reported by John. >> The call trace follows: >> without any metadata reserved ahead of time, try to reuse those extents >> in dealloc in

Re: [Ocfs2-devel] [PATCH] ocfs2: try a blocking lock before return AOP_TRUNCATED_PAGE

2017-12-27 Thread Changwei Ge
; RBP: 0003 R08: 000e R09: > R10: 0483 R11: 7fa75ded61b0 R12: 7fa75e90a770 > R13: 000e R14: 1770 R15: 0000 > > Fixes: 1cce4df04f37 ("ocfs2: do not lock/unlock() inode DLM lock&qu

Re: [Ocfs2-devel] [PATCH v2] ocfs2: try to reuse extent block in dealloc without meta_alloc

2017-12-27 Thread Changwei Ge
Hi Junxiao, On 2017/12/27 18:02, Junxiao Bi wrote: > Hi Changwei, > > > On 12/26/2017 03:55 PM, Changwei Ge wrote: >> A crash issue was reported by John. >> The call trace follows: >> ocfs2_split_extent+0x1ad3/0x1b40 [ocfs2] >> ocfs2_c

Re: [Ocfs2-devel] [PATCH v2] ocfs2: fall back to buffer IO when append dio is disabled with file hole existing

2017-12-26 Thread Changwei Ge
Hi Junxiao, On 2017/12/27 15:35, Junxiao Bi wrote: > Hi Changwei, > > On 12/26/2017 05:20 PM, Changwei Ge wrote: >> Hi Alex >> >> On 2017/12/26 16:20, alex chen wrote: >>> Hi Changwei, >>> >>> On 2017/12/26 15:03, Changwei Ge wrote: &g

Re: [Ocfs2-devel] [PATCH v2] ocfs2: return -EROFS to mount.ocfs2 if inode block is invalid

2017-12-26 Thread Changwei Ge
On 2017/12/26 19:23, piaojun wrote: > Hi Changwei, > > On 2017/12/26 19:18, Changwei Ge wrote: >> Hi Jun, >> >> On 2017/12/26 19:10, piaojun wrote: >>> If metadata is corrupted such as 'invalid inode block', we will get >>> failed by calling 'mount

Re: [Ocfs2-devel] [PATCH v2] ocfs2: return -EROFS to mount.ocfs2 if inode block is invalid

2017-12-26 Thread Changwei Ge
Hi Jun, On 2017/12/26 19:10, piaojun wrote: > If metadata is corrupted such as 'invalid inode block', we will get > failed by calling 'mount()' and then set filesystem readonly as below: > > ocfs2_mount >ocfs2_initialize_super > ocfs2_init_global_system_inodes >ocfs2_iget >

Re: [Ocfs2-devel] [PATCH v2] ocfs2: fall back to buffer IO when append dio is disabled with file hole existing

2017-12-26 Thread Changwei Ge
Hi Alex On 2017/12/26 16:20, alex chen wrote: > Hi Changwei, > > On 2017/12/26 15:03, Changwei Ge wrote: >> The intention of this patch is to provide an option to ocfs2 users whether >> to allocate disk space while doing dio write. >> >> Whether to make o

Re: [Ocfs2-devel] [PATCH] ocfs2: try to reuse extent block in dealloc without meta_alloc

2017-12-26 Thread Changwei Ge
Hi Alex, On 2017/12/26 16:52, alex chen wrote: > Hi Changwei, > > On 2017/12/26 14:22, Changwei Ge wrote: >> A crash issue was reported by John. >> The call trace follows: >> ocfs2_split_extent+0x1ad3/0x1b40 [ocfs2] >> ocfs2_change_extent_flag+0x33a/0x470 [oc

[Ocfs2-devel] [PATCH v2] ocfs2: fall back to buffer IO when append dio is disabled with file hole existing

2017-12-25 Thread Changwei Ge
reflection to append-dio feature. Signed-off-by: Changwei Ge <ge.chang...@h3c.com> --- fs/ocfs2/aops.c | 53 ++--- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index d151632..32e60c0 100644 --

[Ocfs2-devel] [PATCH] ocfs2: try to reuse extent block in dealloc without meta_alloc

2017-12-25 Thread Changwei Ge
net> Signed-off-by: Changwei Ge <ge.chang...@h3c.com> --- fs/ocfs2/alloc.c | 128 --- fs/ocfs2/alloc.h | 1 + fs/ocfs2/aops.c | 14 -- 3 files changed, 135 insertions(+), 8 deletions(-) diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/a

Re: [Ocfs2-devel] [PATCH] ocfs2: return -EROFS to upper if inode block is invalid

2017-12-25 Thread Changwei Ge
Hi Jun, What I concern is if we don't return -EROFS to mount.ocfs2, what bad result will come? This patch is a bug fix or something else? Can you elaborate your intention of this patch? Thanks, Changwei On 2017/12/26 10:14, piaojun wrote: > If metadata is corrupted such as 'invalid inode

  1   2   >