[Ocfs2-devel] [Patch] use asynchronous journal commit in
ocfs_rename
Ling, Xiaofeng
xiaofeng.ling at intel.com
Tue Aug 3 04:49:57 CDT 2004
ok. I've made the patch. see attach.
>-----Original Message-----
>From: Mark Fasheh [mailto:mark.fasheh at oracle.com]
>Sent: 2004Äê7ÔÂ31ÈÕ 0:01
>To: Ling, Xiaofeng
>Cc: Ocfs2-Devel
>Subject: Re: [Ocfs2-devel] [Patch] use asynchronous journal
>commit in ocfs_rename
>
>On Thu, Jul 29, 2004 at 08:36:54AM +0800, Ling, Xiaofeng wrote:
>> Use asynchronous commit in ocfs_rename can make the speed of rename
>> from 95dir/s to 11834dir/s.
>Cool. the patch looks good at first glance. Would you be interested in
>taking it one step further and doing the same for the last couple sync
>transactions? (link, truncate, and symlink)
>
>Basically the same thing you just did here. The best thing in
>fact would be
>to just get rid of those flags (and the code which acts on
>them) altogether.
>
>It's about time we got rid of that junk.
> --Mark
>
>>
>---------------------------------------------------------------
>---------
>> ---------------------
>> Index: namei.c
>> ===================================================================
>> --- namei.c (revision 1312)
>> +++ namei.c (working copy)
>> @@ -1049,6 +1049,8 @@
>> goto bail;
>> }
>>
>> + ocfs_handle_set_checkpoint(handle, 0);
>> + ocfs_handle_set_sync(handle, 0);
>> /* if old and new are the same, this'll just do one lock. */
>> status = ocfs_double_lock(osb, handle,
>> OCFS_LKM_EXMODE,
>> @@ -1084,6 +1086,9 @@
>> LOG_ERROR_STATUS(status);
>> goto finally;
>> }
>> +
>> + ocfs_handle_add_lock(handle, OCFS_LKM_EXMODE,
>> + FLAG_FILE_CREATE | FLAG_DIR, old_inode);
>> got_oldlock = 1;
>>
>> if (S_ISDIR(old_inode->i_mode)) {
>> @@ -1157,6 +1162,8 @@
>> }
>> got_newlock = 1;
>>
>> + ocfs_handle_add_lock(handle, OCFS_LKM_EXMODE,
>> + FLAG_FILE_CREATE | FLAG_DIR, new_inode);
>> /* if our caching is working right, then after the
>> * verify_update_inode, newfe->i_nlink ==
>> * new_inode->i_nlink */
>> @@ -1294,16 +1301,7 @@
>> status = 0;
>>
>> bail:
>> - if (got_oldlock) {
>> - ocfs_release_lock(osb, OCFS_LKM_EXMODE, oldfe_flags,
>> - old_inode);
>> - }
>>
>> - if (got_newlock) {
>> - ocfs_release_lock(osb, OCFS_LKM_EXMODE, newfe_flags,
>> - new_inode);
>> - }
>> -
>> double_up_write(&OCFS_I(old_dir)->ip_io_sem,
>> &OCFS_I(new_dir)->ip_io_sem);
>> up_write(&OCFS_I(old_inode)->ip_io_sem);
>> _______________________________________________
>> Ocfs2-devel mailing list
>> Ocfs2-devel at oss.oracle.com
>> http://oss.oracle.com/mailman/listinfo/ocfs2-devel
>--
>Mark Fasheh
>Software Developer, Oracle Corp
>mark.fasheh at oracle.com
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: allasync.patch
Type: application/octet-stream
Size: 4982 bytes
Desc: allasync.patch
Url : http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20040803/41942687/allasync.obj
More information about the Ocfs2-devel
mailing list