Re: [Ocfs2-devel] Failed to upgrade ocfs2-tools to v1.8.4

2015-05-05 Thread piaojun
Eeda srinivas.e...@oracle.com Date: Fri Jan 30 12:51:45 2015 -0800 tools: Up version to 1.8.4 Signed-off-by: Srinivas Eeda srinivas.e...@oracle.com commit 9693851641bfcd0f2bab226e9f03d9ab05cb7edf Author: piaojun piao...@huawei.com Date: Sun Feb 15 08:51:45 2015 +0800

[Ocfs2-devel] [PATCH] ocfs2/dlm: fix a variable overflow problem in dlmdomain.c

2016-03-14 Thread piaojun
In dlm_send_join_cancels(), unsigned int node is assigned -1, this will lead variable overflow. Although this won't cause any runtime problem, the code looks a little uncoordinated. Signed-off-by: Jun Piao Reviewed-by: Joseph Qi --- dlm/dlmdomain.c | 3

[Ocfs2-devel] [PATCH V2] ocfs2/dlm: fix a variable overflow problem in dlmdomain.c

2016-03-14 Thread piaojun
In dlm_send_join_cancels(), node is defined with type unsigned int, but initialized with -1, this will lead variable overflow. Although this won't cause any runtime problem, the code looks a little uncoordinated. Signed-off-by: Jun Piao --- dlm/dlmdomain.c | 2 +- 1 file

Re: [Ocfs2-devel] [PATCH] ocfs2/dlm: fix a variable overflow problem in dlmdomain.c

2016-03-14 Thread piaojun
On 2016/3/14 20:21, Joseph Qi wrote: > On 2016/3/14 19:57, piaojun wrote: >> In dlm_send_join_cancels(), unsigned int node is assigned -1, this will >> lead variable overflow. Although this won't cause any runtime problem, >> the code looks a little uncoordinated. >>

[Ocfs2-devel] [PATCH] ocfs2: clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec

2016-03-19 Thread piaojun
Clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec. Signed-off-by: Jun Piao --- alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/alloc.c b/alloc.c index d002579..2b8b721 100644 --- a/alloc.c +++ b/alloc.c @@ -5334,7 +5334,7 @@

Re: [Ocfs2-devel] [PATCH] ocfs2: clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec

2016-03-25 Thread piaojun
el, index); - wants_rotate = 1; next_free = le16_to_cpu(el->l_next_free_rec); if (is_rightmost_tree_rec && next_free > 1) { -- 1.8.4.3 On 2016/3/26 3:36, Andrew Morton wrote: > On Thu, 17 Mar 2016 17:11:27 +0800 piaojun <piao...@huaw

[Ocfs2-devel] [PATCH] ocfs2: clean up unused parameter 'count' in o2hb_read_block_input()

2016-04-15 Thread piaojun
clean up unused parameter 'count' in o2hb_read_block_input(). Signed-off-by: Jun Piao --- fs/ocfs2/cluster/heartbeat.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index bd15929..a5956c4

Re: [Ocfs2-devel] [patch 4/5] ocfs2/dlm: solve a BUG when deref failed in dlm_drop_lockres_ref

2016-07-28 Thread piaojun
Hello Mark, On 2016-7-29 6:12, Mark Fasheh wrote: > On Thu, Jul 28, 2016 at 02:06:05PM -0700, Andrew Morton wrote: >> From: piaojun <piao...@huawei.com> >> Subject: ocfs2/dlm: solve a BUG when deref failed in dlm_drop_lockres_ref >> >> We found a BUG situatio

[Ocfs2-devel] [PATCH v2 3/3] ocfs2/dlm: continue to purge recovery lockres when recovery master goes down

2016-07-11 Thread piaojun
We found a dlm-blocked situation caused by continuous breakdown of recovery masters described below. To solve this problem, we should purge recovery lock once detecting recovery master goes down. N3 N2 N1(reco master) go down

[Ocfs2-devel] ocfs2/dlm: disable BUG_ON when DLM_LOCK_RES_DROPPING_REF, is cleared before dlm_deref_lockres_done_handler

2016-07-10 Thread piaojun
We found a BUG situation in which DLM_LOCK_RES_DROPPING_REF is cleared unexpected that described below. To solve the bug, we disable the BUG_ON and purge lockres in dlm_do_local_recovery_cleanup. Node 1 Node 2(master) dlm_purge_lockres

[Ocfs2-devel] ocfs2/dlm: continue to purge recovery lockres when recovery master goes down

2016-07-10 Thread piaojun
We found a dlm-blocked situation caused by continuous breakdown of recovery masters described below. To solve this problem, we should purge recovery lock once detecting recovery master goes down. N3 N2 N1(reco master) go down

[Ocfs2-devel] ocfs2/dlm: solve a BUG when deref failed in dlm_drop_lockres_ref

2016-07-10 Thread piaojun
We found a BUG situation that lockres is migrated during deref described below. To solve the BUG, we could purge lockres directly when other node says I did not have a ref. Additionally, we'd better purge lockres if master goes down, as no one will response deref done. Node 1

Re: [Ocfs2-devel] ocfs2/dlm: solve a BUG when deref failed in dlm_drop_lockres_ref

2016-07-10 Thread piaojun
On 2016-7-11 10:07, Joseph Qi wrote: > On 2016/7/10 18:03, piaojun wrote: >> We found a BUG situation that lockres is migrated during deref >> described below. To solve the BUG, we could purge lockres directly when >> other node says I did not have a ref. Additional

Re: [Ocfs2-devel] ocfs2/dlm: disable BUG_ON when DLM_LOCK_RES_DROPPING_REF, is cleared before dlm_deref_lockres_done_handler

2016-07-10 Thread piaojun
On 2016-7-11 9:55, Joseph Qi wrote: > Hi Jun, > > On 2016/7/10 18:01, piaojun wrote: >> We found a BUG situation in which DLM_LOCK_RES_DROPPING_REF is cleared >> unexpected that described below. To solve the bug, we disable the BUG_ON >> and purge lockres in dl

Re: [Ocfs2-devel] [DRAFT 2/2] ocfs2: fix deadlock caused by recursive cluster locking

2016-11-10 Thread piaojun
Hi Eric, On 2016-11-1 9:45, Eric Ren wrote: > Hi, > > On 10/31/2016 06:55 PM, piaojun wrote: >> Hi Eric, >> >> On 2016-10-19 13:19, Eric Ren wrote: >>> The deadlock issue happens when running discontiguous block >>> group testing on multiple nodes. Th

Re: [Ocfs2-devel] [DRAFT 2/2] ocfs2: fix deadlock caused by recursive cluster locking

2016-11-13 Thread piaojun
Hi Eric, On 2016-11-11 9:56, Eric Ren wrote: > Hi, > > On 11/10/2016 06:49 PM, piaojun wrote: >> Hi Eric, >> >> On 2016-11-1 9:45, Eric Ren wrote: >>> Hi, >>> >>> On 10/31/2016 06:55 PM, piaojun wrote: >>>> Hi Eric, >>>&

Re: [Ocfs2-devel] [DRAFT 2/2] ocfs2: fix deadlock caused by recursive cluster locking

2016-10-31 Thread piaojun
Hi Eric, On 2016-10-19 13:19, Eric Ren wrote: > The deadlock issue happens when running discontiguous block > group testing on multiple nodes. The easier way to reproduce > is to do "chmod -R 777 /mnt/ocfs2" things like this on multiple > nodes at the same time by pssh. > > This is indeed

[Ocfs2-devel] [PATCH] ocfs2/dlm: clean up deadcode in dlm_master_request_handler()

2016-10-31 Thread piaojun
when 'dispatch_assert' is set, 'response' must be DLM_MASTER_RESP_YES, and 'res' won't be null, so execution can't reach these two branch. Signed-off-by: Jun Piao --- fs/ocfs2/dlm/dlmmaster.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/fs/ocfs2/dlm/dlmmaster.c

[Ocfs2-devel] [PATCH] ocfs2/dlm: clean up useless BUG_ON default case in dlm_finalize_reco_handler()

2016-10-10 Thread piaojun
The value of 'stage' must be between 1 and 2, so the switch can't reach the default case. Signed-off-by: Jun Piao --- fs/ocfs2/dlm/dlmrecovery.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index

Re: [Ocfs2-devel] [PATCH v2 3/3] ocfs2/dlm: continue to purge recovery lockres when recovery master goes down

2017-01-05 Thread piaojun
On 2017/1/5 15:44, Gechangwei wrote: > On 2017/1/5 15:28, gechangwei 12382 (Cloud) wrote: > > Hi Jun, > I suppose that a defect hid your patch. > > >> We found a dlm-blocked situation caused by continuous breakdown of recovery >> masters described below. To solve this problem, we should

[Ocfs2-devel] [PATCH] ocfs2: clean up some dead code

2017-08-08 Thread piaojun
clean up some unused functions and parameters. Signed-off-by: Jun Piao Reviewed-by: Alex Chen --- fs/ocfs2/alloc.c | 22 -- fs/ocfs2/alloc.h | 3 +-- fs/ocfs2/cluster/heartbeat.c | 42

[Ocfs2-devel] [PATCH] ocfs2: free 'dummy_sc' in sc_fop_release() in case of memory leak

2017-06-25 Thread piaojun
'sd->dbg_sock' is malloc in sc_common_open(), but not freed at the end of sc_fop_release(). Signed-off-by: Jun Piao --- fs/ocfs2/cluster/netdebug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c index

[Ocfs2-devel] [PATCH] o2image: back-up xattr tree for regular file

2017-05-19 Thread piaojun
when traversing regular file's inode with xattr btree in traverse_inode(), we will get into traverse_chains() rather than traverse_xb(). so xattr tree is not back-up actually. Signed-off-by: Jun Piao --- o2image/o2image.c | 18 ++ 1 file changed, 10

[Ocfs2-devel] [patch 2/2] ocfs2: clean up some unused func declaration

2017-09-22 Thread piaojun
Signed-off-by: Jun Piao Reviewed-by: Alex Chen --- fs/ocfs2/buffer_head_io.h| 3 --- fs/ocfs2/cluster/heartbeat.h | 2 -- 2 files changed, 5 deletions(-) diff --git a/fs/ocfs2/buffer_head_io.h b/fs/ocfs2/buffer_head_io.h index b97bcc6..b1bb70c

[Ocfs2-devel] [patch 1/2] ocfs2/dlm: protect 'tracking_list' by 'track_lock'

2017-09-22 Thread piaojun
'dlm->tracking_list' need to be protected by 'dlm->track_lock'. Signed-off-by: Jun Piao Reviewed-by: Alex Chen --- fs/ocfs2/dlm/dlmdomain.c | 7 ++- fs/ocfs2/dlm/dlmmaster.c | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git

[Ocfs2-devel] [PATCH 2/2] ocfs2: cleanup unused func declaration and assignment

2017-10-13 Thread piaojun
Signed-off-by: Jun Piao --- fs/ocfs2/alloc.c | 2 -- fs/ocfs2/cluster/heartbeat.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index a177eae..31a416d 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -3585,8

[Ocfs2-devel] [PATCH 1/2] ocfs2: no need flush workqueue before destroying it

2017-10-13 Thread piaojun
destroy_workqueue() will do flushing work for us. Signed-off-by: Jun Piao --- fs/ocfs2/dlm/dlmdomain.c | 1 - fs/ocfs2/dlmfs/dlmfs.c | 1 - fs/ocfs2/super.c | 4 +--- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/fs/ocfs2/dlm/dlmdomain.c

Re: [Ocfs2-devel] [patch 1/2] ocfs2/dlm: protect 'tracking_list' by 'track_lock'

2017-09-26 Thread piaojun
On 2017/9/27 9:32, Joseph Qi wrote: > > > On 17/9/26 08:39, piaojun wrote: >> >> >> On 2017/9/25 18:35, Joseph Qi wrote: >>> >>> >>> On 17/9/23 11:39, piaojun wrote: >>>> 'dlm->tracking_list' need to be protected by 'dl

Re: [Ocfs2-devel] [patch 1/2] ocfs2/dlm: protect 'tracking_list' by 'track_lock'

2017-09-25 Thread piaojun
On 2017/9/25 18:35, Joseph Qi wrote: > > > On 17/9/23 11:39, piaojun wrote: >> 'dlm->tracking_list' need to be protected by 'dlm->track_lock'. >> >> Signed-off-by: Jun Piao <piao...@huawei.com> >> Reviewed-by: Alex Chen <alex.c...@hua

[Ocfs2-devel] [PATCH] ocfs2: no need flush workqueue before destroying it

2017-10-12 Thread piaojun
1. delete redundant flush_workqueue(); 2. delete some unused func declaration and assignment. Signed-off-by: Jun Piao --- fs/ocfs2/alloc.c | 2 -- fs/ocfs2/cluster/heartbeat.h | 2 -- fs/ocfs2/dlm/dlmdomain.c | 1 - fs/ocfs2/dlmfs/dlmfs.c | 1 -

Re: [Ocfs2-devel] [PATCH] ocfs2: fix cluster hang after a node dies

2017-10-18 Thread piaojun
On 2017/10/17 14:48, Changwei Ge wrote: > When a node dies, other live nodes have to choose a new master > for an existed lock resource mastered by the dead node. > > As for ocfs2/dlm implementation, this is done by function - > dlm_move_lockres_to_recovery_list which marks those lock rsources

Re: [Ocfs2-devel] [PATCH] ocfs2: fix cluster hang after a node dies

2017-10-18 Thread piaojun
Hi Changwei, Could you share the method to reproduce the problem? On 2017/10/17 14:48, Changwei Ge wrote: > When a node dies, other live nodes have to choose a new master > for an existed lock resource mastered by the dead node. > > As for ocfs2/dlm implementation, this is done by function - >

Re: [Ocfs2-devel] [PATCH v2 1/3] ocfs2: add ocfs2_try_rw_lock and ocfs2_try_inode_lock

2017-11-29 Thread piaojun
On 2017/11/29 16:36, Gang He wrote: > Add ocfs2_try_rw_lock and ocfs2_try_inode_lock functions, which > will be used in non-block IO scenarios. > > Signed-off-by: Gang He Reviewed-by: Jun Piao > --- > fs/ocfs2/dlmglue.c | 21 + >

Re: [Ocfs2-devel] [PATCH 1/3] ocfs2: add ocfs2_try_rw_lock and ocfs2_try_inode_lock

2017-11-27 Thread piaojun
Hi Gang, On 2017/11/27 17:46, Gang He wrote: > Add ocfs2_try_rw_lock and ocfs2_try_inode_lock functions, which > will be used in non-block IO scenarios. > > Signed-off-by: Gang He > --- > fs/ocfs2/dlmglue.c | 22 ++ > fs/ocfs2/dlmglue.h | 4 > 2 files

Re: [Ocfs2-devel] [PATCH 2/3] ocfs2: add ocfs2_overwrite_io function

2017-11-27 Thread piaojun
Hi Gang, If ocfs2_overwrite_io is only called in 'nowait' scenarios, I wonder if we can discard 'int wait' just as ext4 does: static bool ext4_overwrite_io(struct inode *inode, loff_t pos, loff_t len); thans, Jun On 2017/11/27 17:46, Gang He wrote: > Add ocfs2_overwrite_io function, which is

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

2017-12-18 Thread piaojun
Hi Changwei, On 2017/12/19 11:05, Changwei Ge wrote: > Hi Jun, > > On 2017/12/19 9:48, piaojun wrote: >> Hi Changwei, >> >> On 2017/12/18 20:06, Changwei Ge wrote: >>> Before ocfs2 supporting allocating clusters while doing append-dio, all >>&g

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

2017-12-18 Thread piaojun
Hi Changwei, On 2017/12/18 20:06, Changwei Ge wrote: > Before ocfs2 supporting allocating clusters while doing append-dio, all append > dio will fall back to buffer io to allocate clusters firstly. Also, when it > steps on a file hole, it will fall back to buffer io, too. But for current > code,

Re: [Ocfs2-devel] [PATCH] Bug#841144: kernel BUG at /build/linux-Wgpe2M/linux-4.8.11/fs/ocfs2/alloc.c:1514!

2017-11-20 Thread piaojun
Hi John, On 2017/11/21 8:58, Changwei Ge wrote: > Hi John, > It's better to paste your patch directly into message body. It's easy > for reviewing. > > So I copied your patch below: > >> The dw_zero_count tracking was assuming that w_unwritten_list would >> always contain one element. The

[Ocfs2-devel] [PATCH v3] ocfs2/dlm: wait for dlm recovery done when migrating all lockres

2017-11-05 Thread piaojun
wait for dlm recovery done when migrating all lockres in case of new lockres to be left after leaving dlm domain. NodeA NodeBNodeC umount and migrate all lockres node down do recovery for NodeB and collect a new

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

2017-11-01 Thread piaojun
Hi Changwei, thanks for reviewing, and I think waiting for recoverying done before migrating seems another solution, but I wonder if new problems will be invoked as following comments. thanks, Jun On 2017/11/1 15:13, Changwei Ge wrote: > Hi Jun, > > I probably get your point. > > You mean

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

2017-11-01 Thread piaojun
se we can do it in a flexible way. > > Thanks, > Changwei > > > On 2017/11/1 15:57, piaojun wrote: >> Hi Changwei, >> >> thanks for reviewing, and I think waiting for recoverying done before >> migrating seems another solution, but I wonder if new problems will be &

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

2017-11-01 Thread piaojun
wrote: > Hi Jun, > > On 2017/11/1 16:46, piaojun wrote: >> Hi Changwei, >> >> I do think we need follow the principle that use 'dlm_domain_lock' to >> protect 'dlm_state' as the NOTE says in 'dlm_ctxt': >> /* NOTE: Next three are protected by dlm_domain_lock

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

2017-11-02 Thread piaojun
grating, I just let another node to do recovery. thanks, Jun On 2017/11/2 9:56, Changwei Ge wrote: > On 2017/11/2 9:44, piaojun wrote: >> Hi Changwei, >> >> I had tried a solution like yours before, but failed to prevent the >> race just by 'dlm_state' and the existed

[Ocfs2-devel] question about ocfs2-devel

2017-11-02 Thread piaojun
Hi, I failed to send mail to ocfs2-devel@oss.oracle.com, who kowns the reason. thanks, Jun To: piao...@huawei.com This message is from the Forcepoint email protection system, TRITON AP-EMAIL at host huawei.com. The attached email could not be delivered to one or more recipients. For

Re: [Ocfs2-devel] question about ocfs2-devel

2017-11-02 Thread piaojun
Hi Gang, thanks for replying, and perhaps there is something wrong just now. I will send patch again. thanks, Jun On 2017/11/3 10:35, Gang He wrote: > We can got this mail. > > Thanks > Gang > > >> Hi, >> >> I failed to send mail to ocfs2-devel@oss.oracle.com, who kowns >> the reason.

[Ocfs2-devel] [PATCH v2] ocfs2/dlm: wait for dlm recovery done when migrating all lockres

2017-11-02 Thread piaojun
wait for dlm recovery done when migrating all lockres in case of new lockres to be left after leaving dlm domain. NodeA NodeBNodeC umount and migrate all lockres node down do recovery for NodeB and collect a new

Re: [Ocfs2-devel] [PATCH] ocfs2: fix a potential 'ABBA' deadlock caused by 'l_lock' and 'dentry_attach_lock'

2017-12-08 Thread piaojun
Hi Changwei, On 2017/12/8 17:09, Changwei Ge wrote: > On 2017/12/7 20:37, piaojun wrote: >> Hi Changwei, >> >> On 2017/12/7 19:59, Changwei Ge wrote: >>> Hi Jun, >>> >>> On 2017/12/7 19:30, piaojun wrote: >>>

[Ocfs2-devel] [PATCH] ocfs2: fix a potential 'ABBA' deadlock caused by 'l_lock' and 'dentry_attach_lock'

2017-12-07 Thread piaojun
CPUA CPUB ocfs2_dentry_convert_worker get 'l_lock' get 'dentry_attach_lock' interruptted by dio_end_io: dio_end_io

Re: [Ocfs2-devel] [PATCH] ocfs2: fix a potential 'ABBA' deadlock caused by 'l_lock' and 'dentry_attach_lock'

2017-12-07 Thread piaojun
Hi Changwei, On 2017/12/7 19:59, Changwei Ge wrote: > Hi Jun, > > On 2017/12/7 19:30, piaojun wrote: >> CPUA CPUB >> >> ocfs2_dentry_convert_worker >> get 'l_lock' > > This lock belongs to oc

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

2017-10-31 Thread piaojun
Hi Changwei, On 2017/11/1 10:47, Changwei Ge wrote: > Hi Jun, > > Thanks for reporting. > I am very interesting in this issue. But, first of all, I want to make > this issue clear, so that I might be able to provide some comments. > > > On 2017/11/1 9:16, piaoju

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

2018-05-06 Thread piaojun
Hi Larry, 'had_lock' will be initialized by ocfs2_inode_lock_tracker(), and the 'bail' branch above won't use it either as 'inode_locked' is still zero. thanks, Jun On 2018/5/6 17:49, Larry Chen wrote: > The variable had_lock might be used uninitialized. > > Signed-off-by: Larry Chen

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

2018-05-14 Thread piaojun
::bi_max_vecs or it's a cloned bio. > > > So we can judge if bio is full from its return value is zero or not. > > > Thanks, > > Changwei > > > On 2018/5/10 9:13, Changwei Ge wrote: >> >> >> On 2018/5/10 8:24, piaojun wrote: >>> >&g

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 -

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 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/

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() >>> re

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

2018-01-11 Thread piaojun
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 Reviewed-by: Alex Chen Reviewed-by: Yiwen Jiang --- fs/ocfs2/xattr.c | 1 + 1

Re: [Ocfs2-devel] kernel bug

2018-01-10 Thread piaojun
Hi Cédric, You'd better paste the core dump stack and the method of reproducing this BUG. thanks, Jun On 2018/1/10 19:48, BASSAGET Cédric wrote: > Hello > Today I reported a bug related to ocfs2 1.8.on proxmox forum, maybe somebody > here will be able to help me... > The bog on proxmox forum :

[Ocfs2-devel] [PATCH] ocfs2/acl: use 'ip_xattr_sem' to protect getting extended attribute

2018-01-16 Thread piaojun
The race between *set_acl and *get_acl will cause getting incomplete xattr data as below: processAprocessB ocfs2_set_acl ocfs2_xattr_set __ocfs2_xattr_set_handle ocfs2_get_acl_nolock

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

2018-01-18 Thread piaojun
Hi Changwei, On 2018/1/19 13:42, Changwei Ge wrote: > 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

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

2018-01-25 Thread piaojun
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: >>> Hi Jun, >>> >>> On 2018/1/25 20:18, piaojun wrote: &g

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

2018-01-25 Thread piaojun
Hi Gang, On 2018/1/26 10:16, Gang He wrote: > Hi Jun, > > >> Hi Gang, >> >> Filesystem won't become readonly and journal remains normal, > How does the user aware this kind of issue happen? watch the kernel message? > but some users do not like watch the kernel message except > there

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

2018-01-16 Thread piaojun
Hi Changwei, LGTM On 2018/1/16 20:17, Changwei Ge wrote: > Some stack variables are no longer used but still assigned. > Trim them. > > Signed-off-by: Changwei Ge Reviewed-by: Jun Piao > --- > fs/ocfs2/alloc.c | 11 ++- > 1 file changed, 2

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

2018-01-24 Thread piaojun
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 not flushed to disk due to abnormal storage link. 3. After a while

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

2018-01-25 Thread piaojun
Hi Gang, Filesystem won't become readonly and journal remains normal, so this problem needs user umount and mount again to recover. And I'm thinking about if we should set readonly to notice user. thanks, Jun On 2018/1/25 16:40, Gang He wrote: > Hi Jun, > > If we return -EIO here, what is the

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

2018-01-25 Thread piaojun
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: >> >> 1. When removing extent rec, we will dirty the bhs of extent rec and

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

2018-01-25 Thread piaojun
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: >>> Hi Jun, >>> >>> On 2018/1/25 10:41, piaojun wrote: >>>> We s

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

2018-01-25 Thread piaojun
LGTM On 2018/1/25 9:18, Changwei Ge wrote: > We should unlock bh_stat if bg->bg_free_bits_count > bg->bg_bits > > Suggested-by: Jan Kara > Signed-off-by: Changwei Ge Reviewed-by: Jun Piao > --- > fs/ocfs2/suballoc.c | 2 ++ > 1 file

Re: [Ocfs2-devel] Ocfs2-devel Digest, Vol 167, Issue 20

2018-01-12 Thread piaojun
Hi Guozhonghua, It seems that deadlock could be reproduced easily, right? Sharing the lock with VFS-layer probably is risky, and introducing a new lock for "quota_recovery" sounds good. Could you post a patch to fix this problem? thanks, Jun On 2018/1/13 11:04, Guozhonghua wrote: > >> Message:

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

2018-01-26 Thread piaojun
Hi Changwei, Thanks for quick repling, Gang and I are thinking about how to notice user to recover this problem, and later I will post patch v2. thanks Jun On 2018/1/27 13:17, Changwei Ge wrote: > Hi Jun, > > On 2018/1/27 11:52, piaojun wrote: >> Hi Jan and Changwei, >>

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

2018-01-27 Thread piaojun
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 jbd2 area successfully. 3. The write-back thread of

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

2018-01-26 Thread piaojun
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, >>> Good morning:-) >>> >>> On 2018/1/25 20:45, piao

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

2018-01-28 Thread piaojun
Hi Changwei, On 2018/1/27 19:19, Changwei Ge wrote: > 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 an

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

2018-01-28 Thread piaojun
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 jbd2 area successfully. 3. The write-back thread of

[Ocfs2-devel] [PATCH 1/2] ocfs2: use 'oi' instead of 'OCFS2_I()'

2018-01-29 Thread piaojun
We could use 'oi' instead of 'OCFS2_I()' to make code more elegant. Signed-off-by: Jun Piao Reviewed-by: Yiwen Jiang --- fs/ocfs2/alloc.c| 2 +- fs/ocfs2/aops.c | 2 +- fs/ocfs2/file.c | 6 +++--- fs/ocfs2/inode.c| 2 +-

[Ocfs2-devel] [PATCH 2/2] ocfs2: use 'osb' instead of 'OCFS2_SB()'

2018-01-29 Thread piaojun
We could use 'osb' instead of 'OCFS2_SB()' to make code more elegant. Signed-off-by: Jun Piao Reviewed-by: Yiwen Jiang --- fs/ocfs2/aops.c | 2 +- fs/ocfs2/dir.c | 2 +- fs/ocfs2/dlmglue.c | 21 -

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

2018-02-08 Thread piaojun
Clean up some unused function declaration in dlmcommon.h Signed-off-by: Jun Piao Reviewed-by: Yiwen Jiang --- fs/ocfs2/dlm/dlmcommon.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h index

Re: [Ocfs2-devel] [PATCH 1/2] ocfs2: use 'oi' instead of 'OCFS2_I()'

2018-02-06 Thread piaojun
Hi Andrew, Could you help reviewing my patch set and applying? Thanks a lot, Jun On 2018/1/30 15:38, piaojun wrote: > We could use 'oi' instead of 'OCFS2_I()' to make code more elegant. > > Signed-off-by: Jun Piao <piao...@huawei.com> > Reviewed-by: Yiwen Jiang <

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

2018-02-23 Thread piaojun
Hi Changwei, On 2018/2/23 17:55, Changwei Ge wrote: > 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,

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

2018-02-23 Thread piaojun
Hi changwei, On 2018/2/23 15:30, ge.chang...@h3c.com wrote: > From: Changwei Ge This line seems unnecessary, others looks good to me. thanks, Jun > > Obviously, the comment before dlm_do_local_recovery_cleanup() has > nothing to do with it. So remove it. > >

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

2017-12-25 Thread piaojun
If metadata is corrupted such as 'invalid inode block', we will get failed by calling 'mount()' as below: ocfs2_mount ocfs2_initialize_super ocfs2_init_global_system_inodes : return -EINVAL if inode is NULL ocfs2_get_system_file_inode _ocfs2_get_system_file_inode : return NULL

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

2017-12-25 Thread piaojun
Hi Gang, Just like the dumped stack below, ocfs2_validate_inode_block() will find out 'invalid inode' and then return error to upper callers. At last invoke failure of ocfs2_get_system_file_inode(). thanks, Jun On 2017/12/26 10:22, Gang He wrote: > Hi Piaojun, > > Just one quick

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

2017-12-25 Thread piaojun
t; 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 block', we will get >> failed by

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

2017-12-25 Thread piaojun
Hi Joseph, On 2017/12/26 11:05, Joseph Qi wrote: > > > On 17/12/26 10:11, piaojun wrote: >> If metadata is corrupted such as 'invalid inode block', we will get >> failed by calling 'mount()' as below: >> >> ocfs2_mount >> ocfs2_initialize_super >>

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

2017-12-25 Thread piaojun
Hi Joseph, On 2017/12/26 14:59, Joseph Qi wrote: > > > On 17/12/26 14:45, piaojun wrote: >> Hi Joseph, >> >> On 2017/12/26 14:10, Joseph Qi wrote: >>> >>> >>> On 17/12/26 13:35, piaojun wrote: >>>> Hi Joseph, >>>>

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

2017-12-26 Thread piaojun
On 2017/12/26 16:19, 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 ocfs2 fall back to buffer io is up to ocfs2 users

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

2017-12-25 Thread piaojun
Hi Joseph, On 2017/12/26 14:10, Joseph Qi wrote: > > > On 17/12/26 13:35, piaojun wrote: >> Hi Joseph, >> >> On 2017/12/26 11:05, Joseph Qi wrote: >>> >>> >>> On 17/12/26 10:11, piaojun wrote: >>>> If metadata is corrupted such a

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

2017-12-28 Thread piaojun
LGTM On 2017/12/28 15:48, Gang He wrote: > If we can't get inode lock immediately in the function > ocfs2_inode_lock_with_page() when reading a page, we should not > return directly here, since this will lead to a softlockup problem > when the kernel is configured with CONFIG_PREEMPT is not set.

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

2017-12-26 Thread piaojun
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 ocfs2_read_locked_inode ocfs2_validate_inode_block

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

2017-12-26 Thread piaojun
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()' and then set filesystem readonly as below: >> >> ocfs2_m

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

2017-12-26 Thread piaojun
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 ocfs2_read_locked_inode ocfs2_validate_inode_block

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

2017-12-27 Thread piaojun
Hi Changwei, On 2017/12/26 15:55, 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 [ocfs2] > ocfs2_mark_extent_written+0x172/0x220 [ocfs2] > ocfs2_dio_end_io+0x62d/0x910 [ocfs2] >

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

2017-12-27 Thread piaojun
Hi Gang, Do you mean that too many retrys in loop cast losts of CPU-time and block page-fault interrupt? We should not add any delay in ocfs2_fault(), right? And I still feel a little confused why your method can solve this problem. thanks, Jun On 2017/12/27 17:29, Gang He wrote: > If we can't

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

2017-12-27 Thread piaojun
Hi Gang, Thanks for your explaination, and I just have one more question. Could we use 'ocfs2_inode_lock' instead of 'ocfs2_inode_lock_full' to avoid -EAGAIN circularly? thanks, Jun On 2017/12/27 18:37, Gang He wrote: > Hi Jun, > > >> Hi Gang, >> >> Do you mean that too many retrys in

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

2017-12-27 Thread piaojun
Hi Gang, You cleared my doubt. Should we handle the errno of ocfs2_inode_lock() or just use mlog_errno()? thanks, Jun On 2017/12/28 10:11, Gang He wrote: > Hi Jun, > > >> Hi Gang, >> >> Thanks for your explaination, and I just have one more question. Could >> we use 'ocfs2_inode_lock'

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

2017-12-27 Thread piaojun
Hi Gang, This patch looks good to me. thanks, Jun On 2017/12/28 10:58, Gang He wrote: > > > >> Hi Gang, >> >> You cleared my doubt. Should we handle the errno of ocfs2_inode_lock() >> or just use mlog_errno()? > Hi Jun, I think it is not necessary, since we just want to hold a while >

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

2018-01-18 Thread piaojun
Hi Jan, Eric and Changwei, Could we use another mutex lock to protect quota recovery? Sharing the lock with VFS-layer probably seems a little weird. 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: >>> Hello, >>>

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

2018-01-18 Thread piaojun
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 recovery? Sharing the >> lock with VFS-layer probably seems a little weir

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

2018-03-01 Thread piaojun
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 stuck into infinite loop when requsting lock from us. N1 N2 (owner)

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

2018-03-01 Thread piaojun
Hi Larry, There is the same mistake in ocfs2_reflink_inodes_lock(), could you help fixing them all? thanks, Jun On 2018/2/28 18:17, Larry Chen wrote: > The function ocfs2_double_lock tries to lock the inode with lower > blockid first, not lockid. > > Signed-off-by: Larry Chen

  1   2   >