<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ocfs2/alloc.c, branch linux-2.6.37.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2010-09-08T06:25:57Z</updated>
<entry>
<title>ocfs2: Fix deadlock when allocating page</title>
<updated>2010-09-08T06:25:57Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2010-08-24T12:28:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9b4c0ff32ccd87ab52d4c5bd0a0536febce11370'/>
<id>urn:sha1:9b4c0ff32ccd87ab52d4c5bd0a0536febce11370</id>
<content type='text'>
We cannot call grab_cache_page() when holding filesystem locks or with
a transaction started as grab_cache_page() calls page allocation with
GFP_KERNEL flag and thus page reclaim can recurse back into the filesystem
causing deadlocks or various assertion failures. We have to use
find_or_create_page() instead and pass it GFP_NOFS as we do with other
allocations.

Acked-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'discontig-bg' of git://oss.oracle.com/git/tma/linux-2.6 into ocfs2-merge-window</title>
<updated>2010-05-18T23:40:42Z</updated>
<author>
<name>Joel Becker</name>
</author>
<published>2010-05-18T23:40:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=41841b0bcea8af7f3bff8b2a23d542b94d9c1bb1'/>
<id>urn:sha1:41841b0bcea8af7f3bff8b2a23d542b94d9c1bb1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Ocfs2: Make ocfs2_find_cpos_for_left_leaf() public.</title>
<updated>2010-05-18T19:28:13Z</updated>
<author>
<name>Tristan Ye</name>
</author>
<published>2010-05-11T09:54:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ee149a7c6cbaee0e3a1a7d9e9f92711228ef5236'/>
<id>urn:sha1:ee149a7c6cbaee0e3a1a7d9e9f92711228ef5236</id>
<content type='text'>
The original idea to pull ocfs2_find_cpos_for_left_leaf() out of
alloc.c is to benefit punching-holes optimization patch, it however,
can also be referred by other funcs in the future who want to do the
same job.

Signed-off-by: Tristan Ye &lt;tristan.ye@oracle.com&gt;
Acked-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
Signed-off-by: Joel Becker &lt;joel.becker@oracle.com&gt;
</content>
</entry>
<entry>
<title>Ocfs2: Optimize ocfs2 truncate to use ocfs2_remove_btree_range() instead.</title>
<updated>2010-05-18T19:25:10Z</updated>
<author>
<name>Tristan Ye</name>
</author>
<published>2010-05-11T09:54:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=78f94673d7faf01677f374f4ebbf324ff1a0aa6e'/>
<id>urn:sha1:78f94673d7faf01677f374f4ebbf324ff1a0aa6e</id>
<content type='text'>
Truncate is just a special case of punching holes(from new i_size to
end), we therefore could take advantage of the existing
ocfs2_remove_btree_range() to reduce the comlexity and redundancy in
alloc.c.  The goal here is to make truncate more generic and
straightforward.

Several functions only used by ocfs2_commit_truncate() will smiply be
removed.

ocfs2_remove_btree_range() was originally used by the hole punching
code, which didn't take refcount trees into account (definitely a bug).
We therefore need to change that func a bit to handle refcount trees.
It must take the refcount lock, calculate and reserve blocks for
refcount tree changes, and decrease refcounts at the end.  We replace 
ocfs2_lock_allocators() here by adding a new func
ocfs2_reserve_blocks_for_rec_trunc() which accepts some extra blocks to
reserve.  This will not hurt any other code using
ocfs2_remove_btree_range() (such as dir truncate and hole punching).

I merged the following steps into one patch since they may be
logically doing one thing, though I know it looks a little bit fat
to review.

1). Remove redundant code used by ocfs2_commit_truncate(), since we're
    moving to ocfs2_remove_btree_range anyway.

2). Add a new func ocfs2_reserve_blocks_for_rec_trunc() for purpose of
    accepting some extra blocks to reserve.

3). Change ocfs2_prepare_refcount_change_for_del() a bit to fit our
    needs.  It's safe to do this since it's only being called by
    truncate.

4). Change ocfs2_remove_btree_range() a bit to take refcount case into
    account.

5). Finally, we change ocfs2_commit_truncate() to call
    ocfs2_remove_btree_range() in a proper way.

The patch has been tested normally for sanity check, stress tests
with heavier workload will be expected.

Based on this patch, fixing the punching holes bug will be fairly easy.

Signed-off-by: Tristan Ye &lt;tristan.ye@oracle.com&gt;
Acked-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
Signed-off-by: Joel Becker &lt;joel.becker@oracle.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: Make ocfs2_extend_trans() really extend.</title>
<updated>2010-05-06T01:18:09Z</updated>
<author>
<name>Tao Ma</name>
</author>
<published>2010-04-26T06:34:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c901fb00731e307c2c6e8c7d5eee005df5835f9d'/>
<id>urn:sha1:c901fb00731e307c2c6e8c7d5eee005df5835f9d</id>
<content type='text'>
In ocfs2, we use ocfs2_extend_trans() to extend a journal handle's
blocks. But if jbd2_journal_extend() fails, it will only restart
with the the new number of blocks.  This tends to be awkward since
in most cases we want additional reserved blocks. It makes our code
harder to mantain since the caller can't be sure all the original
blocks will not be accessed and dirtied again.  There are 15 callers
of ocfs2_extend_trans() in fs/ocfs2, and 12 of them have to add
h_buffer_credits before they call ocfs2_extend_trans().  This makes
ocfs2_extend_trans() really extend atop the original block count.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
Signed-off-by: Joel Becker &lt;joel.becker@oracle.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: use allocation reservations during file write</title>
<updated>2010-05-06T01:17:30Z</updated>
<author>
<name>Mark Fasheh</name>
</author>
<published>2009-12-07T21:15:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4fe370afaae49c57619bb0bedb75de7e7c168308'/>
<id>urn:sha1:4fe370afaae49c57619bb0bedb75de7e7c168308</id>
<content type='text'>
Add a per-inode reservations structure and pass it through to the
reservations code.

Signed-off-by: Mark Fasheh &lt;mfasheh@suse.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: Make ocfs2_journal_dirty() void.</title>
<updated>2010-05-06T01:17:29Z</updated>
<author>
<name>Joel Becker</name>
</author>
<published>2010-03-19T21:13:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec20cec7a351584ca6c70ead012e73d61f9a8e04'/>
<id>urn:sha1:ec20cec7a351584ca6c70ead012e73d61f9a8e04</id>
<content type='text'>
jbd[2]_journal_dirty_metadata() only returns 0.  It's been returning 0
since before the kernel moved to git.  There is no point in checking
this error.

ocfs2_journal_dirty() has been faithfully returning the status since the
beginning.  All over ocfs2, we have blocks of code checking this can't
fail status.  In the past few years, we've tried to avoid adding these
checks, because they are pointless.  But anyone who looks at our code
assumes they are needed.

Finally, ocfs2_journal_dirty() is made a void function.  All error
checking is removed from other files.  We'll BUG_ON() the status of
jbd2_journal_dirty_metadata() just in case they change it someday.  They
won't.

Signed-off-by: Joel Becker &lt;joel.becker@oracle.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: Free block to the right block group.</title>
<updated>2010-03-22T06:20:18Z</updated>
<author>
<name>Tao Ma</name>
</author>
<published>2010-03-22T06:20:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=74380c479ad83addeff8a172ab95f59557b5b0c3'/>
<id>urn:sha1:74380c479ad83addeff8a172ab95f59557b5b0c3</id>
<content type='text'>
In case the block we are going to free is allocated from
a discontiguous block group, we have to use suballoc_loc
to be the right group.

Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: Set suballoc_loc on allocated metadata.</title>
<updated>2010-03-26T02:09:15Z</updated>
<author>
<name>Joel Becker</name>
</author>
<published>2010-03-26T02:09:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b6cb576aa80611f1f6a3c88708d1e68a8d97985'/>
<id>urn:sha1:2b6cb576aa80611f1f6a3c88708d1e68a8d97985</id>
<content type='text'>
Get the suballoc_loc from ocfs2_claim_new_inode() or
ocfs2_claim_metadata().  Store it on the appropriate field of the block
we just allocated.

Signed-off-by: Joel Becker &lt;joel.becker@oracle.com&gt;
</content>
</entry>
<entry>
<title>ocfs2: ocfs2_claim_*() don't need an ocfs2_super argument.</title>
<updated>2010-05-06T05:59:06Z</updated>
<author>
<name>Joel Becker</name>
</author>
<published>2010-05-06T05:59:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1ed9b777f77929ae961d6f9cdf828a07200ba71c'/>
<id>urn:sha1:1ed9b777f77929ae961d6f9cdf828a07200ba71c</id>
<content type='text'>
They all take an ocfs2_alloc_context, which has the allocation inode.

Signed-off-by: Joel Becker &lt;joel.becker@oracle.com&gt;
Signed-off-by: Tao Ma &lt;tao.ma@oracle.com&gt;
</content>
</entry>
</feed>
