All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 03/15] ocfs2/xattr: Move clusters free	into dealloc.
Date: Mon, 3 Nov 2008 19:17:42 -0800	[thread overview]
Message-ID: <20081104031742.GD16483@mail.oracle.com> (raw)
In-Reply-To: <1225345335-11527-3-git-send-email-tao.ma@oracle.com>

On Thu, Oct 30, 2008 at 01:42:13PM +0800, Tao Ma wrote:
> Move clusters free process into dealloc context so that
> they can be freed after the transaction.
> 
> Signed-off-by: Tao Ma <tao.ma@oracle.com>
> ---
>  fs/ocfs2/xattr.c |   14 +-------------
>  1 files changed, 1 insertions(+), 13 deletions(-)
> 
> diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
> index dc90ffb..7605677 100644
> --- a/fs/ocfs2/xattr.c
> +++ b/fs/ocfs2/xattr.c
> @@ -455,7 +455,6 @@ static int __ocfs2_remove_xattr_range(struct inode *inode,
>  	int ret;
>  	u64 phys_blkno = ocfs2_clusters_to_blocks(inode->i_sb, phys_cpos);
>  	struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
> -	struct inode *tl_inode = osb->osb_tl_inode;
>  	handle_t *handle;
>  	struct ocfs2_alloc_context *meta_ac = NULL;
>  	struct ocfs2_extent_tree et;
> @@ -468,16 +467,6 @@ static int __ocfs2_remove_xattr_range(struct inode *inode,
>  		return ret;
>  	}
>  
> -	mutex_lock(&tl_inode->i_mutex);
> -
> -	if (ocfs2_truncate_log_needs_flush(osb)) {
> -		ret = __ocfs2_flush_truncate_log(osb);
> -		if (ret < 0) {
> -			mlog_errno(ret);
> -			goto out;
> -		}
> -	}
> -
>  	handle = ocfs2_start_trans(osb, OCFS2_REMOVE_EXTENT_CREDITS);
>  	if (IS_ERR(handle)) {
>  		ret = PTR_ERR(handle);
> @@ -507,14 +496,13 @@ static int __ocfs2_remove_xattr_range(struct inode *inode,
>  		goto out_commit;
>  	}
>  
> -	ret = ocfs2_truncate_log_append(osb, handle, phys_blkno, len);
> +	ret = ocfs2_cache_clusters_dealloc(dealloc, phys_blkno, len);

[Referring to the discussion of the previous patch]
	See, in the old code you called __ocfs2_remove_xattr_range()
once per extend, so the check for needs_flush() and the call to
log_append() were just like ocfs2_commit_truncate().  In the new code,
you move the handling into the dealloc context, but the actual mechanics
of deleting the clusters inside ocfs2_run_deallocs() need to be correct.
	This patch is fine, btw.

Joel

-- 

"All alone at the end of the evening
 When the bright lights have faded to blue.
 I was thinking about a woman who had loved me
 And I never knew"

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

  reply	other threads:[~2008-11-04  3:17 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30 11:31 [Ocfs2-devel] [PATCH 00/15] ocfs2: add security EA and ACL support V4 Tiger Yang
2008-10-30  5:42 ` [Ocfs2-devel] [PATCH 01/15] ocfs2/xattr: Only extend xattr bucket in need Tao Ma
2008-11-06 19:45   ` Mark Fasheh
2008-11-07  1:05     ` Tao Ma
2008-10-30  5:42 ` [Ocfs2-devel] [PATCH 02/15] ocfs2: Add clusters free in dealloc_ctxt Tao Ma
2008-11-04  1:16   ` Joel Becker
2008-11-04  1:34     ` Tao Ma
2008-11-04  3:01       ` Joel Becker
2008-11-04  3:07         ` Tao Ma
2008-11-04  7:40         ` Joel Becker
2008-11-04 23:25     ` [Ocfs2-devel] [PATCH 02/15] ocfs2: Add clusters free in dealloc_ctxt.v2 Tao Ma
2008-11-05 22:25       ` Joel Becker
2008-11-06  6:08         ` Tao Ma
2008-10-30  5:42 ` [Ocfs2-devel] [PATCH 03/15] ocfs2/xattr: Move clusters free into dealloc Tao Ma
2008-11-04  3:17   ` Joel Becker [this message]
2008-10-30  5:42 ` [Ocfs2-devel] [PATCH 04/15] ocfs2/xattr: Reserve meta/data at the beginning of ocfs2_xattr_set Tao Ma
2008-11-07  0:11   ` Mark Fasheh
2008-11-07  1:10     ` Tao Ma
2008-10-30  5:42 ` [Ocfs2-devel] [PATCH 05/15] ocfs2/xattr: Merge xattr set transaction Tao Ma
2008-11-07 22:46   ` Joel Becker
2008-10-30 11:40 ` [Ocfs2-devel] [PATCH 06/15] ocfs2: move new_inode out of the transaction Tiger Yang
2008-11-07  1:02   ` Mark Fasheh
2008-10-30 11:40 ` [Ocfs2-devel] [PATCH 07/15] ocfs2: add ocfs2_xattr_set_handle Tiger Yang
2008-11-07  1:03   ` Mark Fasheh
2008-10-30 11:40 ` [Ocfs2-devel] [PATCH 08/15] ocfs2: add security xattr API Tiger Yang
2008-11-07  1:17   ` Mark Fasheh
2008-11-07  1:17     ` Mark Fasheh
2008-10-30 11:41 ` [Ocfs2-devel] [PATCH 09/15] ocfs2: add ocfs2_init_security in mkno Tiger Yang
2008-10-30 11:41 ` [Ocfs2-devel] [PATCH 10/15] ocfs2: add ocfs2_xattr_get_nolock Tiger Yang
2008-10-30 11:41 ` [Ocfs2-devel] [PATCH 11/15] ocfs2: add POSIX ACL API Tiger Yang
2008-11-07  1:26   ` Mark Fasheh
2008-10-30 11:41 ` [Ocfs2-devel] [PATCH 12/15] ocfs2: add ocfs2_check_acl Tiger Yang
2008-10-30 11:42 ` [Ocfs2-devel] [PATCH 13/15] ocfs2: add ocfs2_acl_chmod Tiger Yang
2008-11-07  1:33   ` Mark Fasheh
2008-10-30 11:42 ` [Ocfs2-devel] [PATCH 14/15] ocfs2: add ocfs2_init_acl in mknod Tiger Yang
2008-10-30 11:42 ` [Ocfs2-devel] [PATCH 15/15] ocfs2: add mount option and Kconfig option for acl Tiger Yang
2008-10-30 13:45 ` [Ocfs2-devel] [PATCH 00/15] ocfs2: add security EA and ACL support V4 Tao Ma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081104031742.GD16483@mail.oracle.com \
    --to=joel.becker@oracle.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.