[PATCH] ocfs2: fix potential soft lockup during fstrim

2020-09-26 Thread Gang He
the upper applications more IO opportunities, these applications are not blocked for too long at writing files. Signed-off-by: Gang He --- fs/ocfs2/alloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 4c1b90442d6f..2cf9321919b5 100644

[PATCH] ocfs2: fix remounting needed after setfacl command

2020-07-16 Thread Gang He
owner: root group: root user::rw- group::r-- mask::r-- other::r-- The latest acl record("u:ivan:rw") cannot be returned via getfacl command until remounting. Signed-off-by: Gang He --- fs/ocfs2/acl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ocfs2/acl.c b/fs/ocfs2/a

RE: [PATCH] ocfs2: mount shared volume without ha stack

2020-04-28 Thread Gang He
Hello Joseph, Thank for your taking the time to review the patch. Please see my comments inline. > -Original Message- > From: Joseph Qi [mailto:joseph...@linux.alibaba.com] > Sent: 2020年4月27日 17:48 > To: Gang He ; m...@fasheh.com; jl...@evilplan.org > Cc: linux-kernel@

Re: [Ocfs2-devel] mmotm 2019-06-11-16-59 uploaded (ocfs2)

2019-06-13 Thread Gang He
Hello Randy and Andrew, >>> On 6/13/2019 at 9:18 am, in message <20190612181813.48ad05832e05f767e7116...@linux-foundation.org>, Andrew Morton wrote: > On Wed, 12 Jun 2019 07:15:30 -0700 Randy Dunlap wrote: > >> On 6/11/19 4:59 PM, a...@linux-foundation.org wrote: >> > The mm-of-the-moment

Re: [PATCH V4 3/3] ocfs2: add first lock wait time in locking_state

2019-06-12 Thread Gang He
Hello Joseph, >>> On 6/12/2019 at 3:03 pm, in message , Joseph Qi wrote: > Hi Gang, > > On 19/6/11 09:54, Gang He wrote: >> ocfs2 file system uses locking_state file under debugfs to dump >> each ocfs2 file system's dlm lock resources, but the users ever >

[PATCH V4 1/3] ocfs2: add last unlock times in locking_state

2019-06-10 Thread Gang He
record. Compared with v1, the main change is to use wall time in microsecond for last pr/ex unlock time. Signed-off-by: Gang He Reviewed-by: Joseph Qi --- fs/ocfs2/dlmglue.c | 18 +++--- fs/ocfs2/ocfs2.h | 1 + 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/fs

[PATCH V4 2/3] ocfs2: add locking filter debugfs file

2019-06-10 Thread Gang He
, ocfs2_dlm_init_debug() returns directly with error when creating locking filter debugfs file is failed, since ocfs2_dlm_shutdown_debug() will handle this failure perfectly. Compared with v1, the main change is to add CONFIG_OCFS2_FS_STATS macro definition judgment. Signed-off-by: Gang He Reviewed-by: Joseph Qi

[PATCH V4 3/3] ocfs2: add first lock wait time in locking_state

2019-06-10 Thread Gang He
these deadlock problems via comparing the first lock wait time with the current time. Signed-off-by: Gang He --- fs/ocfs2/dlmglue.c | 32 +--- fs/ocfs2/ocfs2.h | 1 + 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c

Re: [Ocfs2-devel] [PATCH 1/2] ocfs2: add last unlock times in locking_state

2019-05-29 Thread Gang He
Hi Wengang, >>> On 2019/5/29 at 1:22, in message <66083663-1d25-437b-ce98-07d200f44...@oracle.com>, Wengang wrote: > Hi Gang, > > This idea sounds cool! > Some comments in lines: > > On 05/23/2019 03:40 AM, Gang He wrote: >> ocfs2 file system uses l

Re: [Ocfs2-devel] [PATCH V3 2/2] ocfs2: add locking filter debugfs file

2019-05-26 Thread Gang He
ess time field too. > > thanks, > wengang > > On 2019/5/23 19:15, Gang He wrote: >> Hello Wengang, >> >> This patch is used to add a filter attribute(the default value is 0), the > kernel module can use this attribute value to filter the lock resources >

Re: [Ocfs2-devel] [PATCH V3 2/2] ocfs2: add locking filter debugfs file

2019-05-23 Thread Gang He
example of outputs before patch VS that after patch? > I think that would directly show what the patch does. > > thanks, > wengang > > On 05/23/2019 03:40 AM, Gang He wrote: >> Add locking filter debugfs file, which is used to filter lock >> resources dump from loc

[PATCH V3 2/2] ocfs2: add locking filter debugfs file

2019-05-23 Thread Gang He
. Compared with v1, the main change is to add CONFIG_OCFS2_FS_STATS macro definition judgment. Signed-off-by: Gang He Reviewed-by: Joseph Qi --- fs/ocfs2/dlmglue.c | 36 fs/ocfs2/ocfs2.h | 2 ++ 2 files changed, 38 insertions(+) diff --git a/fs/ocfs2/dlmglue.c

[PATCH 1/2] ocfs2: add last unlock times in locking_state

2019-05-23 Thread Gang He
record. Signed-off-by: Gang He Reviewed-by: Joseph Qi --- fs/ocfs2/dlmglue.c | 21 + fs/ocfs2/ocfs2.h | 1 + 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index af405586c5b1..dccf4136f8c1 100644 --- a/fs/ocfs2

Re: [Ocfs2-devel] [PATCH] ocfs2: fix the application IO timeout when fstrim is running

2019-01-15 Thread Gang He
Hello ChangWei, >>> On 2019/1/15 at 16:00, in message <63adc13fd55d6546b7dece290d39e3730127826...@h3cmlb12-ex.srv.huawei-3com.com>, Changwei Ge wrote: > On 2019/1/15 13:49, Gang He wrote: >> Hello Changewei, >> >>>>> On 2019/1/15 at 11:50, in messag

Re: [Ocfs2-devel] [PATCH] ocfs2: fix the application IO timeout when fstrim is running

2019-01-14 Thread Gang He
Hello Changewei, >>> On 2019/1/15 at 11:50, in message <63adc13fd55d6546b7dece290d39e3730127825...@h3cmlb12-ex.srv.huawei-3com.com>, Changwei Ge wrote: > Hi Gang, > > Most parts of this patch look sane to me, just a tiny question... > > On 2019/1/11 17:01, Gang

[PATCH] ocfs2: fix the application IO timeout when fstrim is running

2019-01-11 Thread Gang He
meta-file. Signed-off-by: Gang He --- fs/ocfs2/alloc.c | 159 + fs/ocfs2/dlmglue.c | 5 ++ fs/ocfs2/ocfs2.h | 1 + fs/ocfs2/ocfs2_trace.h | 2 + fs/ocfs2/super.c | 2 + 5 files changed, 106 insertions(+), 63 deletions(-) diff

Re: [Ocfs2-devel] [PATCH] fix crash on ocfs2_duplicate_clusters_by_page

2018-08-20 Thread Gang He
Hello Larry, >>> On 2018/8/16 at 19:24, in message <20180816112426.12218-1-lc...@suse.com>, Larry Chen wrote: > ocfs2_duplicate_clusters_by_page may crash if an extent's page is dirty. > When a page has not been written back, it is still in dirty state. If at > that moment,

Re: [Ocfs2-devel] [PATCH] fix crash on ocfs2_duplicate_clusters_by_page

2018-08-20 Thread Gang He
Hello Larry, >>> On 2018/8/16 at 19:24, in message <20180816112426.12218-1-lc...@suse.com>, Larry Chen wrote: > ocfs2_duplicate_clusters_by_page may crash if an extent's page is dirty. > When a page has not been written back, it is still in dirty state. If at > that moment,

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: 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 Reviewed-by: Gang He --- fs/ocfs2/dlmglue.c | 119 +++-- fs/ocfs2/dlmglue.h | 1 +

[PATCH] dlm: make sctp_connect_to_sock() return in specified time

2018-04-26 Thread Gang He
, the time is spent in sock->ops->connect() function before returns ETIMEDOUT(-110) error, since O_NONBLOCK argument in connect() function does not work here, then we should make sock->ops->connect() function return in specified time via setting socket SO_SNDTIMEO atrribute. Signed-off-by

[PATCH] dlm: make sctp_connect_to_sock() return in specified time

2018-04-26 Thread Gang He
, the time is spent in sock->ops->connect() function before returns ETIMEDOUT(-110) error, since O_NONBLOCK argument in connect() function does not work here, then we should make sock->ops->connect() function return in specified time via setting socket SO_SNDTIMEO atrribute. Signed-off-by: Gang

Re: [PATCH] dlm: prompt the user SCTP is experimental

2018-04-02 Thread Gang He
Hi David, >>> > On Thu, Mar 22, 2018 at 10:27:56PM -0600, Gang He wrote: >> Hello David, >> >> Do you agree to add this prompt to the user? >> Since sometimes customers attempted to setup SCTP protocol with two rings, >> but they could not get the

Re: [PATCH] dlm: prompt the user SCTP is experimental

2018-04-02 Thread Gang He
Hi David, >>> > On Thu, Mar 22, 2018 at 10:27:56PM -0600, Gang He wrote: >> Hello David, >> >> Do you agree to add this prompt to the user? >> Since sometimes customers attempted to setup SCTP protocol with two rings, >> but they could not get the

Re: [PATCH] dlm: prompt the user SCTP is experimental

2018-03-22 Thread Gang He
ut 5mins hang in case > one connection(ring) is broken. > Then, I suggest to add a kernel print, which prompts the user SCTP > protocol for DLM should be considered experimental, it is not > recommended in production environment. > > Signed-off-by: Gang He <g...@suse.com> &g

Re: [PATCH] dlm: prompt the user SCTP is experimental

2018-03-22 Thread Gang He
ut 5mins hang in case > one connection(ring) is broken. > Then, I suggest to add a kernel print, which prompts the user SCTP > protocol for DLM should be considered experimental, it is not > recommended in production environment. > > Signed-off-by: Gang He > --- > fs/

[PATCH] dlm: prompt the user SCTP is experimental

2018-03-20 Thread Gang He
in case one connection(ring) is broken. Then, I suggest to add a kernel print, which prompts the user SCTP protocol for DLM should be considered experimental, it is not recommended in production environment. Signed-off-by: Gang He <g...@suse.com> --- fs/dlm/lowcomms.c | 1 + 1 file chan

[PATCH] dlm: prompt the user SCTP is experimental

2018-03-20 Thread Gang He
in case one connection(ring) is broken. Then, I suggest to add a kernel print, which prompts the user SCTP protocol for DLM should be considered experimental, it is not recommended in production environment. Signed-off-by: Gang He --- fs/dlm/lowcomms.c | 1 + 1 file changed, 1 insertion(+) diff

[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

[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

[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 Signed-off-by: Gang He --- fs/ocfs2/extent_map.c | 45 + fs/ocfs2

[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 --- fs/ocfs2/dir.c | 2

[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

[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

[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

[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 Signed-off-by: Gang He --- fs/ocfs2/dlmglue.c | 21 + fs/ocfs2/dlmglue.h | 4 2 files changed, 25 insertions(+) diff --git a/fs/ocfs2

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

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] ocfs2: try a blocking lock before return AOP_TRUNCATED_PAGE

2018-01-05 Thread Gang He
Hi Andrew, >>> Andrew Morton 01/06/18 4:50 AM >>> On Thu, 04 Jan 2018 23:31:12 -0700 "Gang He" wrote: > Happy new year. > Could you help to pick up this patch, which is used to fix a old patch > 1cce4df04f37. > If we have not this patch, so

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

2018-01-04 Thread Gang He
to be fenced. Thanks Gang >>> > > On 17/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

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

2018-01-04 Thread Gang He
to be fenced. Thanks Gang >>> > > On 17/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

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

2018-01-03 Thread Gang He
Hi Alex, >>> > Hi Gang, > > On 2018/1/3 13:14, Gang He wrote: >> Hi Alex, >> >> >>>>> >>> Hi Gang, >>> >>> On 2017/12/28 18:07, Gang He wrote: >>>> Add ocfs2_overwrite_io function, which is used to

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

2018-01-03 Thread Gang He
Hi Alex, >>> > Hi Gang, > > On 2018/1/3 13:14, Gang He wrote: >> Hi Alex, >> >> >>>>> >>> Hi Gang, >>> >>> On 2017/12/28 18:07, Gang He wrote: >>>> Add ocfs2_overwrite_io function, which is used to

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

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

[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.

[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 --- fs/ocfs2/extent_map.c | 45 + fs/ocfs2/extent_map.h | 3 +++ 2 files

[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

[PATCH v3 1/3] ocfs2: add ocfs2_try_rw_lock and ocfs2_try_inode_lock

2017-12-28 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.

[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

[PATCH v3 1/3] ocfs2: add ocfs2_try_rw_lock and ocfs2_try_inode_lock

2017-12-28 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 --- fs/ocfs2/dlmglue.c | 21 + fs/ocfs2/dlmglue.h | 4 2 files changed, 25 insertions(+) diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c

[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

[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 --- fs/ocfs2/dir.c | 2

[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

[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 --- fs/ocfs2/dlmglue.c | 9 + 1 file changed, 9 insertions(+) diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 46

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

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

[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 +

[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 --- fs/ocfs2/dlmglue.c | 9 + 1 file changed, 9

[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 +

[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 --- 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 +7382,7 @@ int

[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 +++

[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 --- fs/ocfs2/dlmglue.c | 86 + fs/ocfs2/dlmglue.h | 29 + fs/ocfs2/ocfs2.h

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

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 >> --- >> fs/ocfs2/dlmglue.c | 21 ++

[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.

[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 --- fs/ocfs2/extent_map.c | 41 + fs/ocfs2/extent_map.h | 3 +++ 2 files

[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.

[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 --- fs/ocfs2/dlmglue.c | 21 + fs/ocfs2/dlmglue.h | 4 2 files changed, 25 insertions(+) diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c

[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

[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

[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 --- fs/ocfs2/dir.c | 2

[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

  1   2   3   >