We found a possible memory leak in dlm_process_recovery_data when doing
code review. In dlm_process_recovery_data, it creates newlock each time,
but don't free when it is bad, and then it will lead to memory leak.
Cc: sta...@vger.kernel.org
Signed-off-by: Joseph Qi joseph...@huawei.com
Reviewed
On 2013/5/9 3:38, Andrew Morton wrote:
On Mon, 6 May 2013 22:43:39 +0800 Joseph Qi joseph...@huawei.com wrote:
In ocfs2_file_aio_write, it does ocfs2_rw_lock first and then
ocfs2_inode_lock. But if ocfs2_inode_lock failed, it goes to out_sems
without unlocking rw lock. This will cause a bug
ocfs2_get_clusters_nocache failed, it should goto
out_unlock instead of out, because we need release buffer head, up read
alloc sem and unlock inode.
Cc: sta...@vger.kernel.org
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/extent_map.c |2 +-
1 file changed, 1 insertion(+), 1
, once ocfs2_get_clusters_nocache failed, it should goto
out_unlock instead of out, because we need release buffer head, up read
alloc sem and unlock inode.
Cc: sta...@vger.kernel.org
Signed-off-by: Joseph Qi joseph...@huawei.com
Reviewed-by: Jie Liu jeff@oracle.com
---
fs/ocfs2/extent_map.c
Below 3 functions have already been declared in dlmcommon.h, so we have
no need to declare them again in dlmrecovery.c.
dlm_complete_recovery_thread
dlm_launch_recovery_thread
dlm_kick_recovery_thread
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/dlm/dlmrecovery.c |3 ---
1
In dlm_request_all_locks, ret is type enum. But o2net_send_message
returns a type int value. Then it will never run into the following
error branch. So we should change the ret type from enum to int.
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/dlm/dlmrecovery.c |3 +--
1 file
These memory will be freed in o2hb_region_release. If we free them here,
then it will lead to double freed issue.
This patch can fix a couple of potential memory leaks at
o2hb_map_slot_data().
Signed-off-by: Jie Liu jeff.liu at oracle.com
---
fs/ocfs2/cluster/heartbeat.c | 33
If we use le32_add_cpu to set ocfs2_dinode i_flags, it may lead to the
corresponding flag corrupted. So we should change it to bitwise and/or
operation.
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/namei.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
Anyone can give me some advice?
On 2013/5/26 20:21, Joseph Qi wrote:
I have triggered a BUG at buffer_head_io.c. Belowing is the code where
the BUG is triggered:
if (buffer_needs_validate(bh)) {
/* We never set NeedsValidate if the
* buffer was held by the journal, so
You are right. Thanks for your review comments.
I will do the corresponding modification and resend the patch.
On 2013/5/29 18:17, Jeff Liu wrote:
On 05/29/2013 04:12 PM, shencanquan wrote:
On 2013/5/29 15:57, Jeff Liu wrote:
Thanks for your patch, Joseph.
On 05/29/2013 10:42 AM, Joseph Qi
at 11:38:49AM +0800, Joseph Qi wrote:
Anyone can give me some advice?
On 2013/5/26 20:21, Joseph Qi wrote:
I have triggered a BUG at buffer_head_io.c. Belowing is the code where
the BUG is triggered:
if (buffer_needs_validate(bh)) {
/* We never set NeedsValidate if the
* buffer
In ocfs2_remove_btree_range, when calling ocfs2_lock_refcount_tree and
ocfs2_prepare_refcount_change_for_del failed, it goes to out and then
tries to call mutex_unlock without mutex_lock before.
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/alloc.c |6 +++---
1 file changed, 3
In ocfs2_remove_btree_range, when ocfs2_reserve_blocks_for_rec_trunc
failed, it should ref_tree before return.
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/alloc.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index
On 2013/6/10 15:14, Jeff Liu wrote:
On 06/10/2013 02:27 PM, Joseph Qi wrote:
In ocfs2_remove_btree_range, when calling ocfs2_lock_refcount_tree and
ocfs2_prepare_refcount_change_for_del failed, it goes to out and then
tries to call mutex_unlock without mutex_lock before.
It's better
.
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/alloc.c |8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index b8a9d87..17e6bdd 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -5655,7 +5655,7 @@ int
Currently ocfs2_start_trans/ocfs2_commit_trans are in
lock_page/unlock_page. This may cause dead lock.
Here is the situation:
write - lock_page - ocfs2_start_trans - ocfs2_commit_trans - unlock_page
ocfs2_start_trans/ocfs2_commit_trans calls
jbd2_journal_start/jbd2_journal_stop which may also
Any different opinion?
On 2013/6/19 16:17, Joseph Qi wrote:
Currently ocfs2_start_trans/ocfs2_commit_trans are in
lock_page/unlock_page. This may cause dead lock.
Here is the situation:
write - lock_page - ocfs2_start_trans - ocfs2_commit_trans - unlock_page
ocfs2_start_trans
actions.
Joel
On Mon, Jun 24, 2013 at 04:55:20PM +0800, Joseph Qi wrote:
Any different opinion?
On 2013/6/19 16:17, Joseph Qi wrote:
Currently ocfs2_start_trans/ocfs2_commit_trans are in
lock_page/unlock_page. This may cause dead lock.
Here is the situation:
write - lock_page
In ocfs2_xattr_value_attach_refcount(), if error occurs when calling
ocfs2_xattr_get_clusters(), it will go with unexpected behavior since
local variables p_cluster, num_clusters and ext_flags are declared
without initialization.
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/xattr.c
On 2013/8/1 17:25, Jeff Liu wrote:
On 08/01/2013 05:14 PM, Joseph Qi wrote:
In ocfs2_attach_refcount_tree() and ocfs2_duplicate_extent_list(), if
error occurs when calling ocfs2_get_clusters(), it will go with
unexpected behavior as local variables p_cluster, num_clusters and
ext_flags
Code in o2net_handler_tree_lookup() may be corrupted by mistake.
So adjust it to promote readability.
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/cluster/tcp.c | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/fs/ocfs2
On 2013/8/28 4:54, Andrew Morton wrote:
On Tue, 27 Aug 2013 14:17:17 +0800 Joseph Qi joseph...@huawei.com wrote:
Signed-off-by: Joyce xuejiu...@huawei.com
Signed-off-by: Joseph Qi joseph...@huawei.com
This signoff trail makes me wonder: which of you was the primary
author of this patch
On 2013/9/12 2:40, Tariq Saeed wrote:
umount thread could race with migrate handler thread receiving resource
migration request from other node. When this happens, migrating thread
could set this node as the master along with DLM_LOCK_RES_MIGRATING flag.
umount thread should skip migrating
On 2013/9/7 0:44, Mark Fasheh wrote:
This looks great, thank you.
Reviewed-by: Mark Fasheh mfas...@suse.de
On Thu, Sep 05, 2013 at 04:28:54PM +0800, Rui Xiang wrote:
The only reason for sb_getblk() failing is if it can't allocate
the buffer_head. So return ENOMEM instead when it fails.
On 2013/9/7 0:45, Mark Fasheh wrote:
Reviewed-by: Mark Fasheh mfas...@suse.de
On Thu, Sep 05, 2013 at 04:28:55PM +0800, Rui Xiang wrote:
Sb_getblk may retrun an err, so add a check for bh.
Signed-off-by: Rui Xiang rui.xi...@huawei.com
Reviewed-by: Jie Liu jeff@oracle.com
---
successfully when expanding a
file, but failed in ocfs2_insert_extent.
So we need free the allocated clusters if they are not used indeed.
Cc: Joseph Qi joseph...@huawei.com
Signed-off-by: Zongxun Wang wangzong...@huawei.com
---
fs/ocfs2/alloc.c | 38 +++---
fs/ocfs2
successfully when expanding a
file, but failed in ocfs2_insert_extent.
So we need free the allocated clusters if they are not used indeed.
Signed-off-by: Zongxun Wang wangzong...@huawei.com
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/alloc.c | 38
.
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/localalloc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
index 25ec3b7..0440134 100644
--- a/fs/ocfs2/localalloc.c
+++ b/fs/ocfs2/localalloc.c
@@ -788,6 +788,7 @@ int
On 2013/11/28 7:38, Andrew Morton wrote:
On Wed, 27 Nov 2013 17:05:00 +0800 Joseph Qi joseph...@huawei.com wrote:
Dentry lock name is made up of the type 'N', the parent blkno and its
blkno represented as a binary value.
Now there is a null byte between parent blkno and the binary blkno
On 2013/11/8 10:19, Joseph Qi wrote:
On 2013/11/7 21:19, Joel Becker wrote:
On Thu, Nov 07, 2013 at 08:12:02PM +0800, Joseph Qi wrote:
We ran ocfs2 test program dirop_fileop_racer and found a dead lock case.
The case is described below.
2 nodes, say Node A and Node B, mount the same ocfs2
On 2013/11/29 0:40, Mark Fasheh wrote:
On Wed, Nov 27, 2013 at 03:38:41PM -0800, Andrew Morton wrote:
On Wed, 27 Nov 2013 17:05:00 +0800 Joseph Qi joseph...@huawei.com wrote:
Dentry lock name is made up of the type 'N', the parent blkno and its
blkno represented as a binary value.
Now
.
Signed-off-by: Yiwen Jiang jiangyi...@huawei.com
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/namei.c | 97 ++--
1 file changed, 95 insertions(+), 2 deletions(-)
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
index be3f867
Signed-off-by: Joseph Qi joseph...@huawei.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 c414929..665e91e 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -1947,11 +1947,15 @@ static void
On 2014/1/11 9:19, Srinivas Eeda wrote:
From: Srinivas Eeda seeda@srini.(none)
A tiny race between BAST and unlock message causes the NULL dereference.
A node sends an unlock request to master and receives a response. Before
processing the response it receives a BAST from the master. Since
-by: Zongxun Wang wangzong...@huawei.com
Signed-off-by: Joseph Qi joseph...@huawei.com
Cc: Joel Becker jl...@evilplan.org
Cc: Mark Fasheh mfas...@suse.com
Cc: Li Zefan lize...@huawei.com
Signed-off-by: Andrew Morton a...@linux-foundation.org
---
fs/ocfs2/alloc.c | 38
On 2014/1/28 7:07, Andrew Morton wrote:
On Sun, 26 Jan 2014 10:53:24 +0800 Joseph Qi joseph...@huawei.com wrote:
Hi
On 2014/1/25 4:47, a...@linux-foundation.org wrote:
From: Zongxun Wang wangzong...@huawei.com
Subject: ocfs2: free allocated clusters if error occurs after
In ocfs2_file_aio_write, it will fall back to buffered IO when cannot
complete direct IO request, e.g. append write and punch hole. And mostly
it should firstly do space allocation and this will make much more
journal to flush.
From test, we found the above two cases performs almost 70% lower than
dlm_state_print
- dlm_launch_thread
Move dlm_debug_init after dlm_launch_thread and
dlm_launch_recovery_thread can fix this issue.
Signed-off-by: Zongxun Wang wangzong...@huawei.com
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/dlm/dlmdomain.c | 6 +++---
1 file changed, 3 insertions
From: joyce.xue xuejiu...@huawei.com
Variable uuid_net_key in ocfs2_initialize_super() is not used. Clean
it up.
Signed-off-by: joyce.xue xuejiu...@huawei.com
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/super.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/ocfs2
In o2nm_cluster, cl_idle_timeout_ms, cl_keepalive_delay_ms, as well as
cl_reconnect_delay_ms, are defined as type of unsigned int. So we should
also use unsigned int in the helper functions.
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/cluster/tcp.c | 6 +++---
1 file changed, 3
From: Zhonghua Guo guozhong...@h3c.com
In dlm_query_region_handler(), once kmalloc failed, it will unlock
dlm_domain_lock without lock first, then dead lock happens.
This patch adds a flag domain_locked to fix this issue.
Signed-off-by: Zhonghua Guo guozhong...@h3c.com
Signed-off-by: Joseph Qi
From: Zhonghua Guo guozhong...@h3c.com
In dlm_query_region_handler(), once kmalloc failed, it will unlock
dlm_domain_lock without lock first, then dead lock happens.
Signed-off-by: Zhonghua Guo guozhong...@h3c.com
Signed-off-by: Joseph Qi joseph...@huawei.com
Reviewed-by: Srinivas Eeda
Once dlm_dispatch_assert_master failed in dlm_master_requery_handler,
the only reason is ENOMEM. So just retry it instead of BUG().
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/dlm/dlmrecovery.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/fs
failed to
get memory, return an error to peer and peer decides to retry or give up.
thanks,
wengang
于 2014年04月03日 20:45, Joseph Qi 写道:
Once dlm_dispatch_assert_master failed in dlm_master_requery_handler,
the only reason is ENOMEM. So just retry it instead of BUG().
Signed-off-by: Joseph
Once dlm_dispatch_assert_master failed in dlm_master_requery_handler,
the only reason is ENOMEM.
Add retry logic to avoid BUG() in case of not enough memory
temporarily.
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/dlm/dlmrecovery.c | 25 -
1 file changed
Once JBD2_ABORT is set, ocfs2_commit_cache will fail in
ocfs2_commit_thread. Then it will get into a loop with mass logs. This
will meaninglessly consume a larger number of resource and may lead to
system hung at last.
So limit printk in this case.
Signed-off-by: Joseph Qi joseph...@huawei.com
On 2014/4/15 9:22, Guozhonghua wrote:
Hi, everyone:
As the disk is umounted, the host is panic or bloked.
The host must be repowered.
The test scenario is with Linux kernel 3.13.6.
Could you please describe the scenario more clearly?
How many nodes in your cluster, and, are you
On 2014/4/18 5:01, Mark Fasheh wrote:
On Thu, Apr 17, 2014 at 07:08:42PM +0800, Joseph Qi wrote:
Once JBD2_ABORT is set, ocfs2_commit_cache will fail in
ocfs2_commit_thread. Then it will get into a loop with mass logs. This
will meaninglessly consume a larger number of resource and may lead
On 2014/4/18 10:45, Mark Fasheh wrote:
On Fri, Apr 18, 2014 at 09:02:33AM +0800, Joseph Qi wrote:
On 2014/4/18 5:01, Mark Fasheh wrote:
On Thu, Apr 17, 2014 at 07:08:42PM +0800, Joseph Qi wrote:
Once JBD2_ABORT is set, ocfs2_commit_cache will fail in
ocfs2_commit_thread. Then it will get
On 2014/4/22 4:51, Mark Fasheh wrote:
On Mon, Apr 21, 2014 at 12:18:24PM -0700, Andrew Morton wrote:
On Fri, 18 Apr 2014 17:18:27 +0800 Joseph Qi joseph...@huawei.com wrote:
+ if (printk_timed_ratelimit(abort_warn_time,
60*HZ))
+ mlog
In dlm_init, if create dlm_lockname_cache failed in
dlm_init_master_caches, it will destroy dlm_lockres_cache which created
before twice. And this will cause system die when loading modules.
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/dlm/dlmmaster.c | 8 ++--
1 file changed
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, it will shutdown
the connection and try to rebuild,
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 its state periodically, if no messages
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 connection is established between two ocfs2 nodes
-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/resize.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ocfs2/resize.c b/fs/ocfs2/resize.c
index 822ebc1..4261c74 100644
--- a/fs/ocfs2/resize.c
+++ b/fs/ocfs2/resize.c
@@ -157,7 +157,7 @@ static int
Parameters new_clusters and first_new_cluster are not used in
ocfs2_update_last_group_and_inode, so remove them.
Signed-off-by: Joseph Qi joseph...@huawei.com
Reviewed-by: joyce.xue xuejiu...@huawei.com
---
fs/ocfs2/resize.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/fs/ocfs2
or larger than
le16_to_cpu(el-l_next_free_rec) is meaningless.
Signed-off-by: Yingtai Xie xieying...@huawei.com
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/alloc.c| 15 ---
fs/ocfs2/move_extents.c | 2 +-
fs/ocfs2/refcounttree.c | 2 +-
3 files changed, 14
to be increased first.
Signed-off-by: Joseph Qi joseph...@huawei.com
Signed-off-by: Xue jiufei xuejiu...@huawei.com
---
fs/ocfs2/dlm/dlmmaster.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
index 6222b35..fc78237
On 2014/5/21 5:53, Tariq Saeed wrote:
Orabug: 18639535
Two node cluster and both nodes hold a lock at PR level and both want
to convert to EX at the same time. Master node 1 has sent BAST and then
closes the connection due to idletime out. Node 0 receives BAST, sends
unlock req with cancel
From the stack, it seems that it blocks on loading journal during mount.
Has it already been owned by another node?
Try debugfs.ocfs2 'fs_locks -B' and 'dlm_locks xxx' to find out why.
On 2014/8/21 9:07, Guozhonghua wrote:
Hi, everyone
And we have the blocked cluster several times, and
On 2014/8/25 13:00, Sunil Mushran wrote:
Functions in dlmdomain.c are only triggered during mount. So they cannot
trigger the deadlock as described above in this thread. I would leave them as
is.
It is possible if mounts multiple volumes on each node.
On Aug 24, 2014 7:06 PM, Xue jiufei
,
o2hb_live_lock is enough to protect live node map.
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/cluster/heartbeat.c | 19 +++
fs/ocfs2/cluster/heartbeat.h | 1 +
fs/ocfs2/dlm/dlmdomain.c | 2 +-
3 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/fs/ocfs2
On 2014/8/28 17:49, Guozhonghua wrote:
Hi all,
As we have test the OCFS2, and create one image file to be used as one
virtual machine’s disk, it size is more than 2T, but its stats information is
error.
Is file size limited to 2T? Or any other way to avoid its?
AFAIK, no such limit.
On 2014/9/1 15:14, Guozhonghua wrote:
Hi¸ we test one file which is larger than 2T, then we get the information
wrong.
Without patch, the result is as below, OCFS2, and you can see that size of
the file and the blocks is not well:
# ls -al /vms/ocfs2lv/test_base_0
Refactoring error handling in dlm_alloc_ctxt to simplify code.
Signed-off-by: Joseph Qi joseph...@huawei.com
Reviewed-by: Alex Chen alex.c...@huawei.com
---
fs/ocfs2/dlm/dlmdomain.c | 42 ++
1 file changed, 22 insertions(+), 20 deletions(-)
diff --git
In o2net_init, if malloc failed, it directly returns -ENOMEM.
Then o2quo_exit won't be called in init_o2nm.
Signed-off-by: Joseph Qi joseph...@huawei.com
Reviewed-by: joyce.xue xuejiu...@huawei.com
---
fs/ocfs2/cluster/tcp.c | 18 +++---
1 file changed, 11 insertions(+), 7 deletions
: Clean up refmap helpers).
Since lockres is new, it doesn't not require the res-spinlock. So
remove it.
Signed-off-by: Joseph Qi joseph...@huawei.com
Reviewed-by: joyce.xue xuejiu...@huawei.com
---
fs/ocfs2/dlm/dlmmaster.c | 18 ++
1 file changed, 10 insertions(+), 8 deletions(-)
diff
Hi Andrew,
Currently in case of O_DIRECT append write (block not allocated yet),
ocfs2 will fall back to buffered I/O. This has some disadvantages.
Firstly, it is not the behavior as expected. Secondly, it will consume
huge page cache, e.g. in mass backup scenario. Thirdly, modern
filesystems such
I don't think this is right.
There are two scenario when returns -ENOTCONN or -EHOSTDOWN:
1) Connection down when sending the message;
2) Connection down when responding the messages;
So just resend the message may lead to remote handles twice.
On 2014/9/26 20:06, Guozhonghua wrote:
Hi, all,
-dlm_print_one_lock_resource
-spin_lock(res-spinlock)
Signed-off-by: Alex Chen alex.c...@huawei.com
Reviewed-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/dlm/dlmrecovery.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm
Do not BUG() if GFP_ATOMIC allocation fails in
dlm_dispatch_assert_master.
Instead, return -ENOMEM to the sender and then retry.
Signed-off-by: Joseph Qi joseph...@huawei.com
Reviewed-by: Alex Chen alex.c...@huawei.com
---
fs/ocfs2/dlm/dlmrecovery.c | 18 +-
1 file changed, 13
On 2014/10/9 15:16, Guozhonghua wrote:
Hi Joseph and Srinivas,
We had merged and test the two patches:
1.ocfs2: o2net: set tcp user timeout to max value
8e9801dfe37c9e68cdbfcd15988df2187191864e
2.ocfs2: o2net: don't shutdown connection when idle timeout
, and then delete it once append
O_DIRECT finished.
This is to make sure block allocation and inode size are consistent.
Signed-off-by: Weiwei Wang wangww...@huawei.com
Reviewed-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/aops.c | 178
++--
1
.
Here the original functions ocfs2_orphan_add and ocfs2_orphan_del are
called respectively.
Signed-off-by: Weiwei Wang wangww...@huawei.com
Reviewed-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/journal.h | 5 ++
fs/ocfs2/namei.c | 147
On 2014/10/11 20:32, WeiWei Wang wrote:
Now append O_DIRECT write to a hole will try direct io first, then
fallback to buffered IO if fails.
Signed-off-by: Weiwei Wang wangww...@huawei.com
Reviewed-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/file.c | 93
From: Weiwei Wang wangww...@huawei.com
Eliminate the static flag of some functions which will be used in
append O_DIRECT write.
Signed-off-by: Weiwei Wang wangww...@huawei.com
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/file.c | 11 +--
fs/ocfs2/file.h | 9 +
2
for the same inode.
Signed-off-by: Weiwei Wang wangww...@huawei.com
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/journal.h | 5 +
fs/ocfs2/namei.c | 315 +
fs/ocfs2/namei.h | 5 +
fs/ocfs2/ocfs2_fs.h| 5 +-
fs/ocfs2
-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/aops.c | 191 +++-
1 file changed, 188 insertions(+), 3 deletions(-)
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 1ef547e..eb41ede 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
From: Weiwei Wang wangww...@huawei.com
Allow blocks allocation in ocfs2_direct_IO_get_blocks.
Signed-off-by: Weiwei Wang wangww...@huawei.com
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/aops.c | 45 ++---
1 file changed, 42 insertions(+), 3
From: Weiwei Wang wangww...@huawei.com
Now we can do direct io and do not fallback to buffered IO any more
in case of append O_DIRECT write.
Signed-off-by: Weiwei Wang wangww...@huawei.com
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/file.c | 5 -
1 file changed, 4 insertions
From: Weiwei Wang wangww...@huawei.com
Now append O_DIRECT write to a hole will try direct io first, then
fallback to buffered IO if fails.
Signed-off-by: Weiwei Wang wangww...@huawei.com
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/file.c | 92
We tested this patch and it works well.
Thanks.
Tested-by: Joseph Qi joseph...@huawei.com
On 2014/10/29 6:24, Srinivas Eeda wrote:
Node A sends master query request to node B which is the master. At this time
lockres happens to be on purgelist. dlm_master_request_handler gets the dlm
spinlock
.
If this case happens, we let it wait for orphan recovery first.
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/inode.h | 2 ++
fs/ocfs2/journal.c | 2 ++
fs/ocfs2/namei.c | 37 +++--
fs/ocfs2/super.c | 2 ++
4 files changed, 41 insertions(+), 2
You are right. Actually Andrew has already fixed this in mm tree.
Thanks.
On 2014/10/31 20:29, Sudip Mukherjee wrote:
code was getting confusing as the priority of both the
operators ! and are same.
this change is done to just to improve the readability
of the code.
Signed-off-by: Sudip
Does it mean we can ignore the failure of creating debugfs?
On 2014/10/21 23:02, Jan Kara wrote:
Remove assignment which is never used.
Coverity-id: 1227009
Signed-off-by: Jan Kara j...@suse.cz
---
fs/ocfs2/super.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git
Looks good to me. Thanks.
Reviewed-by: Joseph Qi joseph...@huawei.com
On 2014/11/6 15:07, Jan Kara wrote:
Error handling if creation of root of debugfs in ocfs2_init() fails is
broken. Although error code is set we fail to exit ocfs2_init() with
error and thus initialization ends with success
...@huawei.com
Signed-off-by: Joseph Qi joseph...@huawei.com
Reviewed-by: joyce.xue xuejiu...@huawei.com
---
fs/ocfs2/aops.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 38e5a9f..cf4be6a 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -731,6 +731,7
In dlm_process_recovery_data, only when dlm_new_lock failed the ret
will be set to -ENOMEM. And in this case, newlock is definitely NULL.
So test newlock is meaningless, remove it.
Signed-off-by: Joseph Qi joseph...@huawei.com
Reviewed-by: Alex Chen alex.c...@huawei.com
---
fs/ocfs2/dlm
Hi Mark,
I much appreciate your pertinent comments on this feature.
The reason we use orphan dir is to make sure allocating blocks and
updating inode size consistent, and this will result an entry in orphan
is not truly deleted one.
To distinguish dio from unlink, we introduce a new dinode flag
On 2014/12/20 4:33, Mark Fasheh wrote:
On Fri, Dec 19, 2014 at 11:37:56AM +0800, Joseph Qi wrote:
Hi Mark,
I much appreciate your pertinent comments on this feature.
The reason we use orphan dir is to make sure allocating blocks and
updating inode size consistent, and this will result
Hi Andrew,
On 2015/2/5 8:00, Andrew Morton wrote:
Thsi time I have only four patches which I consider need expert review,
please.
ocfs2-prune-the-dcache-before-deleting-the-dentry-of-directory.patch
o2dlm-fix-null-pointer-dereference-in-o2dlm_blocking_ast_wrapper.patch
(Joseph Qi had
Define two orphan recovery types, which indicates if need truncate file or
not.
Signed-off-by: Joseph Qi joseph...@huawei.com
Cc: Weiwei Wang wangww...@huawei.com
---
fs/ocfs2/journal.c | 108 +++--
fs/ocfs2/ocfs2.h | 5 +++
2 files changed, 93
Allow blocks allocation in ocfs2_direct_IO_get_blocks.
Signed-off-by: Joseph Qi joseph...@huawei.com
Cc: Weiwei Wang wangww...@huawei.com
---
fs/ocfs2/aops.c | 45 ++---
1 file changed, 42 insertions(+), 3 deletions(-)
diff --git a/fs/ocfs2/aops.c b/fs
Implement ocfs2_direct_IO_write. Add the inode to orphan dir first, and
then delete it once append O_DIRECT finished.
This is to make sure block allocation and inode size are consistent.
Signed-off-by: Joseph Qi joseph...@huawei.com
Cc: Weiwei Wang wangww...@huawei.com
---
fs/ocfs2/aops.c
...@huawei.com
Signed-off-by: Joseph Qi joseph...@huawei.com
---
fs/ocfs2/inode.h | 2 ++
fs/ocfs2/journal.c | 2 ++
fs/ocfs2/namei.c | 37 +
fs/ocfs2/super.c | 2 ++
4 files changed, 43 insertions(+)
diff --git a/fs/ocfs2/inode.h b/fs/ocfs2/inode.h
index ca3431e
Add functions to add inode to orphan dir and remove inode in orphan dir.
Here we do not call ocfs2_prepare_orphan_dir and ocfs2_orphan_add
directly. Because append O_DIRECT will add inode to orphan two and may
result in more than one orphan entry for the same inode.
Signed-off-by: Joseph Qi
Prepare some interfaces which will be used in append O_DIRECT write.
Signed-off-by: Joseph Qi joseph...@huawei.com
Cc: Weiwei Wang wangww...@huawei.com
---
fs/ocfs2/file.c | 11 +--
fs/ocfs2/file.h | 9 +
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/fs/ocfs2
Intruduce a bit OCFS2_FEATURE_RO_COMPAT_APPEND_DIO and check it in
write flow. If the bit is not set, fall back to the old way.
Signed-off-by: Joseph Qi joseph...@huawei.com
Cc: Weiwei Wang wangww...@huawei.com
---
fs/ocfs2/file.c | 17 -
fs/ocfs2/ocfs2.h| 8
fs
Currently in case of append O_DIRECT write (block not allocated yet),
ocfs2 will fall back to buffered I/O. This has some disadvantages.
Firstly, it is not the behavior as expected.
Secondly, it will consume huge page cache, e.g. in mass backup scenario.
Thirdly, modern filesystems such as ext4
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 fall back to buffered I/O. This has some disadvantages.
Firstly, it is not the behavior as expected.
Secondly, it will consume huge page cache, e.g
1 - 100 of 412 matches
Mail list logo