<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ext2/balloc.c, 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-16T18:21:45Z</updated>
<entry>
<title>ext2: fix ext2 block reservation early ENOSPC issue</title>
<updated>2008-10-16T18:21:45Z</updated>
<author>
<name>Mingming Cao</name>
</author>
<published>2008-10-16T05:04:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d707d31c972b657dfc2efefd0b99cc4e14223dab'/>
<id>urn:sha1:d707d31c972b657dfc2efefd0b99cc4e14223dab</id>
<content type='text'>
We could run into ENOSPC error on ext2, even when there is free blocks on
the filesystem.

The problem is triggered in the case the goal block group has 0 free
blocks , and the rest block groups are skipped due to the check of
"free_blocks &lt; windowsz/2".  Current code could fall back to non
reservation allocation to prevent early ENOSPC after examing all the block
groups with reservation on , but this code was bypassed if the reservation
window is turned off already, which is true in this case.

This patch fixed two issues:
1) We don't need to turn off block reservation if the goal block group has
0 free blocks left and continue search for the rest of block groups.

Current code the intention is to turn off the block reservation if the
goal allocation group has a few (some) free blocks left (not enough for
make the desired reservation window),to try to allocation in the goal
block group, to get better locality.  But if the goal blocks have 0 free
blocks, it should leave the block reservation on, and continues search for
the next block groups,rather than turn off block reservation completely.

2) we don't need to check the window size if the block reservation is off.

The problem was originally found and fixed in ext4.

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ext2: retry block allocation if new blocks are allocated from system zone</title>
<updated>2008-04-28T15:58:43Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
</author>
<published>2008-04-28T09:16:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8b91582500ae750db22bd515379616e5e9ad06ab'/>
<id>urn:sha1:8b91582500ae750db22bd515379616e5e9ad06ab</id>
<content type='text'>
If the block allocator gets blocks out of system zone ext2 calls ext2_error.
But if the file system is mounted with errors=continue retry block allocation.
 We need to mark the system zone blocks as in use to make sure retry don't
pick them again

System zone is the block range mapping block bitmap, inode bitmap and inode
table.

[akpm@linux-foundation.org: fix typo in comment]
Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ext2: replace remaining __FUNCTION__ occurrences</title>
<updated>2008-04-28T15:58:43Z</updated>
<author>
<name>Harvey Harrison</name>
</author>
<published>2008-04-28T09:16:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=605afd60ef6dde254fc9b8667c5bccebade251c3'/>
<id>urn:sha1:605afd60ef6dde254fc9b8667c5bccebade251c3</id>
<content type='text'>
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison &lt;harvey.harrison@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fs/ext2: use BUG_ON</title>
<updated>2008-04-28T15:58:43Z</updated>
<author>
<name>Julia Lawall</name>
</author>
<published>2008-04-28T09:16:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c11619a590e13fecc801c9c50859cba29740f38'/>
<id>urn:sha1:2c11619a590e13fecc801c9c50859cba29740f38</id>
<content type='text'>
if (...) BUG(); should be replaced with BUG_ON(...) when the test has no
side-effects to allow a definition of BUG_ON that drops the code completely.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// &lt;smpl&gt;
@ disable unlikely @ expression E,f; @@

(
  if (&lt;... f(...) ...&gt;) { BUG(); }
|
- if (unlikely(E)) { BUG(); }
+ BUG_ON(E);
)

@@ expression E,f; @@

(
  if (&lt;... f(...) ...&gt;) { BUG(); }
|
- if (E) { BUG(); }
+ BUG_ON(E);
)
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ext[234]: cleanup ext[234]_bg_num_gdb()</title>
<updated>2008-02-06T18:41:21Z</updated>
<author>
<name>Akinobu Mita</name>
</author>
<published>2008-02-06T09:40:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=859cb93679929edb88642414bf37789ea263bc47'/>
<id>urn:sha1:859cb93679929edb88642414bf37789ea263bc47</id>
<content type='text'>
Use ext[234]_bg_has_super() to remove duplicate code.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ext[234]: fix comment for nonexistent variable</title>
<updated>2008-02-06T18:41:21Z</updated>
<author>
<name>Akinobu Mita</name>
</author>
<published>2008-02-06T09:40:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=144704e5227362cbd694b0b3c3aa4ac99a0115c9'/>
<id>urn:sha1:144704e5227362cbd694b0b3c3aa4ac99a0115c9</id>
<content type='text'>
The comment in ext[234]_new_blocks() describes about "i".  But there is no
local variable called "i" in that scope.  I guess it has been renamed to
group_no.

Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ext2: add block bitmap validation</title>
<updated>2008-02-06T18:41:20Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
</author>
<published>2008-02-06T09:40:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=01584fa6456dafbaf5a94ad7fb2aa3e3ecd7a7ba'/>
<id>urn:sha1:01584fa6456dafbaf5a94ad7fb2aa3e3ecd7a7ba</id>
<content type='text'>
When a new block bitmap is read from disk in read_block_bitmap() there are a
few bits that should ALWAYS be set.  In particular, the blocks given
corresponding to block bitmap, inode bitmap and inode tables.  Validate the
block bitmap against these blocks.

Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ext2: return after ext2_error in case of failures</title>
<updated>2008-02-06T18:41:00Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
</author>
<published>2008-02-06T09:36:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7f0adaecede9ca68d9fcddae5a5a7ed6fc31a5e5'/>
<id>urn:sha1:7f0adaecede9ca68d9fcddae5a5a7ed6fc31a5e5</id>
<content type='text'>
This fixes some instances where we were continuing after calling
ext2_error.  ext2_error call panic only if errors=panic mount option is
set.  So we need to make sure we return correctly after ext2_error call.

Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "ext2/ext3/ext4: add block bitmap validation"</title>
<updated>2007-11-13T16:09:11Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2007-11-13T16:07:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b832a4b93932103d73c0c3f35ef1153e288327b'/>
<id>urn:sha1:0b832a4b93932103d73c0c3f35ef1153e288327b</id>
<content type='text'>
This reverts commit 7c9e69faa28027913ee059c285a5ea8382e24b5d, fixing up
conflicts in fs/ext4/balloc.c manually.

The cost of doing the bitmap validation on each lookup - even when the
bitmap is cached - is absolutely prohibitive.  We could, and probably
should, do it only when adding the bitmap to the buffer cache.  However,
right now we are better off just reverting it.

Peter Zijlstra measured the cost of this extra validation as a 85%
decrease in cached iozone, and while I had a patch that took it down to
just 17% by not being _quite_ so stupid in the validation, it was still
a big slowdown that could have been avoided by just doing it right.

Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Aneesh Kumar &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
Cc: Andreas Dilger &lt;adilger@clusterfs.com&gt;
Cc: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ext2 reservations</title>
<updated>2007-10-17T15:43:02Z</updated>
<author>
<name>Martin J. Bligh</name>
</author>
<published>2007-10-17T06:30:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a686cd898bd999fd026a51e90fb0a3410d258ddb'/>
<id>urn:sha1:a686cd898bd999fd026a51e90fb0a3410d258ddb</id>
<content type='text'>
Val's cross-port of the ext3 reservations code into ext2.

[mbligh@mbligh.org: Small type error for printk
[akpm@linux-foundation.org: fix types, sync with ext3]
[mbligh@mbligh.org: Bring ext2 reservations code in line with latest ext3]
[akpm@linux-foundation.org: kill noisy printk]
[akpm@linux-foundation.org: remember to dirty the gdp's block]
[akpm@linux-foundation.org: cross-port the missed 5dea5176e5c32ef9f0d1a41d28427b3bf6881b3a]
[akpm@linux-foundation.org: cross-port e6022603b9aa7d61d20b392e69edcdbbc1789969]
[akpm@linux-foundation.org: Port the omitted 08fb306fe63d98eb86e3b16f4cc21816fa47f18e]
[akpm@linux-foundation.org: Backport the missed 20acaa18d0c002fec180956f87adeb3f11f635a6]
[akpm@linux-foundation.org: fixes]
[cmm@us.ibm.com: fix reservation extension]
[bunk@stusta.de: make ext2_get_blocks() static]
[hugh@veritas.com: fix hang]
[hugh@veritas.com: ext2_new_blocks should reset the reservation window size]
[hugh@veritas.com: ext2 balloc: fix off-by-one against rsv_end]
[hugh@veritas.com: grp_goal 0 is a genuine goal (unlike -1), so ext2_try_to_allocate_with_rsv should treat it as such]
[hugh@veritas.com: rbtree usage cleanup]
[pbadari@us.ibm.com: Fix for ext2 reservation]
[bunk@kernel.org: remove fs/ext2/balloc.c:reserve_blocks()]
[hugh@veritas.com: ext2 balloc: use io_error label]
Cc: "Martin J. Bligh" &lt;mbligh@mbligh.org&gt;
Cc: Valerie Henson &lt;val_henson@linux.intel.com&gt;
Cc: Mingming Cao &lt;cmm@us.ibm.com&gt;
Cc: Mel Gorman &lt;mel@csn.ul.ie&gt;
Cc: Hugh Dickins &lt;hugh@veritas.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&gt;
Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Signed-off-by: Badari Pulavarty &lt;pbadari@us.ibm.com&gt;
Signed-off-by: Adrian Bunk &lt;bunk@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
