[Ocfs2-devel] a patch on ocfs2

2007-04-17 Thread wengang wang
); __dlm_print_one_lock_resource(res); + spin_unlock(res-spinlock); goto leave; } -- Wengang Wang Member of Technical Staff Oracle China Development Center Open Source Technologies Development Tel: +86 10 8278 6265 Mobile: +86 13381078925

[Ocfs2-devel] [PATCH] ocfs2_dlm: add spinlock protection before __dlm_print_one_lock_resource is called

2007-04-17 Thread wengang wang
dlm_print_one_lock_resource instead of __dlm_print_one_lock_resource. Signed-off-by: wengang wang [EMAIL PROTECTED] Index: ocfs2-1.2.5/fs/ocfs2/dlm/dlmconvert.c === --- ocfs2-1.2.5/fs/ocfs2/dlm/dlmconvert.c.orig 2007-04-18 11:15

[Ocfs2-devel] [PATCH 1/1] ocfs2: add dlm context printing in dlm debug

2008-01-08 Thread wengang wang
add dlm context printing support in dlm debugging - echo 'd' /proc/fs/ocfs2_dlm/debug prints all dlm contexts. - echo 'D UUID' /proc/fs/ocfs2_dlm/debug prints the context of the specified dlm Signed-off-by: wengang wang [EMAIL PROTECTED] Singed-off-by: Tao Ma [EMAIL PROTECTED] --- dlmdebug.c

Re: [Ocfs2-devel] [PATCH 1/1] ocfs2: add dlm context printing in dlm debug

2008-01-08 Thread wengang wang
the patch is based on 1.2.3 thanks, wengang. wengang wang wrote: add dlm context printing support in dlm debugging - echo 'd' /proc/fs/ocfs2_dlm/debug prints all dlm contexts. - echo 'D UUID' /proc/fs/ocfs2_dlm/debug prints the context of the specified dlm Signed-off-by: wengang wang

Re: [Ocfs2-devel] [PATCH 0/3] Add inode stealing for ocfs2.V1

2008-02-22 Thread wengang wang
tao.ma wrote: wengang wang wrote: not know it clearly, but I remember when extending a file, meta is allocated in extent_alloc instead of inode_alloc if necessary(correct me if i am wrong). yes, extending a file using extent_alloc. But I'm stealing inode not extent block. So don't need

Re: [Ocfs2-devel] [PATCH 0/3] Add inode stealing for ocfs2.V1

2008-02-22 Thread wengang wang
list Ocfs2-devel@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs2-devel -- Wengang Wang Member of Technical Staff Oracle Asia RD Center Open Source Technologies Development Tel: +86 10 8278 6265 Mobile: +86 13381078925 ___ Ocfs2

[Ocfs2-devel] [PATCH 1/1] ocfs2: check return value of ocfs2_journal_load()

2008-06-04 Thread wengang wang
we should check the return value of ocfs2_journal_load() before going on. this patch is based on 1.2 svn, but mainline git should has the same fix. Signed-off-by: wengang wang [EMAIL PROTECTED] --- super.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) -- Wengang Wang Member

[Ocfs2-devel] [PATCH 1/1] ocfs2: error handling for ocfs2_setup_io_locks()

2008-06-24 Thread wengang wang
in case of no-memory, ocfs2_buffer_lock_ctxt_insert may returns -ENOMEM; then there may leave an unexpected up_read() on mm-mmap_sem. this patch fixes that problem. this patch is based on 1.2 svn. since this code is removed in kernel mainline source, no patch for mainline. Signed-off-by Wenwen

Re: [Ocfs2-devel] [BUGFIX][OCFS2 1/1] inode truncating

2008-06-30 Thread wengang wang
This patch is based on 1.2 svn, since there is no ip_mmu_private used in mainline, so maybe there is no such dead loop problem for mainline(not tested). thanks wengang. wengang wang wrote: /an ocfs2 bug: a truncate races with ocfs2_get_block(...,0). 1) 'dd' is doing a truncate, clearing

Re: [Ocfs2-devel] [BUGFIX][OCFS2 1/1] inode truncating

2008-06-30 Thread wengang wang
/el5 or current mainline tested? Just want to know what has been tested. Also, please could you a file a bugzilla with the details. Especially the testcase. Will be useful as we will be able to test it in multiple envs. Thanks Sunil wengang wang wrote: /an ocfs2 bug: a truncate races

Re: [Ocfs2-devel] [PATCH 1/4] ocfs2/hb: Exposes list of heartbeating nodes via debugfs

2008-09-10 Thread wengang wang
: o2net_exit(); +out_o2hb: + o2hb_exit(); out: return ret; } -- Wengang Wang Member of Technical Staff Oracle Asia RD Center Open Source Technologies Development Tel: +86 10 8278 6265 Mobile: +86 13381078925 ___ Ocfs2-devel

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: add spin lock when accessing inode-i_nlink.

2008-09-22 Thread wengang wang
-drop_inode) drop = op-drop_inode; drop(inode); } wangang wang wrote: add spin lock when accessing inode-i_nlink in ocfs2_drop_inode(). the patch is against 1.2 svn. Signed-off-by: Wengang wang [EMAIL PROTECTED] -- Index: fs/ocfs2/inode.c

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: add nlink check in ocfs2_inode_revalidate()

2008-09-22 Thread wengang wang
OCFS2_INODE_DELETED ip_flags (between unlink and delete vote), the nlink may be 0. the patch is against 1.4 git. 1.2 svn should has the same patch with different line number. Signed-off-by: Wengang wang [EMAIL PROTECTED] -- diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 591e693..6b5a83e

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: unhash all dentries on a inode.

2008-09-22 Thread wengang wang
on the inode in inode cache or by ocfs2_lookup(). so I think there is no problem. without unhashing the dentries, dput() won't call dentry_iput(). thus the stale inode will be kept in memory for ever. --this is a problem. thanks, wengang. wengang wang wrote: Sunil, d_prune_aliases() unhashes

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: add spin lock when accessing inode-i_nlink.

2008-09-23 Thread wengang wang
Hi, Tao Ma wrote: Hi wengang, wengang wang wrote: Sunil and Srini, Yes, it's protected by the inode_lock. and thanks for your detail. well, I found a fragment of code in ocfs2_meta_lock_update(), #ifdef OCFS2_DELETE_INODE_WORKAROUND /* We might as well check this here - since

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: fix for nfs getting stale inode.

2008-10-23 Thread wengang wang
Joel Becker wrote: On Thu, Oct 23, 2008 at 04:33:32PM +0800, wengang wang wrote: Joel Becker wrote: What's the problem other than ESTALE? That's perfectly valid in the world of NFS. ESTALE is not a big problem, what is important is that: it cause kernel panic

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: fix for nfs getting stale inode.

2008-10-28 Thread wengang wang
Hi Sunil and Mark, any comment for this patch? the patch is for a bug fix. the customer hits this problem repeatedly. no matter if the patch is OK or not, please give me a response. thanks, wengang. wengang wang wrote: format was destroyed, paste it as attachment. thanks wengang. wengang

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V2).

2009-02-09 Thread Wengang Wang
Hi Joel, Joel Becker wrote: On Fri, Dec 12, 2008 at 05:00:44PM +0800, wengang wang wrote: Changes from V1: 1) separate lines into sub-functions. 2) use mlog(0, .. instead of mlog(ML_NOTICE, .. for stale error. Wengang, Sorry it took me so long to review this. You're going

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V2).

2009-02-09 Thread Wengang Wang
Joel Becker wrote: On Tue, Feb 10, 2009 at 09:33:28AM +0800, Wengang Wang wrote: one thing is that, the nfs_sync_lock will be one in count or more than one? I think having lots of this kind of lock(one for each meta block) will bring us least performance impact for deletions. well so much

[Ocfs2-devel] [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector()

2009-02-11 Thread wengang wang
checks IO error in ocfs2_get_sector(). this patch is based on 1.4 git. Signed-off-by: Wengang wang wen.gang.w...@oracle.com -- Index: fs/ocfs2/super.c === --- fs/ocfs2/super.c(revision 128) +++ fs/ocfs2/super.c(working copy

[Ocfs2-devel] [PATCH 1/1] OCFS2: add IO error check in ocfs2_get_sector() -v2

2009-02-11 Thread wengang wang
checks IO error in ocfs2_get_sector(). this patch is based on 1.4 git. Signed-off-by: Wengang wang wen.gang.w...@oracle.com -- Index: fs/ocfs2/super.c === --- fs/ocfs2/super.c(revision 128) +++ fs/ocfs2/super.c(working copy

[Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V3)

2009-02-17 Thread wengang wang
in ocfs2_get_dentry() and in PR mode in ocfs2_delete_inode(). so that mutliple ocfs2_delete_inode() can run concurrently in normal case. this patch is based on 1.4 git. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com -- dlmglue.c | 45 +++ dlmglue.h |2 + export.c

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V3)

2009-02-18 Thread Wengang Wang
this patch is based on 1.4 git. Going forward, fixes really need to be against mainline. Let's finish out this patch against 1.4 and then you can port it to mainline. But for the future, we fix against mainline and backport. Ok, I will follow that from next posting. You

[Ocfs2-devel] [PATCH 1/1] OCFS2: add error check for ocfs2_read_locked_inode() call

2009-02-20 Thread wengang wang
add error check for ocfs2_read_locked_inode() call. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com -- Index: inode.c === --- inode.c (revision 149) +++ inode.c (working copy) @@ -118,6 +118,7 @@ struct inode *ocfs2_iget

[Ocfs2-devel] [PATCH 1/1] OCFS2: add error check for ocfs2_read_locked_inode() call

2009-02-20 Thread wengang wang
(resend if my first attemp not failed) add error check for ocfs2_read_locked_inode() call. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com -- Index: inode.c === --- inode.c (revision 149) +++ inode.c (working copy

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V4)

2009-02-24 Thread Wengang Wang
+status = ocfs2_test_inode_bit(osb, blkno, set); +if (status 0) { +if (status == -EINVAL) { +/* meta block never be re-allocated as data block. + * nfsd gives us wrong blkno */ +status = -EEXIST; +}

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V4)

2009-02-25 Thread Wengang Wang
Joel Becker wrote: On Wed, Feb 25, 2009 at 11:44:00AM +0800, Wengang Wang wrote: + status = ocfs2_test_inode_bit(osb, blkno, set); + if (status 0) { + if (status == -EINVAL) { + /* meta block never be re-allocated as data block. + * nfsd gives

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V4)

2009-02-26 Thread Wengang Wang
Joel Becker wrote: On Wed, Feb 25, 2009 at 09:57:48PM +0800, Wengang Wang wrote: Joel Becker wrote: On Wed, Feb 25, 2009 at 11:44:00AM +0800, Wengang Wang wrote: +status = ocfs2_test_inode_bit(osb, blkno, set); +if (status 0) { +if (status == -EINVAL

[Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V5)

2009-02-27 Thread wengang wang
changes from v4: 1, let suballoc lock covers the checking of the group. 2, add/correct some log messages. 3, use ocfs2_read_group_descriptor() instead of diry reading the group. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com -- dlmglue.c | 45 dlmglue.h

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V5)

2009-03-02 Thread Wengang Wang
Joel Becker wrote: On Mon, Mar 02, 2009 at 10:16:00AM +0800, Wengang Wang wrote: Other than that, I think this patch is done! Do you have a test to test it? I tested against V4 which checks group without sub allocator cluster lock taken. the test case is: 1) 2 nodes env 2) each node

[Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V6)

2009-03-02 Thread wengang wang
in ocfs2_get_dentry() and in PR mode in ocfs2_delete_inode(). so that mutliple ocfs2_delete_inode() can run concurrently in normal case. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com -- dlmglue.c | 45 dlmglue.h |2 export.c | 77

[Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V6)

2009-03-04 Thread wengang wang
on them in reverse order. nfs_sync_lock is locked in EX mode in ocfs2_get_dentry() and in PR mode in ocfs2_delete_inode(). so that mutliple ocfs2_delete_inode() can run concurrently in normal case. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com -- dlmglue.c | 45

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V6)

2009-03-04 Thread Wengang Wang
Wengang, Thanks for working so hard on this. My pleasure! and I also learnt during the progress:) I'm going to poke Mark to include it. Now we can go back and do the 1.4 patch. Can you cook that up? It should be almost the same. sure. well, what about 1.2? regards, wengang.

[Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V6.2)

2009-03-04 Thread wengang wang
() lock on them in reverse order. nfs_sync_lock is locked in EX mode in ocfs2_get_dentry() and in PR mode in ocfs2_delete_inode(). so that mutliple ocfs2_delete_inode() can run concurrently in normal case. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com -- diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2

[Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (for 1.4git)

2009-03-06 Thread wengang wang
is locked in EX mode in ocfs2_get_dentry() and in PR mode in ocfs2_delete_inode(). so that mutliple ocfs2_delete_inode() can run concurrently in normal case. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com -- dlmglue.c | 45 dlmglue.h |2 export.c | 79

Re: [Ocfs2-devel] [PATCH] ocfs2: Fix 2 warning during ocfs2 make.

2009-03-19 Thread Wengang Wang
while, the slot is type of u32 in for functions... Wengang Wang wrote: Hi Tao, I think for the OCFS2_INVALID_SLOT problem, define OCFS2_INVALID_SLOT as (u16)-1 is better. so that we needn't force convert type wherever it's used. --- fs/ocfs2/ocfs2_fs.h 2009-02-18 19:58:02.0

Re: [Ocfs2-devel] [PATCH] ocfs2: Fix 2 warning during ocfs2 make.

2009-03-19 Thread Wengang Wang
yes, that's the problem. we'd better unify the different types(but could be another patch). since the on disk is u16, modifying other types to u16 is fine :) thanks, wengang. Tao Ma wrote: Hi wengang, Wengang Wang wrote: Hi Tao, I think for the OCFS2_INVALID_SLOT problem, define

[Ocfs2-devel] [PATCH 1/1] OCFS2: 64-bit inode number for getattr() instead of 32-bit value

2009-03-27 Thread wengang wang
generic_fillattr() with ip_blkno(u64). Signed-off-by: Wengang Wang wen.gang.w...@oracle.com -- diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index a5887df..ffe7d34 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -1076,6 +1076,8 @@ int ocfs2_getattr(struct vfsmount *mnt, /* We set

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V3)

2009-04-09 Thread Wengang Wang
/lockid.c = include/ocfs2-kernel/ocfs2_lockid.h (copy from kernel) Wengang Wang wrote: It will need to be added to debugfs.ocfs2's lock displays. what's this in detail? the display for debugfs.ocfs2 -d lockres? such as the rename lock [r...@ocfs2-2 ~]# debugfs.ocfs2 -d

[Ocfs2-devel] [PATCH 1/1] OCFS2: fasten dlm_lock_resource hash_table lookups

2009-04-22 Thread wengang wang
#backporting the 3 patches at http://kernel.us.oracle.com/~smushran/srini/ to 1.2. enlarge hash_table capacity to fasten hash_table lookups. Signed-off-by: Wengang wang wen.gang.w...@oracle.com -- diff -up ./svnocfs2-1.2/fs/ocfs2/dlm/dlmdebug.c.orig ./svnocfs2-1.2/fs/ocfs2/dlm/dlmdebug.c

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: Log -EIO errors just when hit them.

2009-04-22 Thread Wengang Wang
Hi Sunil and Joel, For the EIO log problem, ocfs2_end_buffer_io_sync() is used as the callback function b_end_io for both READ and WRITE. I noticed that in this function, if (!uptodate) mlog_errno(-EIO); Isn't the 2 lines enough to log EIO errors? regards, wengang. Sunil Mushran wrote:

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: Log -EIO errors just when hit them.

2009-04-22 Thread Wengang Wang
Hi, I noticed ocfs2_end_buffer_io_sync() is only for 1.2 need to do something for 1.4 regards, wengang. Wengang Wang wrote: Hi Sunil and Joel, For the EIO log problem, ocfs2_end_buffer_io_sync() is used as the callback function b_end_io for both READ and WRITE. I noticed

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: fasten dlm_lock_resource hash_table lookups

2009-04-22 Thread Wengang Wang
Sunil wengang wang wrote: #backporting the 3 patches at http://kernel.us.oracle.com/~smushran/srini/ to 1.2. enlarge hash_table capacity to fasten hash_table lookups. ___ Ocfs2-devel mailing list Ocfs2-devel@oss.oracle.com http://oss.oracle.com

[Ocfs2-devel] [PATCH 0/3] OCFS2: speed up dlm_lock_resouce hash_table lookups

2009-04-30 Thread wengang wang
backporting from mainline. --http://kernel.us.oracle.com/~smushran/srini/ #I think the first line of the 3 patches contain mainline git commit, does them? enlarge hash_table capacity to fasten hash_table lookups. ___ Ocfs2-devel mailing list

[Ocfs2-devel] [PATCH 1/3] OCFS2: speed up dlm_lockr_resouce hash_table lookups

2009-04-30 Thread wengang wang
use multiple pages for the hash table. mainline git commit: 03d864c02c3ea803b1718940ac6953a257182d7a Authored-by: Daniel Phillips phill...@google.com Signed-off-by: Wengang Wang wen.gang.w...@oracle.com -- Index: ocfs2-1.2/fs/ocfs2/dlm/dlmdomain.c

[Ocfs2-devel] [PATCH 2/3] OCFS2: speed up dlm_lockr_resouce hash_table lookups

2009-04-30 Thread wengang wang
allocates at least one page. mainline git commit: c8f33b6e86af74ee7b800f57cac7b3c8559318fe Authored-by: Joel Becker joel.bec...@oracle.com Signed-off-by: Wengang Wang wen.gang.w...@oracle.com -- Index: ocfs2-1.2/fs/ocfs2/dlm/dlmcommon.h

[Ocfs2-devel] [PATCH 3/3] OCFS2: speed up dlm_lock_resouce hash_table lookups

2009-04-30 Thread wengang wang
enlarge hash table. mainline git commit: ffae48e79e56fe63589049a0bf3512bcbf7a4327 Authored-by: Jan Kara j...@suse.cz Signed-off-by: Wengang Wang wen.gang.w...@oracle.com -- Index: ocfs2-1.2/fs/ocfs2/dlm/dlmcommon.h === --- ocfs2-1.2

[Ocfs2-devel] [SUGGESSTION 1/1] OCFS2: automatic dlm hash table size

2009-06-07 Thread wengang wang
backgroud: ocfs2 dlm uses a hash table to store dlm_lock_resource objects. the often used lookup is performed on the hash table. problem: for usages that there are huge number of inodes(thus huge number of dlm_lock_resource objects) in a ocfs2 volume, the lookup performance

[Ocfs2-devel] [SUGGESSTION 1/1] OCFS2: runtime tunable network idle timeout

2009-06-07 Thread wengang wang
backgroud: there is a network idle timeout regarding which a node is considered dead or network partition occures. problem: for some product environment, there is a special time during a day. in this special time, a backup work is happening over private network. at the time

Re: [Ocfs2-devel] [SUGGESSTION 1/1] OCFS2: automatic dlm hash table size

2009-06-08 Thread Wengang Wang
Hi Tao, pls check inline. Tao Ma wrote: Hi Wengang, Regards, Tao wengang wang wrote: backgroud: ocfs2 dlm uses a hash table to store dlm_lock_resource objects. the often used lookup is performed on the hash table. problem: for usages that there are huge number of inodes

Re: [Ocfs2-devel] [SUGGESSTION 1/1] OCFS2: automatic dlm hash table size

2009-06-08 Thread Wengang Wang
Hi Tao, Tao Ma wrote: hi wengang, Wengang Wang wrote: Hi Tao, pls check inline. Tao Ma wrote: Hi Wengang, Regards, Tao wengang wang wrote: backgroud: ocfs2 dlm uses a hash table to store dlm_lock_resource objects. the often used lookup is performed on the hash table

Re: [Ocfs2-devel] [SUGGESSTION 1/1] OCFS2: automatic dlm hash table size

2009-06-08 Thread Wengang Wang
Sunil, Sunil Mushran wrote: Wengang Wang wrote: just increasing it works. I'm concerning memory waste for few inodes usage case. I don't know how large it is going to be in the future.. even now, I just don't hope a memory waste though it's small though memory is cheap now... :) So, we

[Ocfs2-devel] [PATCH 1/1] a fix of logging return value.

2009-07-09 Thread Wengang Wang
in ocfs2_file_aio_write(), log_exit() could don't log the value which is really returned. this patch fixes it. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/file.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2

Re: [Ocfs2-devel] [PATCH 1/1] a fix of logging return value.

2009-07-10 Thread Wengang Wang
Hi Sunil, Ok. I will post patche(s) for it later. regards, wengang. Sunil Mushran wrote: sob Hi Wengang, functions is aops.c are missing mlogs. Do you have the bandwidth to help out? On Jul 9, 2009, at 10:26 PM, Wengang Wang wen.gang.w...@oracle.com wrote: in ocfs2_file_aio_write

Re: [Ocfs2-devel] [PATCH 1/1] a fix of logging return value.

2009-07-10 Thread Wengang Wang
Sunil, in the src, I see both mlog(ML_ERROR...)(finally printk(KERN_ERR...)) and ocfs2_error()(finally printk(KERN_CRIT...). could you tell me in what case one should be used? regards, wengang. Wengang Wang wrote: Hi Sunil, Ok. I will post patche(s) for it later. regards, wengang

[Ocfs2-devel] [PATCH 1/1] adds mlogs to aops.c

2009-07-12 Thread Wengang Wang
this patch adds mlogs to apos to help tracing. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/aops.c | 233 --- 1 files changed, 189 insertions(+), 44 deletions(-) diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index

[Ocfs2-devel] [PATCH 1/1] fixes a dangerous typo

2009-07-12 Thread Wengang Wang
Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/aops.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index b730010..a10c989 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -1397,7 +1397,7 @@ static int

[Ocfs2-devel] [PATCH 1/1] fails ocfs2_get_block() immediately when hit -EIO

2009-07-12 Thread Wengang Wang
fails ocfs2_get_block() immediately when hit -EIO Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/aops.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index a10c989..9dfdf46 100644 --- a/fs/ocfs2/aops.c +++ b/fs

Re: [Ocfs2-devel] [PATCH 1/1] fixes a dangerous typo

2009-07-20 Thread Wengang Wang
Ok, I will be descriptive for posts in the future. regards, wengang. Joel Becker wrote: On Mon, Jul 13, 2009 at 11:38:23AM +0800, Wengang Wang wrote: Signed-off-by: Wengang Wang wen.gang.w...@oracle.com This change is in the fixes branch of ocfs2.git. However, in the future, the commit

[Ocfs2-devel] [PATCH 1/1] ocfs2: adds mlogs to aops.c -V2

2009-07-20 Thread Wengang Wang
this patch adds some mlogs to apos.c helping tracing and narrowing down bugs. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/aops.c | 242 +-- 1 files changed, 198 insertions(+), 44 deletions(-) diff --git a/fs/ocfs2

Re: [Ocfs2-devel] [PATCH 1/1] ocfs2: adds mlogs to aops.c -V2

2009-07-21 Thread Wengang Wang
Hi Joel, Joel Becker wrote: On Tue, Jul 21, 2009 at 10:52:52AM +0800, Wengang Wang wrote: @@ -565,6 +603,8 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock, * Any write past EOF is not allowed because we'd be extending. */ if (create (iblock

Re: [Ocfs2-devel] [PATCH 1/1] ocfs2: adds mlogs to aops.c -V2

2009-07-21 Thread Wengang Wang
. Thanks for taking on this task. my pleasure! regards, wengang. Sunil Wengang Wang wrote: Hi Joel, Joel Becker wrote: On Tue, Jul 21, 2009 at 10:52:52AM +0800, Wengang Wang wrote: @@ -565,6 +603,8 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock

[Ocfs2-devel] [PATCH] ocfs2: adds mlogs to aops.c -V3

2009-08-14 Thread Wengang Wang
this patch adds some mlogs to apos.c helping tracing and narrowing down bugs. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/aops.c | 205 +++ 1 files changed, 161 insertions(+), 44 deletions(-) diff --git a/fs/ocfs2/aops.c

Re: [Ocfs2-devel] [PATCH] ocfs2: adds mlogs to aops.c -V3

2009-08-27 Thread Wengang Wang
, 2009 at 02:02:39PM +0800, Wengang Wang wrote: this patch adds some mlogs to apos.c helping tracing and narrowing down bugs. Wengang, Have these traces been of use to you, or are you just adding some entry/exit traces because you see functions without them? Joel

Re: [Ocfs2-devel] [PATCH] ocfs2: adds mlogs to aops.c -V3

2009-08-28 Thread Wengang Wang
Hi Joel, Joel Becker wrote: On Fri, Aug 28, 2009 at 10:12:45AM +0800, Wengang Wang wrote: in fact, I had ever hit case that ocfs2 returns EIO, but even allowing ENTRY/EXIT, there is no log indicating that.. the bug number is 8627756. So I think we'd better add the logs to such functions

Re: [Ocfs2-devel] [PATCH] ocfs2: adds mlogs to aops.c -V3

2009-08-28 Thread Wengang Wang
Joel Becker wrote: On Fri, Aug 28, 2009 at 03:00:40PM +0800, Wengang Wang wrote: and for the patch its self, I think the log contents are for developers to check(not for customer to view), so we can know what are printed by checking the src... so I am printing some parameters without

[Ocfs2-devel] [PATCH] add assertions to stuffs with purge/unused lockres

2009-08-28 Thread Wengang Wang
remove the DLM_LOCK_RES_DIRTY flag later.. for 2), 4) and 5), I don't know if it's a good idea --developers maybe still using the original list_add_tail()/list_del_init .. for 6), maybe I should make separate patches.. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/dlm

Re: [Ocfs2-devel] [PATCH] add assertions to stuffs with purge/unused lockres

2009-09-02 Thread Wengang Wang
are the bad points with my patch? regards, wengang. Wengang Wang wrote: this is more a discusion than a patch. I had an ocfs2 bug(8801298). the problem is that with dlm-spinlock hold, dlm_run_purge_list() think the status of unuse of a lockres shouldn't change from unused to in-use

Re: [Ocfs2-devel] [PATCH] add assertions to stuffs with purge/unused lockres

2009-09-03 Thread Wengang Wang
Hi Sunil, Sunil Mushran wrote: It's too intrusive for a debug patch. And big too. Maybe we need this eventually. But for right now, it will be easier if we can narrow down the scope of the issue as quickly as possible. Ok. I will use the lockres dumping first. regards, wengang.

[Ocfs2-devel] [PATCH 1/1]ocfs2: add spinlock protection when dealing with lockres-purge.

2009-09-03 Thread Wengang Wang
when we check/modify lockres-purge, we should with the protection of lockres-spinlock. in dlm_purge_lockres(), the checking/modifying is not with the protectin. this patch fixes it. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/dlm/dlmthread.c |6 +- 1 files changed

[Ocfs2-devel] [PATCH] ocfs2: adds mlog_errno to aops.c

2009-09-03 Thread Wengang Wang
when an error is hit, printing the error number is helpful. this patch adds prints in such cases in aops.c. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/aops.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/ocfs2/aops.c b/fs/ocfs2

[Ocfs2-devel] [PATCH] ocfs2: adds mlog_errno to aops.c -V2

2009-09-08 Thread Wengang Wang
when an error is hit, printing the error number is helpful. this patch adds prints in such cases in aops.c. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- aops.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index

[Ocfs2-devel] [PATCH] ocfs2: remove DIR check in ocfs2_link

2009-09-09 Thread Wengang Wang
there is check on the inode whether it is a DIR in ocfs2_link(). the same check is done in vfs_link already, so remove it from ocfs2_link(). Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/namei.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/fs

[Ocfs2-devel] [PATCH 0/2] ocfs2: add trace event support for ocfs2

2009-09-16 Thread Wengang Wang
following patches add trace event support for ocfs2. for tracepoint, see Documentation/trace/tracepoints.txt for trace events, see Documentation/trace/events.txt the first patch add file include/trace/events/ocfs2.h to kernel tree. it is used to store trace declarations. it's contents are

[Ocfs2-devel] [PATCH 2/2] ocfs2: add trace event for ocfs2_file_aio_read

2009-09-16 Thread Wengang Wang
add trace event for ocfs2_file_aio_read(). Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/file.c |8 include/trace/events/ocfs2.h | 25 + 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/fs/ocfs2/file.c b/fs

[Ocfs2-devel] [PATCH 1/2] ocfs2: add trace event header for ocfs2

2009-09-16 Thread Wengang Wang
add trace event header for ocfs2. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- include/trace/events/ocfs2.h | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) create mode 100644 include/trace/events/ocfs2.h diff --git a/include/trace/events/ocfs2.h b

Re: [Ocfs2-devel] [PATCH 0/2] ocfs2: add trace event support for ocfs2

2009-09-17 Thread Wengang Wang
Wengang Wang wrote: following patches add trace event support for ocfs2. for tracepoint, see Documentation/trace/tracepoints.txt for trace events, see Documentation/trace/events.txt the first patch add file include/trace/events/ocfs2.h to kernel tree. it is used to store trace

Re: [Ocfs2-devel] [PATCH 1/1] ocfs2-devel: remove an invalid single quotation marks from the mlog string in dlm_unregister_domain()

2009-09-23 Thread Wengang Wang
Hi Jeff, Jeff Liu wrote: Following lockres' are still on the ^ here I guess lockres' means there could be more than one lockres there. ___ Ocfs2-devel mailing list Ocfs2-devel@oss.oracle.com

[Ocfs2-devel] [PATCH 2/2] ocfs2: add trace event for ocfs2_file_aio_read -v2

2009-10-11 Thread Wengang Wang
add trace event for ocfs2_file_aio_read(). diff with v1: TP_printk() treats the log as a single line, so we remove the new line mark(\n). Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/file.c |8 include/trace/events/ocfs2.h | 25

Re: [Ocfs2-devel] [PATCH 0/2] ocfs2: add trace event support for ocfs2

2009-10-13 Thread Wengang Wang
Hi all, Joel Becker wrote: On Thu, Sep 17, 2009 at 06:19:44AM +0800, Wengang Wang wrote: following patches add trace event support for ocfs2. Wengang, This looks like a nice start. Thank you for getting this going. I'm sorry I haven't gotten back until now, I've been busy. Joel

[Ocfs2-devel] [PATCH 1/2] ocfs2: add trace event header file for ocfs2

2009-11-26 Thread Wengang Wang
add trace event header file for ocfs2. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- include/trace/events/ocfs2.h | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) create mode 100644 include/trace/events/ocfs2.h diff --git a/include/trace/events/ocfs2.h b

[Ocfs2-devel] [PATCH 2/2] ocfs2: add trace event log to alloc.c

2009-11-26 Thread Wengang Wang
this patche adds trace event log to alloc.c. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/alloc.c | 47 +- include/trace/events/ocfs2.h | 202 ++ 2 files changed, 224 insertions(+), 25 deletions(-) diff --git

[Ocfs2-devel] [PATCH 1/1] OCFS2: don't leave free'd mle attached to hb events

2009-12-07 Thread wengang wang
() is called. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 83bcaf2..0df80e9 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c @@ -2498,11 +2498,12 @@ static int dlm_migrate_lockres(struct dlm_ctxt *dlm

Re: [Ocfs2-devel] [PATCH 1/1] OCFS2: don't leave free'd mle attached to hb events

2009-12-07 Thread Wengang Wang
Hi Sunil, Sunil Mushran wrote: NAK wengang wang wrote: don't leave free'd mle attached to hb events. in dlm_add_migration_mle() the mle is attched to heartbeat events anyway no matter there is an existing mle with same name(returns -EEXIST). dlm_migrate_lockres() calls

Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: add trace event log to alloc.c

2009-12-15 Thread Wengang Wang
Hi Joel, Joel Becker wrote: On Thu, Nov 26, 2009 at 08:15:32PM +0800, Wengang Wang wrote: this patche adds trace event log to alloc.c. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com Hey Wengang, Sorry I didn't respond sooner and left you hanging. This is good work. Thank

[Ocfs2-devel] [PATCH] ocfs2: set OCFS2_LOCK_BLOCKED properly

2010-01-05 Thread Wengang Wang
queued before this one), OCFS2_LOCK_BLOCKED stays there unexpectly. the fix is that setting that flag when dc(s) is really needed. Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/dlmglue.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/ocfs2

[Ocfs2-devel] [PATCH] ocfs2: fix __ocfs2_cluster_lock() dead lock

2010-01-06 Thread Wengang Wang
there is deadlock possibility in __ocfs2_cluster_lock(). the case is like following. #in time order 1) node A(the lock owner) is doing an up-convert(UC, PR-EX). it got the lock but didn't check BUSY flag again. 2) node B requested an UC on the same lock resource. since node A has an EX on the

Re: [Ocfs2-devel] [PATCH] ocfs2: set OCFS2_LOCK_BLOCKED properly

2010-01-06 Thread Wengang Wang
of a downconvert (or shortly after one). The set BLOCKED always code looks like it was trying to insure we never miss a contended lock, but it could be that we marked some needlessly. Wengang Wang wrote: for most cases ocfs2_generic_handle_bast() return 1 meaning that some down

[Ocfs2-devel] [PATCH 0/3] ocfs2: add freeze/thaw support

2010-01-09 Thread Wengang Wang
limitations: 1) only the THAW from the node from which FREEZE is issued takes effect. those from other nodes are ignored. 2) a nested cross cluster FREEZE is not supported. that means if a FREEZE is requested when the cluster is in frozen state(frozen from node A in the cluster) from a node other

[Ocfs2-devel] [PATCH 2/3] ocfs2:freeze-thaw: initialization and cleanup

2010-01-09 Thread Wengang Wang
this patch does some initialization and cleanup for freeze/thaw. Authored-by: Tiger Yang tiger.y...@oracle.com Authored-by: Wengang Wang wen.gang.w...@oracle.com Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/dlm/dlmapi.h |1 + fs/ocfs2/dlm/dlmlock.c | 12

[Ocfs2-devel] [PATCH 3/3] ocfs2:freeze-thaw: make it work

2010-01-09 Thread Wengang Wang
adds freeze_fs()/unfreeze_fs() for ocfs2 so that it supports freeze/thaw. Authored-by: Tiger Yang tiger.y...@oracle.com Authored-by: Wengang Wang wen.gang.w...@oracle.com Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/dlmglue.c | 108

[Ocfs2-devel] [PATCH 1/3] ocfs2:freeze-thaw: add freeze cluster lock

2010-01-09 Thread Wengang Wang
add cluster lock for freeze/thaw. change dlm version from 1.0 to 1.1 Authored-by: Tiger Yang tiger.y...@oracle.com Authored-by: Wengang Wang wen.gang.w...@oracle.com Signed-off-by: Wengang Wang wen.gang.w...@oracle.com --- fs/ocfs2/dlm/dlmdomain.c |6 +- fs/ocfs2/dlmglue.c | 28

Re: [Ocfs2-devel] [PATCH] ocfs2: fix __ocfs2_cluster_lock() dead lock

2010-01-09 Thread Wengang Wang
On 10-01-06 18:00, Joel Becker wrote: On Wed, Jan 06, 2010 at 04:34:44PM +0800, Wengang Wang wrote: there is deadlock possibility in __ocfs2_cluster_lock(). the case is like following. #in time order 1) node A(the lock owner) is doing an up-convert(UC, PR-EX). it got the lock

Re: [Ocfs2-devel] [PATCH] ocfs2: fix __ocfs2_cluster_lock() dead lock

2010-01-10 Thread Wengang Wang
Hi Joel and Sunil, Sure I agree with what is doing with the patches --It's just a reminder not to forget it :). regards, wengang. On 10-01-10 02:05, Joel Becker wrote: On Sat, Jan 09, 2010 at 10:24:10AM -0800, Sunil Mushran wrote: This needs testing. Joel has forwarded it to Fabbione who has

Re: [Ocfs2-devel] [PATCH] ocfs2: fix __ocfs2_cluster_lock() dead lock

2010-01-11 Thread Wengang Wang
Hi Joel, On 10-01-11 17:59, Joel Becker wrote: [Cc'd Mark and Dave] On Sun, Jan 10, 2010 at 02:05:22AM +0800, Wengang Wang wrote: 2) It sure looks like you're right. well, this doesn't sounds like a sob :) With good reason, too. You've got a bug. Dave Teigland (copied now

Re: [Ocfs2-devel] [PATCH] ocfs2: fix __ocfs2_cluster_lock() dead lock

2010-01-12 Thread Wengang Wang
Hi Joel, On 10-01-12 03:18, Joel Becker wrote: Date: Wed, 6 Jan 2010 16:34:44 +0800 Subject: [PATCH] ocfs2: fix __ocfs2_cluster_lock() livelock There is livelock possibility in __ocfs2_cluster_lock(). Here's what happens: 1) node A(the lock owner) is doing an

Re: [Ocfs2-devel] [PATCH] ocfs2: fix __ocfs2_cluster_lock() dead lock

2010-01-12 Thread Wengang Wang
On 10-01-12 05:01, Joel Becker wrote: so maybe you don't notice the lockres-l_ops-check_downconvert()? I notice it. I know what it checks. If the lock is not currently taken it will return go ahead and downconvert. So we won't requeue, we'll downconvert. Specifically, look at

Re: [Ocfs2-devel] [PATCH] ocfs2: fix __ocfs2_cluster_lock() dead lock

2010-01-12 Thread Wengang Wang
Hi Joel and David, I think the patch to fix the deadlock(or livelock) is not good enough yet. my original patch is based on that when we have requested the lock, we don't allow to downconvert it before we release it. but per the communications with Joel and Sunil, I found my base is wrong. so my

Re: [Ocfs2-devel] [PATCH] ocfs2: fix __ocfs2_cluster_lock() dead lock

2010-01-12 Thread Wengang Wang
On 10-01-12 11:14, Sunil Mushran wrote: Wengang Wang wrote: Is it a rule that If the lock is not currently taken it will return go ahead and downconvert? In short, yes, because of fairness. Not having holders is one of the checks. If there are incompatible holders then it will requeue

Re: [Ocfs2-devel] [PATCH] ocfs2: fix __ocfs2_cluster_lock() dead lock

2010-01-12 Thread Wengang Wang
On 10-01-13 11:20, Wengang Wang wrote: Hi Joel and David, I think the patch to fix the deadlock(or livelock) is not good enough yet. my original patch is based on that when we have requested the lock, we don't allow to downconvert it before we release it. but per the communications

  1   2   3   4   >