Re: [Ocfs2-devel] [PATCH] ocfs2: ocfs2_inode_lock_tracker does not distinguish lock level

2018-05-10 Thread Gang He
process 2 ocfs2_inode_lock_tracker(ex=0) <== ocfs2_inode_lock_tracker(ex=1) ocfs2_inode_lock_tracker(ex=1) Signed-off-by: Larry Chen <lc...@suse.com> Reviewed-by: Gang He <g...@sus

Re: [Ocfs2-devel] [PATCH] ocfs2: clean up redundant function declarations

2018-04-22 Thread Gang He
Reviewed-by: Gang He <g...@suse.com> Thanks Gang >>> > The function ocfs2_extend_allocation has been deleted, clean up its > declaration. > > Fixes: 964f14a0d350 ("ocfs2: clean up some dead code") > > Signed-off-by: Jia Guo <guoji...@huawei.co

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

2018-04-10 Thread Gang He
Hi Changwei, The code change just works around the problem, but theoretically the IOCB object should not be freed before which is handled. Anyway, if we can find the root cause behind via some way (e.g. inject delay in some place), the result is more perfect. Thanks Gang >>> > Hi Jun, >

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

2018-03-28 Thread Gang He
Hi Changwei, >>> > Hi Gang, > > On 2018/3/29 10:36, Gang He wrote: >> Hello Changwei, >> >> >> Do you have the related crash backtrace? > This patch has been pending in my tree for quite a long time and sadly I > can't > find the b

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

2018-03-28 Thread Gang He
Hello Changwei, Do you have the related crash backtrace? Maybe I feel that new adding check is not necessary. since the below code has make sure all buffer head is NOT NULL before reading block. 216 ocfs2_metadata_cache_io_lock(ci); 217 for (i = 0 ; i < nr ; i++) { 218

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

2018-02-25 Thread Gang He
Hi Changwei, The code change looks OK, but maybe these code is still useful for temporary debugging? Thanks Gang >>> > The two functions are no longer used. > > Signed-off-by: Changwei Ge > --- > fs/ocfs2/suballoc.c | 49

Re: [Ocfs2-devel] [PATCH] ocfs2: keep the trace point consistent with the function name

2018-02-13 Thread Gang He
-by: Jun Piao <piao...@huawei.com> Reviewed-by: Yiwen Jiang <jiangyi...@huawei.com> Reviewed-by: Alex Chen <alex.c...@huawei.com> Reviewed-by: Gang He <g...@suse.com> --- fs/ocfs2/aops.h| 2 +- fs/ocfs2/file.c| 8 fs/ocfs2/ocfs2_trace.h | 6 +++---

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

2018-01-25 Thread Gang He
r. > > thanks, > Jun > > On 2018/1/25 16:40, Gang He wrote: >> Hi Jun, >> >> If we return -EIO here, what is the consequence? >> make the journal aborted and file system will become read-only? >> >> Thanks >> Gang >> >> >

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

2018-01-25 Thread Gang He
Hi Jun, If we return -EIO here, what is the consequence? make the journal aborted and file system will become read-only? Thanks Gang >>> > 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

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

2018-01-25 Thread Gang He
Reviewed-by: Gang He <g...@suse.com> Thanks Gang >>> > 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

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

2018-01-23 Thread Gang He
ill look as our expectation. Thanks Gang > > Thanks, > Changwei > > > On 2018/1/24 14:30, Gang He wrote: >> Hello Guys, >> >> I met a ocfs2 hang issue when running on Multi-nodes Refcount Block Group > Test on three nodes cluster, this hang issue can n

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

2018-01-23 Thread Gang He
Hello Guys, I met a ocfs2 hang issue when running on Multi-nodes Refcount Block Group Test on three nodes cluster, this hang issue can not reproduced each time, but it looks there is a bug in dlmglue layer. The bug symptom looks as below, Node1: ocfs2te+ 2403 2372 2403 01 Jan18 ?

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

2018-01-15 Thread Gang He
Add ocfs2_overwrite_io function, which is used to judge if overwrite allocated blocks, otherwise, the write will bring extra block allocation overhead. Reviewed-by: Alex Chen <alex.c...@huawei.com> Signed-off-by: Gang He <g...@suse.com> --- fs/ocfs2/exten

[Ocfs2-devel] [PATCH v4 3/3] ocfs2: nowait aio support

2018-01-15 Thread Gang He
Return -EAGAIN if any of the following checks fail for direct I/O with nowait flag: Can not get the related locks immediately, Blocks are not allocated at the write location, it will trigger block allocation, this will block IO operations. Signed-off-by: Gang He <g...@suse.com> --- fs

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

2018-01-15 Thread Gang He
Add ocfs2_try_rw_lock and ocfs2_try_inode_lock functions, which will be used in non-block IO scenarios. Reviewed-by: Alex Chen <alex.c...@huawei.com> Signed-off-by: Gang He <g...@suse.com> --- fs/ocfs2/dlmglue.c | 21 + fs/ocfs2/dlmglue.h | 4 2 files

[Ocfs2-devel] [PATCH v4 0/3] ocfs2: add nowait aio support

2018-01-15 Thread Gang He
to the upper code, move invoking ocfs2_overwrite_io() function from ocfs2_file_write_iter() to ocfs2_prepare_inode_for_write(), this change can combine acquiring the related locks. Gang He (3): ocfs2: add ocfs2_try_rw_lock and ocfs2_try_inode_lock ocfs2: add ocfs2_overwrite_io function ocfs2

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

2018-01-14 Thread Gang He
Hi Zhonghua, >From you describe, the issue is reproducible. I suggest you to trigger a core dump when you find the threads meet a dead lock, the crash dump is most convincing. Then, you can use crash command to list the related threads/backtraces/lock variables in the patch description. it is

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

2018-01-11 Thread Gang He
-by: Yiwen Jiang <jiangyi...@huawei.com> Reviewed-by: Gang He <g...@suse.com> > --- > fs/ocfs2/xattr.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c > index 5fdf269..439f567 100644 > --- a/fs/ocfs2/xattr.c > +++ b/fs

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

2018-01-10 Thread Gang He
>>> > 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:

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

2018-01-10 Thread Gang He
>>> > 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:

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

2018-01-10 Thread Gang He
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] [PATCH v2 2/2] ocfs2: add trimfs lock to avoid duplicated trims in cluster

2018-01-10 Thread Gang He
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

Re: [Ocfs2-devel] [PATCH v3 3/3] ocfs2: nowait aio support

2018-01-10 Thread Gang He
Hi Alex, >>> > Hi Gang, > > On 2017/12/28 18:07, Gang He wrote: >> Return -EAGAIN if any of the following checks fail for >> direct I/O with nowait flag: >> Can not get the related locks immediately, >> Blocks are not allocated at the write loc

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

2018-01-10 Thread Gang He
Hi Changwei, >>> > On 2018/1/10 18:14, Gang He wrote: >> Hi Changwei, >> >> >>>>> >>> On 2018/1/10 17:05, Gang He wrote: >>>> Hi Changwei, >>>> >>>> >>>>>>> >>>>&g

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

2018-01-10 Thread Gang He
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 &

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

2018-01-10 Thread Gang He
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 scheduled fs

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

2018-01-10 Thread Gang He
Hi Changwei, >>> > 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 <g...@suse.

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

2018-01-05 Thread Gang He
Hi Andrew, >>> Andrew Morton <a...@linux-foundation.org> 01/06/18 4:50 AM >>> On Thu, 04 Jan 2018 23:31:12 -0700 "Gang He" <g...@suse.com> wrote: > Happy new year. > Could you help to pick up this patch, which is used to fix a old patch >

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

2018-01-03 Thread Gang He
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 scheduled fs

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

2018-01-02 Thread Gang He
Hi Alex, >>> > Hi Gang, > > On 2017/12/28 18:07, Gang He wrote: >> Add ocfs2_overwrite_io function, which is used to judge if >> overwrite allocated blocks, otherwise, the write will bring extra >> block allocation overhead. >> >> Signed-off

[Ocfs2-devel] [PATCH v3 0/3] ocfs2: add nowait aio support

2017-12-28 Thread Gang He
. Gang He (3): ocfs2: add ocfs2_try_rw_lock and ocfs2_try_inode_lock ocfs2: add ocfs2_overwrite_io function ocfs2: nowait aio support fs/ocfs2/dir.c | 2 +- fs/ocfs2/dlmglue.c | 41 +++--- fs/ocfs2/dlmglue.h | 6 +++- fs/ocfs2/extent_map.c | 45

[Ocfs2-devel] [PATCH v3 3/3] ocfs2: nowait aio support

2017-12-28 Thread Gang He
Return -EAGAIN if any of the following checks fail for direct I/O with nowait flag: Can not get the related locks immediately, Blocks are not allocated at the write location, it will trigger block allocation, this will block IO operations. Signed-off-by: Gang He <g...@suse.com> --- fs

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

2017-12-28 Thread Gang He
Add ocfs2_overwrite_io function, which is used to judge if overwrite allocated blocks, otherwise, the write will bring extra block allocation overhead. Signed-off-by: Gang He <g...@suse.com> --- fs/ocfs2/extent_map.c | 45 + fs/ocfs2/extent_map.

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

2017-12-27 Thread Gang He
:04:12 CST 2017 multi_mmap..Passed. Runtime 487 seconds. Fixes: 1cce4df04f37 ("ocfs2: do not lock/unlock() inode DLM lock") Signed-off-by: Gang He <g...@suse.com> --- fs/ocfs2/dlmglue.c | 9 + 1 file changed, 9 insertions(+) diff --git a/fs/ocfs2/dlmglue.c b/fs/ocf

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

2017-12-27 Thread Gang He
lock immediately here. In fact, this patch does NOT add new code, just revert the old patch 1cce4df04f37, and add more clear comments in the front of these two lines code. Thanks Gang > > thanks, > Jun > > On 2017/12/28 10:11, Gang He wrote: >> Hi Jun, >> >> &

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

2017-12-27 Thread Gang He
Hi Alex, >>> > Hi Gang, > > On 2017/12/27 18:37, Gang He wrote: >> Hi Jun, >> >> >>>>> >>> Hi Gang, >>> >>> Do you mean that too many retrys in loop cast losts of CPU-time and >>> block page-fault interr

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

2017-12-27 Thread Gang He
> Jun > > On 2017/12/27 18:37, Gang He wrote: >> Hi Jun, >> >> >>>>> >>> 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 dela

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

2017-12-27 Thread Gang He
patch 1cce4df04f37 ("ocfs2: do not lock/unlock() inode DLM lock"), before that patch, the code is the same, this patch can be considered to revert that patch, except adding more clear comments. Thanks Gang > > thanks, > Jun > > On 2017/12/27 17:29, Gang

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

2017-12-27 Thread Gang He
: R10: 0483 R11: 7fa75ded61b0 R12: 7fa75e90a770 R13: 000e R14: 1770 R15: Fixes: 1cce4df04f37 ("ocfs2: do not lock/unlock() inode DLM lock") Signed-off-by: Gang He <g...@suse.com> --- fs/ocfs2/dlmglue.c | 9 +

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

2017-12-26 Thread Gang He
a patch for 'mount.ocfs2' too. >> >> Signed-off-by: Jun Piao <piao...@huawei.com> >> Reviewed-by: Alex Chen <alex.c...@huawei.com> > Looks good to me. > Reviewed-by: Joseph Qi <jiangqi...@gmail.com> Reviewed-by: Gang He <g...@suse.com> > >>

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

2017-12-25 Thread Gang He
Hi Piaojun, Just one quick question, if the file system is read-only, this can make ocfs2_get_system_file_inode() function invoke failure? If ture, I think this code change make sense. Thanks Gang >>> > If metadata is corrupted such as 'invalid inode block', we will get > failed by calling

Re: [Ocfs2-devel] [patch 10/11] ocfs2: add ocfs2_overwrite_io()

2017-12-21 Thread Gang He
Hi Alex, Sorry for replaying your mail so late. >>> > Hi Gang, > > On 2017/12/1 6:24, a...@linux-foundation.org wrote: >> From: Gang He <g...@suse.com> >> Subject: ocfs2: add ocfs2_overwrite_io() >> >> Add ocfs2_overwrite_io(), which i

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

2017-12-18 Thread Gang He
>>> > On 2017/12/19 10:35, Gang He wrote: >> Hi Changwei, >> >> >>>>> >>> Before ocfs2 supporting allocating clusters while doing append-dio, all > append >>> dio will fall back to buffer io to allocate clusters firstly. Also

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

2017-12-18 Thread Gang He
Hi Changwei, >>> > 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, writing to file hole will leverage

Re: [Ocfs2-devel] [patch 11/11] ocfs2: nowait aio support

2017-12-17 Thread Gang He
>>> > Hi Gang, > > On 2017/12/1 6:24, a...@linux-foundation.org wrote: >> From: Gang He <g...@suse.com> >> Subject: ocfs2: nowait aio support >> >> Return EAGAIN if any of the following checks fail for direct I/O: >> >>

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

2017-12-13 Thread Gang He
on a shared disk. Signed-off-by: Gang He <g...@suse.com> --- fs/ocfs2/alloc.c | 44 1 file changed, 44 insertions(+) diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index ab5105f..5c9c3e2 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -7382,6 +

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

2017-12-13 Thread Gang He
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.com> --- fs/ocfs2/dlmglue.c | 86 + fs/ocfs2/dlmglue.h | 29 +++

Re: [Ocfs2-devel] [PATCH] ocfs2: using the OCFS2_XATTR_ROOT_SIZE macro in ocfs2_reflink_xattr_header()

2017-12-10 Thread Gang He
>>> > Using the OCFS2_XATTR_ROOT_SIZE macro improves the readability of the code. > > Signed-off-by: Alex Chen <alex.c...@huawei.com> > Reviewed-by: Jun Piao <piao...@huawei.com> Reviewed-by: Gang He <g...@suse.com> > --- > fs/ocfs2/xattr.

Re: [Ocfs2-devel] [PATCH] ocfs2: add trimfs dlm lock

2017-12-07 Thread Gang He
Hello Andrew and All, >>> Andrew Morton <a...@linux-foundation.org> 12/08/17 7:34 AM >>> On Thu, 7 Dec 2017 21:21:58 +0800 Gang He <g...@suse.com> wrote: > As you know, ocfs2 has support trim the underlying disk via > fstrim command. But there is a problem,

[Ocfs2-devel] [PATCH] ocfs2: add trimfs dlm lock

2017-12-07 Thread Gang He
wasteful for CPU and IO consumption. Then, we introduce a trimfs dlm lock, which will make only one fstrim command is running on the shared disk among the cluster, the other fstrim command should be returned with -EBUSY errno. Signed-off-by: Gang He <g...@suse.com> --- fs/ocfs2/alloc.c

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

2017-11-29 Thread Gang He
Hi Changwei, >>> > Hi Gang, > > On 2017/11/30 10:45, Gang He wrote: >> Hello Changwei, >> >> >>>>> >>> On 2017/11/29 16:38, Gang He wrote: >>>> Add ocfs2_try_rw_lock and ocfs2_try_inode_lock functions, which >>

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

2017-11-29 Thread Gang He
Hello Changwei, >>> > On 2017/11/29 16:38, 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 <g...@suse.com> >> --- >> fs/ocfs2/dlmglu

[Ocfs2-devel] [PATCH v2 0/3] ocfs2: add nowait aio support

2017-11-29 Thread Gang He
can be returned to the upper code, move invoking ocfs2_overwrite_io() function from ocfs2_file_write_iter() to ocfs2_prepare_inode_for_write(), this change can combine acquiring the related locks. Gang He (3): ocfs2: add ocfs2_try_rw_lock and ocfs2_try_inode_lock ocfs2: add ocfs2_overwrite_io

[Ocfs2-devel] [PATCH v2 3/3] ocfs2: nowait aio support

2017-11-29 Thread Gang He
Return -EAGAIN if any of the following checks fail for direct I/O with nowait flag: Can not get the related locks immediately, Blocks are not allocated at the write location, it will trigger block allocation, this will block IO operations. Signed-off-by: Gang He <g...@suse.com> --- fs

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

2017-11-29 Thread Gang He
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 <g...@suse.com> --- fs/ocfs2/dlmglue.c | 21 + fs/ocfs2/dlmglue.h | 4 2 files changed, 25 insertions(+) diff --git a/fs/ocfs2/dlmglue.

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

2017-11-29 Thread Gang He
Add ocfs2_overwrite_io function, which is used to judge if overwrite allocated blocks, otherwise, the write will bring extra block allocation overhead. Signed-off-by: Gang He <g...@suse.com> --- fs/ocfs2/extent_map.c | 41 + fs/ocfs2/extent_map.

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

2017-11-28 Thread Gang He
Hi Joseph, >>> > > On 17/11/28 15:24, Gang He wrote: >> Hello Joseph, >> >> >>>>> >> >>> >>> On 17/11/28 11:35, Gang He wrote: >>>> Hello Joseph, >>>> >>>> >>>>>>

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

2017-11-28 Thread Gang He
Hi Alex, >>> > Hi Gang, > > On 2017/11/28 15:38, Gang He wrote: >> Hi Alex, >> >> >>>>> >>> Hi Gang, >>> >>> On 2017/11/28 13:33, Gang He wrote: >>>> Hello Alex, >>>> >>>> &g

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

2017-11-27 Thread Gang He
Hi Alex, >>> > Hi Gang, > > On 2017/11/28 13:33, Gang He wrote: >> Hello Alex, >> >> >>>>> >>> Hi Gang, >>> >>> On 2017/11/27 17:46, Gang He wrote: >>>> Add ocfs2_overwrite_io function, which

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

2017-11-27 Thread Gang He
Hello Joseph, >>> > > On 17/11/28 11:35, Gang He wrote: >> Hello Joseph, >> >> >>>>> >>> Hi Gang, >>> >>> On 17/11/27 17:46, Gang He wrote: >>>> Add ocfs2_overwrite_io function, which is used to jud

Re: [Ocfs2-devel] [PATCH 3/3] ocfs2: nowait aio support

2017-11-27 Thread Gang He
Hello Alex, >>> > Hi Gang, > > On 2017/11/27 17:46, Gang He wrote: >> Return EAGAIN if any of the following checks fail for direct I/O: >> Can not get the related locks immediately, >> Blocks are not allocated at the write location, it will trigger >>

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

2017-11-27 Thread Gang He
Hi Changwei, >>> > Hi, > Gang > > On 2017/11/27 17:48, Gang He wrote: >> Add ocfs2_overwrite_io function, which is used to judge if >> overwrite allocated blocks, otherwise, the write will bring extra >> block allocation overhead. >> > >

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

2017-11-27 Thread Gang He
Hello Alex, >>> > Hi Gang, > > On 2017/11/27 17:46, Gang He wrote: >> Add ocfs2_overwrite_io function, which is used to judge if >> overwrite allocated blocks, otherwise, the write will bring extra >> block allocation overhead. >> >> Signed-off

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

2017-11-27 Thread Gang He
Hello Changwei, >>> > Hi Gang, > > On 2017/11/27 17:48, 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 <g...@suse.com> >> --- >&

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

2017-11-27 Thread Gang He
ff_t pos, loff_t len); > > Yes, Jun has a point. > It seems that ocfs2_overwrite_io is only involved in non-blocking aio > and no other code spot is calling ocfs2_overwrite_io with wait=1 passed. Ok, I will do this change. > >> >> thans, >> Jun >> >> On

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

2017-11-27 Thread Gang He
get rid of "wait" parameter. Thanks Gang > > thans, > Jun > > On 2017/11/27 17:46, Gang He wrote: >> Add ocfs2_overwrite_io function, which is used to judge if >> overwrite allocated blocks, otherwise, the write will bring extra >> block allocation overh

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

2017-11-27 Thread Gang He
Hello Jun, >>> > 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 <g...@suse.com> >> --- >>

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

2017-11-27 Thread Gang He
Hello Joseph, >>> > Hi Gang, > > On 17/11/27 17:46, Gang He wrote: >> Add ocfs2_overwrite_io function, which is used to judge if >> overwrite allocated blocks, otherwise, the write will bring extra >> block allocation overhead. >> >> Signed-off

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

2017-11-27 Thread Gang He
Add ocfs2_overwrite_io function, which is used to judge if overwrite allocated blocks, otherwise, the write will bring extra block allocation overhead. Signed-off-by: Gang He <g...@suse.com> --- fs/ocfs2/extent_map.c | 67 +++ fs/ocfs2/extent

[Ocfs2-devel] [PATCH 3/3] ocfs2: nowait aio support

2017-11-27 Thread Gang He
Return EAGAIN if any of the following checks fail for direct I/O: Can not get the related locks immediately, Blocks are not allocated at the write location, it will trigger block allocation and block IO operations. Signed-off-by: Gang He <g...@suse.com> --- fs/ocfs2/dir.c | 2

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

2017-11-27 Thread Gang He
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 <g...@suse.com> --- fs/ocfs2/dlmglue.c | 22 ++ fs/ocfs2/dlmglue.h | 4 2 files changed, 26 insertions(+) diff --git a/fs/ocfs2/dlmglue.

[Ocfs2-devel] [PATCH 0/3] ocfs2: add nowait aio support

2017-11-27 Thread Gang He
also can leverage this part kernel code. So far, ext4/xfs/btrfs have supported this feature, I'd like to add the related code for ocfs2 file system. Gang He (3): ocfs2: add ocfs2_try_rw_lock and ocfs2_try_inode_lock ocfs2: add ocfs2_overwrite_io function ocfs2: nowait aio support fs/ocfs2

Re: [Ocfs2-devel] [RFC] make ocfs2/o2net reliable

2017-11-16 Thread Gang He
>>> > On 2017/11/16 18:05, Gang He wrote: >> Hello Changwei, >> >> Base on your description, it looks make sense. >> Since I uses fs/dlm kernel module, it looks stable. >> Do you compare both dlm implementation? maybe can learn from each other.

Re: [Ocfs2-devel] [RFC] make ocfs2/o2net reliable

2017-11-16 Thread Gang He
Hello Changwei, Base on your description, it looks make sense. Since I uses fs/dlm kernel module, it looks stable. Do you compare both dlm implementation? maybe can learn from each other. Thanks Gang >>> > Hi all, > As far as we know, ocfs2/o2net is not a reliable message mechanism. >

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

2017-11-02 Thread Gang He
We can got this mail. Thanks Gang >>> > 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

Re: [Ocfs2-devel] fstrim corrupts ocfs2 filesystems(become ready-only) on SSD device which is managed by multipath

2017-10-30 Thread Gang He
Thanks Gang >>> > > On 10/28/2017 12:44 AM, Gang He wrote: >> Hello Ashish, >> Thank for your reply. >> From the patch, it looks very related to this bug. >> But one thing, I feel a little confused. >> Why was I not able to reproduce this bug in l

Re: [Ocfs2-devel] fstrim corrupts ocfs2 filesystems(become ready-only) on SSD device which is managed by multipath

2017-10-28 Thread Gang He
oofpoint.com/v2/url?u=https-3A__patchwork.kernel.org_patch_10002583_=DwIFAg=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10=f4ohdmGrYxZejY77yzx3eNgTHb1ZAfZytktjHqNVzc8=u9qPUM-rO4Z723CYidx1hFBGCM6dchae9grN8j9xyuI=FW13LRle0QG1IcOHlzXysYhiUz19DXp0N5FuQBVyYTU= Thanks, Ashish On 10/27/2017 02:47 AM, Gang He wrote: &g

[Ocfs2-devel] fstrim corrupts ocfs2 filesystems(become ready-only) on SSD device which is managed by multipath

2017-10-27 Thread Gang He
Hello Guys, I got a bug from the customer, he said, fstrim command corrupted ocfs2 file system on their SSD SAN, the file system became read-only and SSD LUN was configured by multipath. After umount the file system, the customer ran fsck.ocfs2 on this file system, then the file system can be

Re: [Ocfs2-devel] [PATCH v3] ocfs2: the ip_alloc_sem should be taken in ocfs2_get_block()

2017-10-24 Thread Gang He
arse file & data ordering issue in direct > io") > > Signed-off-by: Alex Chen <alex.c...@huawei.com> > Reviewed-by: Jun Piao <piao...@huawei.com> > Acked-by: Changwei Ge <ge.chang...@h3c.com> Reviewed-by: Gang He <g...@suse.com> > > --- > fs/ocf

Re: [Ocfs2-devel] [PATCH v2] ocfs2: the ip_alloc_sem should be taken in ocfs2_get_block()

2017-10-23 Thread Gang He
Hello Alex, Base on your bug description, I think that the fix should be OK. But I suggest you to use more clear function name in this patch. 1) For new-added function ocfs2_get_block_lock(), I think that it is better if the function name is ocfs2_dio_rd_get_block(). 2) Then, rename the original

Re: [Ocfs2-devel] [PATCH] ocfs2: mknod: fix recursive locking hung

2017-10-17 Thread Gang He
Hi Junxiao, The problem looks easy to reproduce? Could you share the trigger script/code for this issue? Thanks Gang >>> > Here another recursive lock caught and it caused the cluster hung. > > #0 [88008e3935a8] __schedule at 816e4722 > #1 [88008e393600] schedule at

Re: [Ocfs2-devel] [PATCH] ocfs2/cluster: make config_item_type const

2017-10-15 Thread Gang He
Hello Intel Kbuild team, You just upgrade GCC version when compiling the latest kernel? Since these code looks a little old, I am sure that the related contributors are still work on OCFS2 project. Thanks Gang >>> > Hi Bhumika, > > [auto build test WARNING on linus/master] > [also build

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

2017-10-13 Thread Gang He
Look good, but hope you can add more comments in the patch description. Reviewed-by: Gang He <g...@suse.com> Thanks Gang >>> > Signed-off-by: Jun Piao <piao...@huawei.com> > --- > fs/ocfs2/alloc.c | 2 -- > fs/ocfs2/cluster/heartbeat.h | 2 -

Re: [Ocfs2-devel] A o2cb DLM problem

2017-10-12 Thread Gang He
Hello Junxiao, Thank for quick reply, the information is very helpful. -Gang >>> > On 10/12/2017 02:37 PM, Gang He wrote: >> Hello list, >> >> We got a o2cb DLM problem from the customer, which is using o2cb stack for > OCFS2 file system on SLES12SP1(3.

[Ocfs2-devel] A o2cb DLM problem

2017-10-12 Thread Gang He
Hello list, We got a o2cb DLM problem from the customer, which is using o2cb stack for OCFS2 file system on SLES12SP1(3.12.49-11-default). The problem description is as below, Customer has three node oracle rack cluster gal7gblr2084 gal7gblr2085 gal7gblr2086 On each node they have configured

Re: [Ocfs2-devel] ocfs2-test supports Python 3

2017-09-27 Thread Gang He
>>> > Hi, > >> As you know, some Linux distributions(e.g. SUSE Enterprise Linux 15) will > introduce Python3 as the default, >> our Python scripts in ocfs2-test still use Python2, we will have to do > proper modifications to migration to Python3 (Larry Chen has worked on this >

[Ocfs2-devel] ocfs2-test supports Python 3

2017-09-27 Thread Gang He
** PRIVATE ** Hello guys, As you know, some Linux distributions(e.g. SUSE Enterprise Linux 15) will introduce Python3 as the default, our Python scripts in ocfs2-test still use Python2, we will have to do proper modifications to migration to Python3 (Larry Chen has worked on this

Re: [Ocfs2-devel] PATCH] ocfs2/cluster: trim a trailing white space

2017-09-13 Thread Gang He
>>> > Hi, > > We'd better not add a white space at the tail of a line, so trim it! > > Thanks, > Changwei > > Signed-off-by: Changwei Ge > --- > fs/ocfs2/cluster/tcp.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > mode change 100644 => 100755

Re: [Ocfs2-devel] [Ocfs2-tools-devel] fsck.ocfs2 does not write back block data corrected with hamming code

2017-08-28 Thread Gang He
Hello Guys, This is a little tricky problem. When the user modifies a character in a meta-block, the hamming code can repair this block when reading this block in fsck tool, so fsck tool can not detect this disk block inconsistent problem. But debugfs tool reads meta blocks without using

Re: [Ocfs2-devel] [PATCH] ocfs2: re-queue AST or BAST if sending is failed to improve the reliability

2017-08-22 Thread Gang He
>>> > > On 17/8/23 10:23, Junxiao Bi wrote: >> On 08/10/2017 06:49 PM, Changwei Ge wrote: >>> Hi Joseph, >>> >>> >>> On 2017/8/10 17:53, Joseph Qi wrote: Hi Changwei, On 17/8/9 23:24, ge changwei wrote: > Hi > > > On 2017/8/9 下午7:32, Joseph Qi wrote: >> Hi,

Re: [Ocfs2-devel] [PATCH] ocfs2: re-queue AST or BAST if sending is failed to improve the reliability

2017-08-07 Thread Gang He
Base on your description, this case should be a corner case, NOT a fatal error. Should we use mlog(ML_NOTICE, ...) to print these logs? Thanks Gang >>> > Hi, > > In current code, while flushing AST, we don't handle an exception that > sending AST or BAST is failed. > But it is indeed possible

[Ocfs2-devel] [PATCH v3 2/4] ocfs2: fix some small problems

2017-05-24 Thread Gang He
in the case. Signed-off-by: Gang He <g...@suse.com> --- fs/ocfs2/filecheck.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c index cc7b595..4347727 100644 --- a/fs/ocfs2/filecheck.c +++ b/fs/ocfs2/filecheck.c @@ -288,7 +288,7

[Ocfs2-devel] [PATCH v3 0/4] ocfs2: use kobject for online file check

2017-05-24 Thread Gang He
into four patches, make sure each patch will not bring ocfs2 kernel modules compiling errors. Gang He (4): ocfs2: move some definitions to header file ocfs2: fix some small problems ocfs2: add kobject for online file check ocfs2: add duplicative ino number check fs/ocfs2/filecheck.c

[Ocfs2-devel] [PATCH v2] ocfs2: fix a static checker warning

2017-05-22 Thread Gang He
turn value will not be NULL(zero). Signed-off-by: Gang He <g...@suse.com> --- fs/ocfs2/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 382401d..1a1e007 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c @@ -136,7 +136,7

Re: [Ocfs2-devel] [bug report] ocfs2: check/fix inode block for online file check

2017-05-22 Thread Gang He
Hi Dan, What static checker tool did you use? could you paste the detailed warning message to the list too? Since I need to write this information into the patch comments due to Andrew Morton's suggestion. Thanks a lot. Gang >>> > Hello Gang He, > > The patch d56a8f32e

[Ocfs2-devel] [PATCH] ocfs2: get rid of ocfs2_is_o2cb_active function

2017-05-22 Thread Gang He
ign of stackglue, we need to get ocfs2_stack_lock lock before using ocfs2_stack related data structures, and that active_stack pointer can be NULL in case mount failure. Signed-off-by: Gang He <g...@suse.com> --- fs/ocfs2/dlmglue.c | 2 +- fs/ocfs2/stackglue.c | 6 -- fs/ocfs2/stackglue.h |

[Ocfs2-devel] [PATCH] ocfs2: fix a static checker warning

2017-05-21 Thread Gang He
This patch will fix a static checker warning, this warning was caused by commit d56a8f32e4c662509ce50a37e78fa66c777977d3. after apply this patch, the error return value will not be NULL(zero). Signed-off-by: Gang He <g...@suse.com> --- fs/ocfs2/inode.c | 2 +- 1 file changed, 1 insertion

Re: [Ocfs2-devel] [bug report] ocfs2: check/fix inode block for online file check

2017-05-21 Thread Gang He
Hello Dan, Thank for your reporting. I will send the patch for fixing this warning. Thanks Gang >>> > Hello Gang He, > > The patch d56a8f32e4c6: "ocfs2: check/fix inode block for online file > check" from Mar 22, 2016, leads to the following static checker

[Ocfs2-devel] [PATCH v2] ocfs2: give an obvious tip for dismatch cluster names

2017-05-21 Thread Gang He
, the user will not meet this error. Signed-off-by: Gang He <g...@suse.com> --- fs/ocfs2/super.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index ca1646f..fc25d4a 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c @@ -1

Re: [Ocfs2-devel] [PATCH] ocfs2: give an obvious tip for dismatch cluster names

2017-05-18 Thread Gang He
ser the reason is there is a cluster name dismatch between on disk and on the running cluster environment. Thanks Gang > > Thanks, > Joseph > > On 17/5/18 18:43, Gang He wrote: >> Hi Joseph, >> >> >>>>> >>> Hi Gang, >>> >&g

  1   2   3   >