From: Tao Ma <tao.ma@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 24/39] ocfs2: Add caching info for refcount tree.
Date: Fri, 08 May 2009 09:50:13 +0800 [thread overview]
Message-ID: <4A038FD5.8020803@oracle.com> (raw)
In-Reply-To: <20090508013258.GE31624@mail.oracle.com>
Joel Becker wrote:
> On Thu, Apr 30, 2009 at 06:58:36AM +0800, Tao Ma wrote:
>> +/* Caller must hold refcount tree lock. */
>> int ocfs2_decrease_refcount(struct inode *inode, struct buffer_head *di_bh,
>> handle_t *handle, u32 cpos, u32 len,
>> struct ocfs2_alloc_context *meta_ac,
>> @@ -1528,11 +1544,19 @@ int ocfs2_decrease_refcount(struct inode *inode, struct buffer_head *di_bh,
>> struct ocfs2_inode_info *oi = OCFS2_I(inode);
>> struct buffer_head *ref_root_bh = NULL;
>> struct ocfs2_dinode *di = (struct ocfs2_dinode *)di_bh->b_data;
>> + struct ocfs2_refcount_tree *tree;
>
> If the caller holds the lock, don't they have the tree
> structure? Can they pass it in?
I have thought of them before. But the most painful thing is in xattr
part. There are so many places in xattr.c which will call
ocfs2_decrease_refcount(in-body xattr set, in block xattr set, bucket
xattr set, xattr final remove etc), and I finally gave it up because
there are so many functions that is needed to change. And what's more,
if the xattr isn't refcounted, we passed so many NULL and used up too
much stack.
>> static int ocfs2_replace_cow(struct inode *inode,
>> struct buffer_head *di_bh,
>> struct buffer_head *ref_root_bh,
>> + struct ocfs2_caching_info *ref_ci,
>> u32 cow_start, u32 cow_len,
>> struct page **pages,
>> int num_pages)
>
> It would seem that you could pass the tree in here instead of
> just ref_ci. Then if you need to change what the functions do with the
> refcount_tree fields, it's already there.
yeah, you are right. Will do. Thanks.
Regards,
Tao
next prev parent reply other threads:[~2009-05-08 1:50 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-30 7:59 [Ocfs2-devel] [PATCH 00/39] ocfs2: Add reflink file support. V3 Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 01/39] ocfs2: Define refcount tree structure Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 02/39] ocfs2: Add metaecc for ocfs2_refcount_block Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 03/39] ocfs2: Add ocfs2_read_refcount_block Tao Ma
2009-04-30 23:17 ` Joel Becker
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 04/39] ocfs2: Basic tree root operation Tao Ma
2009-04-30 23:33 ` Joel Becker
2009-05-01 6:47 ` Tao Ma
2009-05-02 3:55 ` Joel Becker
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 05/39] ocfs2: hook remove refcount tree into truncate Tao Ma
2009-04-30 23:35 ` Joel Becker
2009-05-01 6:48 ` Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 06/39] ocfs2: Wrap ocfs2_extent_contig in ocfs2_extent_tree Tao Ma
2009-04-30 23:43 ` Joel Becker
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 07/39] ocfs2: Abstract extent split process Tao Ma
2009-04-30 23:57 ` Joel Becker
2009-05-05 6:35 ` Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 08/39] ocfs2: Add refcount b-tree as a new extent tree Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 09/39] ocfs2: export tree operation functions Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 10/39] ocfs2: Add support for incrementing refcount in the tree Tao Ma
2009-05-02 3:53 ` Joel Becker
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 11/39] ocfs2: Add support of decrementing refcount for delete Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 12/39] ocfs2: Add functions for extents refcounted Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 13/39] ocfs2: Hook 'Decrement refcount for delete' Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 14/39] ocfs2: Add CoW support Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 15/39] ocfs2: CoW refcount tree improvement Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 16/39] ocfs2: Add __ocfs2_reflink Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 17/39] ocfs2: Add ioctl for reflink Tao Ma
2009-05-01 7:34 ` Christoph Hellwig
2009-05-01 11:19 ` Joel Becker
2009-05-02 14:14 ` Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 18/39] ocfs2: Use proper parameter for some inode operation Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 19/39] ocfs2: Create reflinked file in orphan dir Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 20/39] ocfs2: Abstract caching info checkpoint Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 21/39] ocfs2: Add new refcount tree lock resource Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 22/39] ocfs2: Add refcount tree lock mechanism Tao Ma
2009-05-08 1:17 ` Joel Becker
2009-05-08 1:41 ` Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 23/39] ocfs2: lock refcount tree if needed Tao Ma
2009-05-08 1:30 ` Joel Becker
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 24/39] ocfs2: Add caching info for refcount tree Tao Ma
2009-05-08 1:32 ` Joel Becker
2009-05-08 1:50 ` Tao Ma [this message]
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 25/39] ocfs2: Add refcount tree find mechanism from an inode Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 26/39] ocfs2: Return extent flags for xattr value tree Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 27/39] ocfs2: Abstract duplicate clusters process in CoW Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 28/39] ocfs2: Add CoW support for xattr Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 29/39] ocfs2: Remove inode from ocfs2_xattr_bucket_get_name_value Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 30/39] ocfs2: Abstract the creation of xattr block Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 31/39] ocfs2: Abstract ocfs2 xattr tree extend rec iteration process Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 32/39] ocfs2: Attach xattr clusters to refcount tree Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 33/39] ocfs2: Call refcount tree remove process properly Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 34/39] ocfs2: Create an xattr indexed block if needed Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 35/39] ocfs2: Add reflink support for xattr Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 36/39] ocfs2: Modify removing xattr process for refcount Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 37/39] ocfs2: Don't merge in 1st refcount ops of reflink Tao Ma
2009-05-08 1:38 ` Joel Becker
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 38/39] ocfs2: Make transaction extend more efficient Tao Ma
2009-04-29 22:58 ` [Ocfs2-devel] [PATCH 39/39] ocfs2: Enable refcount tree support 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=4A038FD5.8020803@oracle.com \
--to=tao.ma@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.