[Ocfs2-devel] [PATCH 1/2] aio: make kiocb-private NUll in init_sync_kiocb()

2012-05-30 Thread Junxiao Bi
several times by do_sync_write(). So we initialize it in init_sync_kiocb(), it's also useful for other similiar use of it in the future. Signed-off-by: Junxiao Bi junxiao...@oracle.com --- include/linux/aio.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/aio.h b/include/linux

[Ocfs2-devel] [PATCH 2/2] ocfs2: clear unaligned io flag when dio fails

2012-05-30 Thread Junxiao Bi
The unaligned io flag is set in the kiocb when an unaligned dio is issued, it should be cleared even when the dio fails, or it may affect the following io which are using the same kiocb. Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/file.c |4 +++- 1 file changed, 3 insertions

Re: [Ocfs2-devel] [PATCH 1/2] aio: make kiocb-private NUll in init_sync_kiocb()

2012-05-31 Thread Junxiao Bi
On 05/31/2012 10:08 PM, Jeff Moyer wrote: Junxiao Bi junxiao...@oracle.com writes: Ocfs2 uses kiocb.*private as a flag of unsigned long size. In commit a11f7e6 ocfs2: serialize unaligned aio, the unaligned io flag is involved in it to serialize the unaligned aio. As *private

Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: clear unaligned io flag when dio fails

2012-05-31 Thread Junxiao Bi
On 05/31/2012 10:09 PM, Jeff Moyer wrote: Junxiao Bi junxiao...@oracle.com writes: The unaligned io flag is set in the kiocb when an unaligned dio is issued, it should be cleared even when the dio fails, or it may affect the following io which are using the same kiocb. What code is re-using

Re: [Ocfs2-devel] [PATCH 1/2] aio: make kiocb-private NUll in init_sync_kiocb()

2012-06-01 Thread Junxiao Bi
On 06/02/2012 04:55 AM, Jeff Moyer wrote: Junxiao Bijunxiao...@oracle.com writes: On 05/31/2012 10:08 PM, Jeff Moyer wrote: Junxiao Bijunxiao...@oracle.com writes: Ocfs2 uses kiocb.*private as a flag of unsigned long size. In commit a11f7e6 ocfs2: serialize unaligned aio, the unaligned

[Ocfs2-devel] [V3]fix ocfs2 aio/dio writing process hang

2012-06-08 Thread Junxiao Bi
V3 changes: - add Cc: sta...@vger.kernel.org in the patch header to align with stable rules - add Acked-by: Jeff Moyer jmo...@redhat.com V2 changes: - update the patch header of the first patch to make it more clear. This patch list fixes an issue about ocfs2 aio/dio write process hang. The

[Ocfs2-devel] [PATCH v3 1/2] aio: make kiocb-private NUll in init_sync_kiocb()

2012-06-08 Thread Junxiao Bi
in an aligned dio. And this will cause OCFS2_I(inode)-ip_unaligned_aio decreased to -1 in ocfs2_dio_end_io(), thus the following unaligned dio will hang forever at ocfs2_aiodio_wait() in ocfs2_file_aio_write(). Signed-off-by: Junxiao Bi junxiao...@oracle.com Cc: sta...@vger.kernel.org Acked

[Ocfs2-devel] [PATCH v3 2/2] ocfs2: clear unaligned io flag when dio fails

2012-06-08 Thread Junxiao Bi
The unaligned io flag is set in the kiocb when an unaligned dio is issued, it should be cleared even when the dio fails, or it may affect the following io which are using the same kiocb. Signed-off-by: Junxiao Bi junxiao...@oracle.com Cc: sta...@vger.kernel.org --- fs/ocfs2/file.c |4 +++- 1

[Ocfs2-devel] [PATCH v4 1/2] aio: make kiocb-private NUll in init_sync_kiocb()

2012-06-27 Thread Junxiao Bi
in an aligned dio. And this will cause OCFS2_I(inode)-ip_unaligned_aio decreased to -1 in ocfs2_dio_end_io(), thus the following unaligned dio will hang forever at ocfs2_aiodio_wait() in ocfs2_file_aio_write(). Signed-off-by: Junxiao Bi junxiao...@oracle.com Cc: sta...@vger.kernel.org Acked

[Ocfs2-devel] [V4]fix ocfs2 aio/dio writing process hang

2012-06-27 Thread Junxiao Bi
V4 changes: add Acked-by: Joel Becker jl...@evilplan.org V3 changes: - add Cc: sta...@vger.kernel.org in the patch header to align with stable rules - add Acked-by: Jeff Moyer jmo...@redhat.com V2 changes: - update the patch header of the first patch to make it more clear. This patch list

[Ocfs2-devel] [PATCH v4 2/2] ocfs2: clear unaligned io flag when dio fails

2012-06-27 Thread Junxiao Bi
The unaligned io flag is set in the kiocb when an unaligned dio is issued, it should be cleared even when the dio fails, or it may affect the following io which are using the same kiocb. Signed-off-by: Junxiao Bi junxiao...@oracle.com Cc: sta...@vger.kernel.org --- fs/ocfs2/file.c |4 +++- 1

Re: [Ocfs2-devel] [V4]fix ocfs2 aio/dio writing process hang

2012-06-28 Thread Junxiao Bi
On 06/28/2012 04:34 PM, Joel Becker wrote: Btw, do you want me to pull these through the ocfs2 tree, or are you sending them along yourself? Please help pull these, great thanks. Joel On Wed, Jun 27, 2012 at 05:09:53PM +0800, Junxiao Bi wrote: V4 changes: add Acked-by: Joel Becker jl

Re: [Ocfs2-devel] [PATCH v4 1/2] aio: make kiocb-private NUll in init_sync_kiocb()

2012-06-29 Thread Junxiao Bi
On 06/29/2012 05:22 PM, Joel Becker wrote: On Thu, Jun 28, 2012 at 03:39:56PM -0700, Andrew Morton wrote: On Wed, 27 Jun 2012 17:09:54 +0800 Junxiao Bi junxiao...@oracle.com wrote: Ocfs2 uses kiocb.*private as a flag of unsigned long size. In commit a11f7e6 ocfs2: serialize unaligned aio

Re: [Ocfs2-devel] [PATCH v4 1/2] aio: make kiocb-private NUll in init_sync_kiocb()

2012-06-29 Thread Junxiao Bi
On 06/29/2012 06:29 PM, Andrew Morton wrote: On Fri, 29 Jun 2012 18:17:11 +0800 Junxiao Bi junxiao...@oracle.com wrote: Andrew had merged this patch to his tree. Do you like the second patch ocfs2: clear unaligned io flag when dio fails? Please go ahead with your patchset for now. I'll feed

Re: [Ocfs2-devel] [PATCH v4 1/2] aio: make kiocb-private NUll in init_sync_kiocb()

2012-06-29 Thread Junxiao Bi
On 06/29/2012 05:22 PM, Joel Becker wrote: On Thu, Jun 28, 2012 at 03:39:56PM -0700, Andrew Morton wrote: On Wed, 27 Jun 2012 17:09:54 +0800 Junxiao Bi junxiao...@oracle.com wrote: Ocfs2 uses kiocb.*private as a flag of unsigned long size. In commit a11f7e6 ocfs2: serialize unaligned aio

Re: [Ocfs2-devel] [PATCH v4 2/2] ocfs2: clear unaligned io flag when dio fails

2012-07-04 Thread Junxiao Bi
On 07/04/2012 03:34 PM, Joel Becker wrote: On Wed, Jun 27, 2012 at 05:09:55PM +0800, Junxiao Bi wrote: The unaligned io flag is set in the kiocb when an unaligned dio is issued, it should be cleared even when the dio fails, or it may affect the following io which are using the same kiocb

[Ocfs2-devel] [PATCH] ocfs2: break useless while loop

2012-07-11 Thread Junxiao Bi
Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/dlm/dlmmaster.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 005261c..1fadc39 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c

[Ocfs2-devel] [PATCH] ocfs2: fix dlm lock migration crash

2012-07-17 Thread Junxiao Bi
In the target node of the dlm lock migration, the logic to find the local dlm lock is wrong, it shouldn't change the loop variable lock in the list_for_each_entry loop. This will cause a NULL-pointer accessing crash. Signed-off-by: Junxiao Bi junxiao...@oracle.com Cc: sta...@vger.kernel.org

Re: [Ocfs2-devel] [PATCH] ocfs2: fix dlm lock migration crash

2012-07-17 Thread Junxiao Bi
Hi Sunil, On 07/18/2012 03:49 AM, Sunil Mushran wrote: On Tue, Jul 17, 2012 at 12:10 AM, Junxiao Bi junxiao...@oracle.com mailto:junxiao...@oracle.com wrote: In the target node of the dlm lock migration, the logic to find the local dlm lock is wrong, it shouldn't change the loop

[Ocfs2-devel] [PATCH V2] ocfs2: break useless while loop

2012-08-09 Thread Junxiao Bi
Signed-off-by: Junxiao Bi junxiao...@oracle.com Acked-by: Sunil Mushran sunil.mush...@gmail.com --- fs/ocfs2/dlm/dlmmaster.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 005261c..1fadc39 100644 --- a/fs/ocfs2

Re: [Ocfs2-devel] [PATCH V2] ocfs2: break useless while loop

2012-08-09 Thread Junxiao Bi
Hi Joel, Could you merge this patch? On 08/10/2012 01:52 PM, Junxiao Bi wrote: Signed-off-by: Junxiao Bi junxiao...@oracle.com Acked-by: Sunil Mushran sunil.mush...@gmail.com --- fs/ocfs2/dlm/dlmmaster.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/ocfs2

[Ocfs2-devel] [PATCH] ocfs2: unlock super lock if lockres refresh failed

2013-02-21 Thread Junxiao Bi
If lockres refresh failed, the super lock will never be released which will cause some processes on other cluster nodes hung forever. Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/dlmglue.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/ocfs2

[Ocfs2-devel] [PATCH 1/2] ocfs2: xattr: fix inlined xattr reflink

2013-06-20 Thread Junxiao Bi
is adjusted in ocfs2_duplicate_inline_data(), no problem. But for inode with data extent record, its record count isn't adjusted. Fix it, or data extent record and inlined xattr may overwrite each other, then cause data corruption or xattr failure. Cc: sta...@kernel.org Signed-off-by: Junxiao Bi junxiao

Re: [Ocfs2-devel] [PATCH 1/2] ocfs2: xattr: fix inlined xattr reflink

2013-06-20 Thread Junxiao Bi
Hi Jeff, On 06/20/2013 05:01 PM, Jeff Liu wrote: Hi Junxiao, On 06/20/2013 02:17 PM, Junxiao Bi wrote: Inlined xattr shared free space of inode block with inlined data or data extent record, so the size of the later two should be adjusted when inlined xattr is enabled. See

Re: [Ocfs2-devel] [PATCH V2] ocfs2: xattr: fix inlined xattr reflink

2013-06-27 Thread Junxiao Bi
Hi Andrew, On 06/28/2013 07:08 AM, Andrew Morton wrote: On Fri, 21 Jun 2013 09:27:24 +0800 Junxiao Bi junxiao...@oracle.com wrote: Inlined xattr shared free space of inode block with inlined data or data extent record, so the size of the later two should be adjusted when inlined xattr

[Ocfs2-devel] [PATCH V3] ocfs2: xattr: fix inlined xattr reflink

2013-06-27 Thread Junxiao Bi
]--- Cc: sta...@kernel.org Signed-off-by: Junxiao Bi junxiao...@oracle.com Reviewed-by: Jie Liu jeff@oracle.com --- fs/ocfs2/xattr.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 2e3ea30..5b8d944 100644 --- a/fs/ocfs2/xattr.c +++ b

Re: [Ocfs2-devel] [PATCH V3] ocfs2: xattr: fix inlined xattr reflink

2013-07-01 Thread Junxiao Bi
Hi Joel, On 07/02/2013 09:50 AM, Joel Becker wrote: On Tue, Jul 02, 2013 at 09:08:36AM +0800, Junxiao Bi wrote: Hi Joel, On 07/02/2013 06:57 AM, Joel Becker wrote: On Fri, Jun 28, 2013 at 10:56:23AM +0800, Junxiao Bi wrote: Inlined xattr shared free space of inode block with inlined data

[Ocfs2-devel] [PATCH] ocfs2: update inode size after zeroed the hole

2013-07-09 Thread Junxiao Bi
sparse file cksum error. Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/file.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index ff54014..d1264ef 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c

Re: [Ocfs2-devel] [PATCH] ocfs2: update inode size after zeroed the hole

2013-07-11 Thread Junxiao Bi
Hi Younger, Thanks for looking at this. See the comment below. On 07/11/2013 08:42 PM, Younger Liu wrote: On 2013/7/10 14:47, Junxiao Bi wrote: Sometimes, this patch will cause a call trace, see following, this code snippet is referenced from ocfs2_write_end(), I am not familiar with jbd

[Ocfs2-devel] [PATCH V2] ocfs2: update inode size after zeroed the hole

2013-07-11 Thread Junxiao Bi
a wrong md5sum. Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/file.c | 40 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index ff54014..3ce6a8b 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2

[Ocfs2-devel] [PATCH] ocfs2: using i_size_read() to access i_size

2013-07-15 Thread Junxiao Bi
Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/aops.c |2 +- fs/ocfs2/extent_map.c | 10 +- fs/ocfs2/file.c |2 +- fs/ocfs2/ioctl.c|2 +- fs/ocfs2/journal.c |8 fs/ocfs2/move_extents.c |2 +- fs/ocfs2

[Ocfs2-devel] [PATCH RESEND] ocfs2: break useless while loop

2013-08-29 Thread Junxiao Bi
Break the while loop after get the value, or it will waste cpu time. Signed-off-by: Junxiao Bi junxiao...@oracle.com Acked-by: Sunil Mushran sunil.mush...@gmail.com --- fs/ocfs2/dlm/dlmmaster.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/ocfs2/dlm/dlmmaster.c b

[Ocfs2-devel] [PATCH] ocfs2: dlm: fix recovery hung

2014-02-19 Thread Junxiao Bi
DLM_RECO_STATE_FINALIZE flag is cleared. A similar race may happen between new recovery master and normal node which is in dlm_finalize_reco_handler(), also fix it. Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/dlm/dlmrecovery.c | 11 +-- 1 file changed, 9 insertions(+), 2

Re: [Ocfs2-devel] [PATCH] ocfs2: dlm: fix recovery hung

2014-02-19 Thread Junxiao Bi
-node_idx, br-dead_node, thanks wengang 于 2014年02月19日 16:30, Junxiao Bi 写道: There is a race window in dlm_do_recovery() between dlm_remaster_locks() and dlm_reset_recovery() when the recovery master nearly finish the recovery process for a dead node. After the master sends FINALIZE_RECO message

[Ocfs2-devel] [PATCH V2] ocfs2: dlm: fix recovery hung

2014-02-20 Thread Junxiao Bi
Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/dlm/dlmrecovery.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index 7035af0..8179bd9 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm

Re: [Ocfs2-devel] [PATCH] ocfs2: fix dlm lock migration crash

2014-02-24 Thread Junxiao Bi
Hi Srini, On 02/25/2014 07:30 AM, Srinivas Eeda wrote: Junxiao, thanks for looking into this issue. Please see my comment below On 02/24/2014 01:07 AM, Junxiao Bi wrote: Hi, On 07/19/2012 09:59 AM, Sunil Mushran wrote: Different issues. On Wed, Jul 18, 2012 at 6:34 PM, Junxiao Bi junxiao

Re: [Ocfs2-devel] [PATCH] ocfs2: fix dlm lock migration crash

2014-02-24 Thread Junxiao Bi
On 02/25/2014 07:30 AM, Srinivas Eeda wrote: Junxiao, thanks for looking into this issue. Please see my comment below On 02/24/2014 01:07 AM, Junxiao Bi wrote: Hi, On 07/19/2012 09:59 AM, Sunil Mushran wrote: Different issues. On Wed, Jul 18, 2012 at 6:34 PM, Junxiao Bi junxiao

[Ocfs2-devel] [PATCH] ocfs2: dlm: fix lock migration crash

2014-02-25 Thread Junxiao Bi
. Signed-off-by: Junxiao Bi junxiao...@oracle.com Cc: Sunil Mushran sunil.mush...@gmail.com Cc: Srinivas Eeda srinivas.e...@oracle.com Cc: sta...@vger.kernel.org --- fs/ocfs2/dlm/dlmrecovery.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/fs/ocfs2/dlm

Re: [Ocfs2-devel] [PATCH] ocfs2: dlm: fix lock migration crash

2014-02-26 Thread Junxiao Bi
Hi Andrew, On 02/27/2014 08:48 AM, Andrew Morton wrote: On Wed, 26 Feb 2014 15:47:37 +0800 Junxiao Bi junxiao...@oracle.com wrote: This issue was introduced by commit 800deef3 where it replaced list_for_each with list_for_each_entry. The variable lock will point to invalid data if tmpq list

[Ocfs2-devel] [PATCH 0/3] ocfs2: o2net: fix packets lost issue when reconnect

2014-05-14 Thread Junxiao Bi
Hi, After the tcp connection is established between two ocfs2 nodes, an idle timer will be set to check its state periodically, if no messages are received during this time, idle timer will timeout, it will shutdown the connection and try to rebuild, so pending message in tcp queues will be

[Ocfs2-devel] [PATCH 2/3] ocfs2: o2net: set tcp user timeout to max value

2014-05-14 Thread Junxiao Bi
and it will be evicted, if disk heartbeat not timeout and connection idle for a long time, then this means the cluster enters split-brain state, since fence can't happen, we'd better keep the connection and wait network recover. Reviewed-by: Srinivas Eeda srinivas.e...@oracle.com Signed-off-by: Junxiao

[Ocfs2-devel] [PATCH 3/3] ocfs2: quorum: add a log for node not fenced

2014-05-14 Thread Junxiao Bi
For debug use, we can see from the log whether the fence decision is made and why it is not fenced. Reviewed-by: Srinivas Eeda srinivas.e...@oracle.com Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/cluster/quorum.c | 13 +++-- 1 file changed, 11 insertions(+), 2

[Ocfs2-devel] [PATCH 1/3] ocfs2: o2net: don't shutdown connection when idle timeout

2014-05-14 Thread Junxiao Bi
fence dicision is made, the connection survive without lost any messages. Reviewed-by: Srinivas Eeda srinivas.e...@oracle.com Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/cluster/tcp.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git

Re: [Ocfs2-devel] [PATCH 0/3] ocfs2: o2net: fix packets lost issue when reconnect

2014-05-15 Thread Junxiao Bi
Hi Joseph, On 05/15/2014 04:27 PM, Joseph Qi wrote: On 2014/5/15 12:26, Junxiao Bi wrote: Hi, After the tcp connection is established between two ocfs2 nodes, an idle timer will be set to check its state periodically, if no messages are received during this time, idle timer will timeout

Re: [Ocfs2-devel] [PATCH 0/3] ocfs2: o2net: fix packets lost issue when reconnect

2014-05-16 Thread Junxiao Bi
On 05/16/2014 04:05 PM, Joseph Qi wrote: Hi Junxiao, On 2014/5/16 10:19, Junxiao Bi wrote: Hi Joseph, On 05/15/2014 04:27 PM, Joseph Qi wrote: On 2014/5/15 12:26, Junxiao Bi wrote: Hi, After the tcp connection is established between two ocfs2 nodes, an idle timer will be set to check

Re: [Ocfs2-devel] [PATCH 0/3] ocfs2: o2net: fix packets lost issue when reconnect

2014-05-18 Thread Junxiao Bi
On 05/16/2014 05:01 PM, Joseph Qi wrote: On 2014/5/16 16:32, Junxiao Bi wrote: On 05/16/2014 04:05 PM, Joseph Qi wrote: Hi Junxiao, On 2014/5/16 10:19, Junxiao Bi wrote: Hi Joseph, On 05/15/2014 04:27 PM, Joseph Qi wrote: On 2014/5/15 12:26, Junxiao Bi wrote: Hi, After the tcp

Re: [Ocfs2-devel] [PATCH 0/3] ocfs2: o2net: fix packets lost issue when reconnect

2014-06-05 Thread Junxiao Bi
Hi Mark Andrew, Could you help review this patch list? This bug can be saw when network state go bad. It may cause ocfs2 hung forever if some packets lost. With this fix, ocfs2 will recover from hung if network becomes good. Thanks, Junxiao. On 05/15/2014 12:26 PM, Junxiao Bi wrote: Hi

[Ocfs2-devel] [PATCH 1/3] ocfs2: o2net: don't shutdown connection when idle timeout

2014-06-12 Thread Junxiao Bi
...@oracle.com Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/cluster/tcp.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index c6b90e6..76ef3d8 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2

[Ocfs2-devel] ocfs2: o2net: fix packets lost issue when reconnect

2014-06-12 Thread Junxiao Bi
Hi, This patch serial is to fix a possible message lost bug in ocfs2 when network go bad. This bug will cause ocfs2 hung forever even network become good again. The messages may lost in this case. After the tcp connection is established between two nodes, an idle timer will be set to check its

[Ocfs2-devel] [PATCH 3/3] ocfs2: quorum: add a log for node not fenced

2014-06-12 Thread Junxiao Bi
For debug use, we can see from the log whether the fence decision is made and why it is not fenced. Reviewed-by: Srinivas Eeda srinivas.e...@oracle.com Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/cluster/quorum.c | 13 +++-- 1 file changed, 11 insertions(+), 2

Re: [Ocfs2-devel] ocfs2: o2net: fix packets lost issue when reconnect

2014-06-12 Thread Junxiao Bi
Not sure why Joseph Qi is excluded from cc list of git send-email. Cc him. On 06/13/2014 09:48 AM, Junxiao Bi wrote: Hi, This patch serial is to fix a possible message lost bug in ocfs2 when network go bad. This bug will cause ocfs2 hung forever even network become good again. The messages

[Ocfs2-devel] [PATCH] ocfs2: fix journal commit deadlock

2014-07-24 Thread Junxiao Bi
to preserve unlocking order. Signed-off-by: Junxiao Bi junxiao...@oracle.com Cc: sta...@vger.kernel.org Reviewed-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/aops.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c

[Ocfs2-devel] [PATCH] ocfs2: reflink: fix slow unlink for refcounted file

2014-07-24 Thread Junxiao Bi
, the performance will be very low. . ocfs2_remove_btree_range() ocfs2_lock_refcount_tree() --ocfs2_refcount_lock() __ocfs2_cluster_lock() ocfs2_refcount_lock() is costly, move it to ocfs2_commit_truncate() to do lock/unlock once can improve a lot performance. Signed-off-by: Junxiao

Re: [Ocfs2-devel] [PATCH] ocfs2: reflink: fix slow unlink for refcounted file

2014-07-25 Thread Junxiao Bi
(). I think this moving is not safe. thanks, wengang 于 2014年07月25日 13:32, Junxiao Bi 写道: When running ocfs2 test suite multiple nodes reflink stress test, for a 4 nodes cluster, every unlink() for refcounted file needs about 700s. The slow unlink is caused by the contention of refcount tree

[Ocfs2-devel] [PATCH v2] ocfs2: reflink: fix slow unlink for refcounted file

2014-07-25 Thread Junxiao Bi
, the performance will be very low. . ocfs2_remove_btree_range() ocfs2_lock_refcount_tree() --ocfs2_refcount_lock() __ocfs2_cluster_lock() ocfs2_refcount_lock() is costly, move it to ocfs2_commit_truncate() to do lock/unlock once can improve a lot performance. Signed-off-by: Junxiao

Re: [Ocfs2-devel] [PATCH] ocfs2: fix journal commit deadlock

2014-07-29 Thread Junxiao Bi
Hi Andrew, On 07/29/2014 07:40 AM, Andrew Morton wrote: On Thu, 24 Jul 2014 16:58:00 +0800 Junxiao Bi junxiao...@oracle.com wrote: For buffer write, page lock will be got in write_begin and released in write_end, in ocfs2_write_end_nolock(), before it unlock the page in ocfs2_free_write_ctxt

Re: [Ocfs2-devel] [patch 03/10] ocfs2: o2net: don't shutdown connection when idle timeout

2014-08-14 Thread Junxiao Bi
Hi Mark, Thanks for reviewing the patch. See comments below. On 08/14/2014 02:59 AM, Mark Fasheh wrote: On Wed, Aug 06, 2014 at 01:32:04PM -0700, Andrew Morton wrote: From: Junxiao Bi junxiao...@oracle.com Subject: ocfs2: o2net: don't shutdown connection when idle timeout This patch series

Re: [Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-24 Thread Junxiao Bi
Hi Jiufei, Maybe you can consider using PF_FSTRANS flag, set this flag before allocating memory with GFP_KERNEL flag and unset after the allocation. Checking this flag in ocfs2 when trying to free some pages during memory direct reclaim. See an example from upstream commit

Re: [Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-28 Thread Junxiao Bi
On 08/28/2014 04:16 PM, Xue jiufei wrote: Hi Junxiao, On 2014/8/25 9:50, Junxiao Bi wrote: Hi Jiufei, Maybe you can consider using PF_FSTRANS flag, set this flag before allocating memory with GFP_KERNEL flag and unset after the allocation. Checking this flag in ocfs2 when trying to free

Re: [Ocfs2-devel] A deadlock when system do not has sufficient memory

2014-08-29 Thread Junxiao Bi
On 08/29/2014 03:22 PM, Xue jiufei wrote: On 2014/8/29 11:26, Junxiao Bi wrote: On 08/28/2014 04:16 PM, Xue jiufei wrote: Hi Junxiao, On 2014/8/25 9:50, Junxiao Bi wrote: Hi Jiufei, Maybe you can consider using PF_FSTRANS flag, set this flag before allocating memory with GFP_KERNEL flag

Re: [Ocfs2-devel] [PATCH] fs/super.c: do not shrink fs slab during direct memory reclaim

2014-09-02 Thread Junxiao Bi
Hi Jiufei, On 09/02/2014 05:03 PM, Xue jiufei wrote: Hi, Dave On 2014/9/2 7:51, Dave Chinner wrote: On Fri, Aug 29, 2014 at 05:57:22PM +0800, Xue jiufei wrote: The patch trys to solve one deadlock problem caused by cluster fs, like ocfs2. And the problem may happen at least in the below

Re: [Ocfs2-devel] [PATCH] fs/super.c: do not shrink fs slab during direct memory reclaim

2014-09-02 Thread Junxiao Bi
On 09/03/2014 11:10 AM, Dave Chinner wrote: On Wed, Sep 03, 2014 at 09:38:31AM +0800, Junxiao Bi wrote: Hi Jiufei, On 09/02/2014 05:03 PM, Xue jiufei wrote: Hi, Dave On 2014/9/2 7:51, Dave Chinner wrote: On Fri, Aug 29, 2014 at 05:57:22PM +0800, Xue jiufei wrote: The patch trys to solve

[Ocfs2-devel] [PATCH] ocfs2: fix deadlock due to wrong locking order

2014-09-09 Thread Junxiao Bi
at a0120f67 [jbd2] #9 [88100def3cf8] jbd2_journal_commit_transaction at a0121372[jbd2] #10 [88100def3e68] kjournald2 at a0127a86 [jbd2] #11 [88100def3ee8] kthread at 81090db6 #12 [88100def3f48] kernel_thread_helper at 81516284 Signed-off-by: Junxiao

[Ocfs2-devel] [PATCH] ocfs2: don't fire quorum before connection established

2014-09-15 Thread Junxiao Bi
until wrong configure fixed or networking up to continue. Also update the log to guide user where to check when connection is not built for a long time. Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/cluster/tcp.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[Ocfs2-devel] [PATCH v2] ocfs2: don't fire quorum before connection established

2014-09-15 Thread Junxiao Bi
will wait until wrong configure fixed or networking up to continue. Also update the log to guide user where to check when connection is not built for a long time. Signed-off-by: Junxiao Bi junxiao...@oracle.com Reviewed-by: Srinivas Eeda srinivas.e...@oracle.com --- fs/ocfs2/cluster/tcp.c |5

Re: [Ocfs2-devel] [PATCH] ocfs2: fix deadlock due to wrong locking order

2014-09-25 Thread Junxiao Bi
Hi Alex, On 09/24/2014 05:41 PM, alex chen wrote: Hi Junxiao, On 2014/9/10 9:48, Junxiao Bi wrote: For commit ocfs2 journal, ocfs2 journal thread will acquire the mutex osb-journal-j_trans_barrier and wake up jbd2 commit thread, then it will wait until jbd2 commit thread done. In order

Re: [Ocfs2-devel] [PATCH] ocfs2: fix deadlock due to wrong locking order

2014-09-25 Thread Junxiao Bi
On 09/24/2014 04:49 PM, alex chen wrote: Hi, Junxiao: On 2014/9/10 9:48, Junxiao Bi wrote: For commit ocfs2 journal, ocfs2 journal thread will acquire the mutex osb-journal-j_trans_barrier and wake up jbd2 commit thread, then it will wait until jbd2 commit thread done. In order journal mode

[Ocfs2-devel] [PATCH] ocfs2: fix null handle in ocfs2_write_zero_page

2014-09-27 Thread Junxiao Bi
ocfs2_zero_start_ordered_transaction() will return NULL handle in data writeback mode, this should be checked and bypass journal ops, or kernel panic will be triggered. Signed-off-by: Junxiao Bi junxiao...@oracle.com Cc: Alex Chen alex.c...@huawei.com --- fs/ocfs2/file.c |9 ++--- 1 file

[Ocfs2-devel] [PATCH] ocfs2: o2net: fix connect expired

2014-10-29 Thread Junxiao Bi
be established if the first connection request is lost. Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/cluster/tcp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 97de0fb..4d6b645 100644 --- a/fs/ocfs2/cluster

Re: [Ocfs2-devel] [PATCH] ocfs2: o2net: fix connect expired

2014-10-29 Thread Junxiao Bi
sending another connect request, connection to the node will never be built. Thanks, Junxiao. Thanks, --Srini On 10/29/2014 06:41 PM, Junxiao Bi wrote: Set nn_persistent_error to -ENOTCONN will stop reconnect since the stop condition in o2net_start_connect() will be true. stop = (nn

Re: [Ocfs2-devel] [PATCH] ocfs2: o2net: fix connect expired

2014-10-30 Thread Junxiao Bi
, it is only used for idle timeout. Thanks, Junxiao. Thanks, --Srini On 10/29/2014 10:32 PM, Junxiao Bi wrote: Hi Srini, On 10/30/2014 01:16 PM, Srinivas Eeda wrote: Junxiao, can you please describe under what circumstances you saw this problem? My understanding

Re: [Ocfs2-devel] [PATCH] ocfs2: o2net: fix connect expired

2014-10-30 Thread Junxiao Bi
expires, dlm don't need be waken up, just wait network to recover is ok. Also dlm didn't do good work on error wakeup case. Could you add you review-by? Thanks, Junxiao. Thanks, --Srini On 10/30/2014 04:58 AM, Junxiao Bi wrote: - srinivas.e...@oracle.com wrote: Hi Junxiao

[Ocfs2-devel] [PATCH v2] ocfs2: o2net: fix connect expired

2014-10-31 Thread Junxiao Bi
and connect built again to continue. Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/cluster/tcp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 97de0fb..4d6b645 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b

Re: [Ocfs2-devel] [PATCH] ocfs2: do not set OCFS2_LOCK_UPCONVERT_FINISHING if nonblocking lock can not be granted at once

2014-11-06 Thread Junxiao Bi
Hi Jiufei, On 11/07/2014 11:41 AM, Xue jiufei wrote: Function ocfs2_readpages() use nonblocking flag to avoid page lock inversion. It will trigger cluster hang because that flag OCFS2_LOCK_UPCONVERT_FINISHING is not cleared if nonblocking lock cannot be granted at once. The flag would prevent

Re: [Ocfs2-devel] [PATCH] ocfs2: do not set OCFS2_LOCK_UPCONVERT_FINISHING if nonblocking lock can not be granted at once

2014-11-06 Thread Junxiao Bi
On 11/07/2014 02:36 PM, Xue jiufei wrote: Hi Junxiao On 2014/11/7 13:54, Junxiao Bi wrote: Hi Jiufei, On 11/07/2014 11:41 AM, Xue jiufei wrote: Function ocfs2_readpages() use nonblocking flag to avoid page lock inversion. It will trigger cluster hang because that flag

Re: [Ocfs2-devel] [PATCH] ocfs2: do not set OCFS2_LOCK_UPCONVERT_FINISHING if nonblocking lock can not be granted at once

2014-11-09 Thread Junxiao Bi
On 11/07/2014 05:27 PM, Xue jiufei wrote: On 2014/11/7 15:03, Junxiao Bi wrote: On 11/07/2014 02:36 PM, Xue jiufei wrote: Hi Junxiao On 2014/11/7 13:54, Junxiao Bi wrote: Hi Jiufei, On 11/07/2014 11:41 AM, Xue jiufei wrote: Function ocfs2_readpages() use nonblocking flag to avoid page

Re: [Ocfs2-devel] [PATCH] ocfs2: do not set OCFS2_LOCK_UPCONVERT_FINISHING if nonblocking lock can not be granted at once

2014-11-10 Thread Junxiao Bi
On 11/11/2014 09:41 AM, Xue jiufei wrote: Hi JunXiao, On 2014/11/10 9:52, Junxiao Bi wrote: On 11/07/2014 05:27 PM, Xue jiufei wrote: On 2014/11/7 15:03, Junxiao Bi wrote: On 11/07/2014 02:36 PM, Xue jiufei wrote: Hi Junxiao On 2014/11/7 13:54, Junxiao Bi wrote: Hi Jiufei, On 11/07/2014

[Ocfs2-devel] [PATCH 1/2] ocfs2: fix uninitialized variable access

2014-12-24 Thread Junxiao Bi
Variable why is not yet initialized at line 615, fix it. Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/file.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 3950693..245db4f 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2

[Ocfs2-devel] [PATCH 2/2] ocfs2: fix wrong comment

2014-12-24 Thread Junxiao Bi
O2NET_CONN_IDLE_DELAY is not defined, connection attempts will not be canceled due to timeout. Signed-off-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/cluster/tcp_internal.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/ocfs2/cluster/tcp_internal.h b

Re: [Ocfs2-devel] [PATCH 0/9 v6] ocfs2: support append O_DIRECT write

2015-01-20 Thread Junxiao Bi
Hi Joseph, Did this version make any performance improvement with v5? I tested v5, and it didn't improve performance with original buffer write + sync. Thanks, Junxiao. On 01/20/2015 04:01 PM, Joseph Qi wrote: Currently in case of append O_DIRECT write (block not allocated yet), ocfs2 will

Re: [Ocfs2-devel] [PATCH 0/9 v6] ocfs2: support append O_DIRECT write

2015-01-21 Thread Junxiao Bi
On 01/20/2015 05:00 PM, Joseph Qi wrote: Hi Junxiao, On 2015/1/20 16:26, Junxiao Bi wrote: Hi Joseph, Did this version make any performance improvement with v5? I tested v5, and it didn't improve performance with original buffer write + sync. No performance difference between these two

Re: [Ocfs2-devel] [PATCH 0/9 v6] ocfs2: support append O_DIRECT write

2015-01-21 Thread Junxiao Bi
On 01/22/2015 11:54 AM, Joseph Qi wrote: On 2015/1/22 10:10, Junxiao Bi wrote: On 01/20/2015 05:00 PM, Joseph Qi wrote: Hi Junxiao, On 2015/1/20 16:26, Junxiao Bi wrote: Hi Joseph, Did this version make any performance improvement with v5? I tested v5, and it didn't improve performance

Re: [Ocfs2-devel] [PATCH 1/2] ocfs2: fix uninitialized variable access

2015-01-06 Thread Junxiao Bi
On 01/07/2015 08:09 AM, Andrew Morton wrote: On Thu, 25 Dec 2014 13:52:16 +0800 Junxiao Bi junxiao...@oracle.com wrote: Variable why is not yet initialized at line 615, fix it. ... --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -569,7 +569,7 @@ static int __ocfs2_extend_allocation(struct

Re: [Ocfs2-devel] [PATCH] ocfs2: check if the ocfs2 lock resource be initialized before calling ocfs2_dlm_lock

2015-04-21 Thread Junxiao Bi
On 04/21/2015 10:54 AM, alex chen wrote: Hi Junxiao, On 2015/4/16 15:28, Junxiao Bi wrote: Hi Alex, On 03/30/2015 11:22 AM, alex chen wrote: If ocfs2 lockres has not been initialized before calling ocfs2_dlm_lock, the lock won't be dropped and then will lead umount hung. The case

Re: [Ocfs2-devel] [PATCH V2] ocfs2: return error while ocfs2_figure_merge_contig_type failing

2015-04-21 Thread Junxiao Bi
. Reviewed-by: Junxiao Bi junxiao...@oracle.com --- fs/ocfs2/alloc.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 044158b..2d07b38 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -4313,11

Re: [Ocfs2-devel] [RFC] Online File(system) check

2015-04-29 Thread Junxiao Bi
On 04/28/2015 05:32 AM, Goldwyn Rodrigues wrote: On popular demand, here is an RFC. If you think there is a better way to communicate with the kernel module for the check, please let me know. Intro - OCFS2 is often used in high-availaibility systems. However, ocfs2 converts the

Re: [Ocfs2-devel] [PATCH] ocfs2/dlm: fix race between purge and get lock resource

2015-04-30 Thread Junxiao Bi
On 04/29/2015 08:51 AM, Joseph Qi wrote: Hi Andrew, On 2015/4/29 4:32, Andrew Morton wrote: On Sat, 25 Apr 2015 15:05:15 +0800 Joseph Qi joseph...@huawei.com wrote: There is a race between purge and get lock resource, which will lead to ast unfinished and system hung. The case is described

Re: [Ocfs2-devel] [PATCH v2] ocfs2/dlm: fix race between purge and get lock resource

2015-04-30 Thread Junxiao Bi
On 04/30/2015 03:04 PM, Joseph Qi wrote: Hi Junxiao, On 2015/4/30 14:16, Junxiao Bi wrote: On 04/25/2015 06:44 PM, Joseph Qi wrote: There is a race between purge and get lock resource, which will lead to ast unfinished and system hung. The case is described below: mkdir

[Ocfs2-devel] [PATCH] ocfs2: dlm: fix race between purge and get lock resource

2015-04-30 Thread Junxiao Bi
); ... spin_unlock(tmpres-spinlock); } } Signed-off-by: Junxiao Bi junxiao...@oracle.com Cc: Joseph Qi joseph...@huawei.com Cc: sta...@vger.kernel.org --- fs/ocfs2/dlm/dlmmaster.c | 13 + 1 file changed, 13 insertions(+) diff --git a/fs/ocfs2

Re: [Ocfs2-devel] [RFC] Online File(system) check

2015-05-03 Thread Junxiao Bi
On 05/02/2015 08:45 PM, Goldwyn Rodrigues wrote: On 04/29/2015 02:59 AM, Junxiao Bi wrote: On 04/28/2015 05:32 AM, Goldwyn Rodrigues wrote: On popular demand, here is an RFC. If you think there is a better way to communicate with the kernel module for the check, please let me know

Re: [Ocfs2-devel] [PATCH v2] ocfs2/dlm: fix race between purge and get lock resource

2015-04-30 Thread Junxiao Bi
On 04/25/2015 06:44 PM, Joseph Qi wrote: There is a race between purge and get lock resource, which will lead to ast unfinished and system hung. The case is described below: mkdir dlm_thread

Re: [Ocfs2-devel] [PATCH 1/1] automated tool detected uninitialized variable use in ocfs2_local_alloc_find_clear_bits

2015-04-15 Thread Junxiao Bi
Hi Tariq, This have been fixed by upstream commit 023d4ea358494ccfeb37abfe5b0fd01b45a6051c (ocfs2: fix possible uninitialized variable access). Thanks, Junxiao. On 04/11/2015 06:44 AM, Tariq Saeed wrote: Orabug: 19060842 In ocfs2_local_alloc_find_clear_bits(), local int numbits is used

Re: [Ocfs2-devel] [PATCH 2/2] ocfs2_iop_set/get_acl() are also called from the VFS so we must take inode lock

2015-04-16 Thread Junxiao Bi
Hi Tariq, On 04/04/2015 05:46 AM, Tariq Saeed wrote: Orabug: 20189959 This bug in mainline code is pointed out by Mark Fasheh. When ocfs2_iop_set_acl and ocfs2_iop_ge_acl are entered from VFS layer, inode lock is not held. This seems to be regression from older kernels. The patch is to

Re: [Ocfs2-devel] [PATCH] ocfs2: check if the ocfs2 lock resource be initialized before calling ocfs2_dlm_lock

2015-04-16 Thread Junxiao Bi
Hi Alex, On 03/30/2015 11:22 AM, alex chen wrote: If ocfs2 lockres has not been initialized before calling ocfs2_dlm_lock, the lock won't be dropped and then will lead umount hung. The case is described below: ocfs2_mknod ocfs2_mknod_locked __ocfs2_mknod_locked

Re: [Ocfs2-devel] [PATCH 1/2] BUG_ON(lockres-l_level != DLM_LOCK_EX !checkpointed) tripped in ocfs2_ci_checkpointed

2015-04-16 Thread Junxiao Bi
in ocfs2_set_acl, another cluster node can get in between, execute another setattr, overwriting the one in progress on this node, resulting in a mode acl size combo that is a mix of the two. Good explanation. Reviewed-by: Junxiao Bi junxiao...@oracle.com Thanks, Junxiao. Signed-off-by: Tariq

Re: [Ocfs2-devel] [PATCH] ocfs2: remove OCFS2_IOCB_SEM lock type in direct io

2015-05-19 Thread Junxiao Bi
OCFS2_IOCB_SEM lock type needs to be removed. Any comments are appreciated, thanks! -- Weiwei Wang Signed-off-by: Weiwei Wang wangww...@huawei.com Looks fine. Reviewed-by: Junxiao Bi junxiao...@oracle.com Thanks, Junxiao. --- fs/ocfs2/aops.c | 3 --- fs

Re: [Ocfs2-devel] NULL pointer dereference in function ocfs2_abort_trigger

2015-05-19 Thread Junxiao Bi
On 05/18/2015 02:14 PM, Xue jiufei wrote: Hi all, Function ocfs2_abort_trigger() use bh-b_assoc_map to get super block. But I cannot find any function to set bh-b_assoc_map in ocfs2. So it will trigger NULL pointer dereference while calling this function. I am wonder that whether function

Re: [Ocfs2-devel] [PATCH v2] ocfs2: do not BUG if jbd2_journal_dirty_metadata fails

2015-05-20 Thread Junxiao Bi
On 05/12/2015 09:53 AM, Joseph Qi wrote: jbd2_journal_dirty_metadata may fail. Currently it cannot take care of non zero return value and just BUG in ocfs2_journal_dirty. This patch is aborting the handle and journal instead of BUG. Signed-off-by: Joseph Qi joseph...@huawei.com Cc:

Re: [Ocfs2-devel] [PATCH v2] ocfs2: do not BUG if jbd2_journal_dirty_metadata fails

2015-05-20 Thread Junxiao Bi
On 05/20/2015 06:25 PM, Joseph Qi wrote: On 2015/5/20 16:22, Junxiao Bi wrote: On 05/12/2015 09:53 AM, Joseph Qi wrote: jbd2_journal_dirty_metadata may fail. Currently it cannot take care of non zero return value and just BUG in ocfs2_journal_dirty. This patch is aborting the handle

Re: [Ocfs2-devel] [PATCH v2] ocfs2: do not BUG if jbd2_journal_dirty_metadata fails

2015-05-20 Thread Junxiao Bi
On 05/21/2015 08:49 AM, Joseph Qi wrote: On 2015/5/20 19:09, Junxiao Bi wrote: On 05/20/2015 06:25 PM, Joseph Qi wrote: On 2015/5/20 16:22, Junxiao Bi wrote: On 05/12/2015 09:53 AM, Joseph Qi wrote: jbd2_journal_dirty_metadata may fail. Currently it cannot take care of non zero return value

  1   2   3   >