<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ocfs2/alloc.h, branch linux-2.6.28.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2008-10-13T23:57:05Z</updated>
<entry>
<title>ocfs2: Change ocfs2_get_*_extent_tree() to ocfs2_init_*_extent_tree()</title>
<updated>2008-10-13T23:57:05Z</updated>
<author>
<name>Joel Becker</name>
</author>
<published>2008-08-22T19:46:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d6220d6a74a33552cf877bcea25503d7f6a59e6'/>
<id>urn:sha1:8d6220d6a74a33552cf877bcea25503d7f6a59e6</id>
<content type='text'>
The original get/put_extent_tree() functions held a reference on
et_root_bh.  However, every single caller already has a safe reference,
making the get/put cycle irrelevant.

We change ocfs2_get_*_extent_tree() to ocfs2_init_*_extent_tree().  It
no longer gets a reference on et_root_bh.  ocfs2_put_extent_tree() is
removed.  Callers now have a simpler init+use pattern.

Signed-off-by: Joel Becker &lt;joel.becker@oracle.com&gt;
Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: Make ocfs2_extent_tree the first-class representation of a tree.</title>
<updated>2008-10-13T23:57:05Z</updated>
<author>
<name>Joel Becker</name>
</author>
<published>2008-08-21T02:36:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f99b9b7ccf6a691f653cec45f36bfdd1e94769c7'/>
<id>urn:sha1:f99b9b7ccf6a691f653cec45f36bfdd1e94769c7</id>
<content type='text'>
We now have three different kinds of extent trees in ocfs2: inode data
(dinode), extended attributes (xattr_tree), and extended attribute
values (xattr_value).  There is a nice abstraction for them,
ocfs2_extent_tree, but it is hidden in alloc.c.  All the calling
functions have to pick amongst a varied API and pass in type bits and
often extraneous pointers.

A better way is to make ocfs2_extent_tree a first-class object.
Everyone converts their object to an ocfs2_extent_tree() via the
ocfs2_get_*_extent_tree() calls, then uses the ocfs2_extent_tree for all
tree calls to alloc.c.

This simplifies a lot of callers, making for readability.  It also
provides an easy way to add additional extent tree types, as they only
need to be defined in alloc.c with a ocfs2_get_&lt;new&gt;_extent_tree()
function.

Signed-off-by: Joel Becker &lt;joel.becker@oracle.com&gt;
Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: Create specific get_extent_tree functions.</title>
<updated>2008-10-13T23:57:05Z</updated>
<author>
<name>Joel Becker</name>
</author>
<published>2008-08-21T00:44:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1a09f556e5415a29cdddaf9a6ebf474194161cf3'/>
<id>urn:sha1:1a09f556e5415a29cdddaf9a6ebf474194161cf3</id>
<content type='text'>
A caller knows what kind of extent tree they have.  There's no reason
they have to call ocfs2_get_extent_tree() with a NULL when they could
just as easily call a specific function to their type of extent tree.

Introduce ocfs2_dinode_get_extent_tree(),
ocfs2_xattr_tree_get_extent_tree(), and
ocfs2_xattr_value_get_extent_tree().  They only take the necessary
arguments, calling into the underlying __ocfs2_get_extent_tree() to do
the real work.

__ocfs2_get_extent_tree() is the old ocfs2_get_extent_tree(), but
without needing any switch-by-type logic.

ocfs2_get_extent_tree() is now a wrapper around the specific calls.  It
exists because a couple alloc.c functions can take et_type.  This will
go later.

Another benefit is that ocfs2_xattr_value_get_extent_tree() can take a
struct ocfs2_xattr_value_root* instead of void*.  This gives us
typechecking where we didn't have it before.

Signed-off-by: Joel Becker &lt;joel.becker@oracle.com&gt;
Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: Optionally limit extent size in ocfs2_insert_extent()</title>
<updated>2008-10-13T23:57:03Z</updated>
<author>
<name>Tao Ma</name>
</author>
<published>2008-08-18T09:38:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ca12b7c48942d21b2e7890b820db9d578bc291cd'/>
<id>urn:sha1:ca12b7c48942d21b2e7890b820db9d578bc291cd</id>
<content type='text'>
In xattr bucket, we want to limit the maximum size of a btree leaf,
otherwise we'll lose the benefits of hashing because we'll have to search
large leaves.

So add a new field in ocfs2_extent_tree which indicates the maximum leaf cluster
size we want so that we can prevent ocfs2_insert_extent() from merging the leaf
record even if it is contiguous with an adjacent record.

Other btree types are not affected by this change.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: Add xattr index tree operations</title>
<updated>2008-10-13T23:57:02Z</updated>
<author>
<name>Tao Ma</name>
</author>
<published>2008-08-18T09:38:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ba492615f0d32d0210b02c14b24512b4372b13d6'/>
<id>urn:sha1:ba492615f0d32d0210b02c14b24512b4372b13d6</id>
<content type='text'>
When necessary, an ocfs2_xattr_block will embed an ocfs2_extent_list to
store large numbers of EAs. This patch adds a new type in
ocfs2_extent_tree_type and adds the implementation so that we can re-use the
b-tree code to handle the storage of many EAs.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: Add extent tree operation for xattr value btrees</title>
<updated>2008-10-13T23:57:01Z</updated>
<author>
<name>Tao Ma</name>
</author>
<published>2008-08-18T09:38:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f56654c435c06f2b2bd5751889b1a08a3add7d6c'/>
<id>urn:sha1:f56654c435c06f2b2bd5751889b1a08a3add7d6c</id>
<content type='text'>
Add some thin wrappers around ocfs2_insert_extent() for each of the 3
different btree types, ocfs2_inode_insert_extent(),
ocfs2_xattr_value_insert_extent() and ocfs2_xattr_tree_insert_extent(). The
last is for the xattr index btree, which will be used in a followup patch.

All the old callers in file.c etc will call ocfs2_dinode_insert_extent(),
while the other two handle the xattr issue. And the init of extent tree are
handled by these functions.

When storing xattr value which is too large, we will allocate some clusters
for it and here ocfs2_extent_list and ocfs2_extent_rec will also be used. In
order to re-use the b-tree operation code, a new parameter named "private"
is added into ocfs2_extent_tree and it is used to indicate the root of
ocfs2_exent_list. The reason is that we can't deduce the root from the
buffer_head now. It may be in an inode, an ocfs2_xattr_block or even worse,
in any place in an ocfs2_xattr_bucket.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: Make high level btree extend code generic</title>
<updated>2008-10-13T20:57:59Z</updated>
<author>
<name>Tao Ma</name>
</author>
<published>2008-08-18T09:38:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0eb8d47e69a2211a36643b180f1843ef45f6017d'/>
<id>urn:sha1:0eb8d47e69a2211a36643b180f1843ef45f6017d</id>
<content type='text'>
Factor out the non-inode specifics of ocfs2_do_extend_allocation() into a more generic
function, ocfs2_do_cluster_allocation(). ocfs2_do_extend_allocation calls
ocfs2_do_cluster_allocation() now, but the latter can be used for other
btree types as well.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: Abstract ocfs2_extent_tree in b-tree operations.</title>
<updated>2008-10-13T20:57:58Z</updated>
<author>
<name>Tao Ma</name>
</author>
<published>2008-08-18T09:38:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e7d4cb6bc19658646357eeff134645cd9bc3479f'/>
<id>urn:sha1:e7d4cb6bc19658646357eeff134645cd9bc3479f</id>
<content type='text'>
In the old extent tree operation, we take the hypothesis that we
are using the ocfs2_extent_list in ocfs2_dinode as the tree root.
As xattr will also use ocfs2_extent_list to store large value
for a xattr entry, we refactor the tree operation so that xattr
can use it directly.

The refactoring includes 4 steps:
1. Abstract set/get of last_eb_blk and update_clusters since they may
   be stored in different location for dinode and xattr.
2. Add a new structure named ocfs2_extent_tree to indicate the
   extent tree the operation will work on.
3. Remove all the use of fe_bh and di, use root_bh and root_el in
   extent tree instead. So now all the fe_bh is replaced with
   et-&gt;root_bh, el with root_el accordingly.
4. Make ocfs2_lock_allocators generic. Now it is limited to be only used
   in file extend allocation. But the whole function is useful when we want
   to store large EAs.

Note: This patch doesn't touch ocfs2_commit_truncate() since it is not used
for anything other than truncate inode data btrees.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: Use ocfs2_extent_list instead of ocfs2_dinode.</title>
<updated>2008-10-13T20:57:58Z</updated>
<author>
<name>Tao Ma</name>
</author>
<published>2008-08-18T09:38:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=811f933df1e55615fd0bb4818f31e3868a8e6e23'/>
<id>urn:sha1:811f933df1e55615fd0bb4818f31e3868a8e6e23</id>
<content type='text'>
ocfs2_extend_meta_needed(), ocfs2_calc_extend_credits() and
ocfs2_reserve_new_metadata() are all useful for extent tree operations. But
they are all limited to an inode btree because they use a struct
ocfs2_dinode parameter. Change their parameter to struct ocfs2_extent_list
(the part of an ocfs2_dinode they actually use) so that the xattr btree code
can use these functions.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: Modify ocfs2_num_free_extents for future xattr usage.</title>
<updated>2008-10-13T20:57:58Z</updated>
<author>
<name>Tao Ma</name>
</author>
<published>2008-08-18T09:38:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=231b87d10920e024efaf0f9e86e1bab7bced1620'/>
<id>urn:sha1:231b87d10920e024efaf0f9e86e1bab7bced1620</id>
<content type='text'>
ocfs2_num_free_extents() is used to find the number of free extent records
in an inode btree. Hence, it takes an "ocfs2_dinode" parameter. We want to
use this for extended attribute trees in the future, so genericize the
interface the take a buffer head. A future patch will allow that buffer_head
to contain any structure rooting an ocfs2 btree.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
</content>
</entry>
</feed>
