<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/ext3, branch v2.6.20</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>[PATCH] LOG2: Implement a general integer log2 facility in the kernel</title>
<updated>2006-12-08T16:28:51+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2006-12-08T10:37:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f0d1b0b30d250a07627ad8b9fbbb5c7cc08422e8'/>
<id>f0d1b0b30d250a07627ad8b9fbbb5c7cc08422e8</id>
<content type='text'>
This facility provides three entry points:

	ilog2()		Log base 2 of unsigned long
	ilog2_u32()	Log base 2 of u32
	ilog2_u64()	Log base 2 of u64

These facilities can either be used inside functions on dynamic data:

	int do_something(long q)
	{
		...;
		y = ilog2(x)
		...;
	}

Or can be used to statically initialise global variables with constant values:

	unsigned n = ilog2(27);

When performing static initialisation, the compiler will report "error:
initializer element is not constant" if asked to take a log of zero or of
something not reducible to a constant.  They treat negative numbers as
unsigned.

When not dealing with a constant, they fall back to using fls() which permits
them to use arch-specific log calculation instructions - such as BSR on
x86/x86_64 or SCAN on FRV - if available.

[akpm@osdl.org: MMC fix]
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Wojtek Kaniewski &lt;wojtekka@toxygen.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This facility provides three entry points:

	ilog2()		Log base 2 of unsigned long
	ilog2_u32()	Log base 2 of u32
	ilog2_u64()	Log base 2 of u64

These facilities can either be used inside functions on dynamic data:

	int do_something(long q)
	{
		...;
		y = ilog2(x)
		...;
	}

Or can be used to statically initialise global variables with constant values:

	unsigned n = ilog2(27);

When performing static initialisation, the compiler will report "error:
initializer element is not constant" if asked to take a log of zero or of
something not reducible to a constant.  They treat negative numbers as
unsigned.

When not dealing with a constant, they fall back to using fls() which permits
them to use arch-specific log calculation instructions - such as BSR on
x86/x86_64 or SCAN on FRV - if available.

[akpm@osdl.org: MMC fix]
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Wojtek Kaniewski &lt;wojtekka@toxygen.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] ext3: change uses of f_{dentry, vfsmnt} to use f_path</title>
<updated>2006-12-08T16:28:41+00:00</updated>
<author>
<name>Josef "Jeff" Sipek</name>
<email>jsipek@cs.sunysb.edu</email>
</author>
<published>2006-12-08T10:36:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fe21a69389165b9641a8d0b89e00a71c4e5f5d59'/>
<id>fe21a69389165b9641a8d0b89e00a71c4e5f5d59</id>
<content type='text'>
Change all the uses of f_{dentry,vfsmnt} to f_path.{dentry,mnt} in the ext3
filesystem.

Signed-off-by: Josef "Jeff" Sipek &lt;jsipek@cs.sunysb.edu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change all the uses of f_{dentry,vfsmnt} to f_path.{dentry,mnt} in the ext3
filesystem.

Signed-off-by: Josef "Jeff" Sipek &lt;jsipek@cs.sunysb.edu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] ext3 balloc: fix _with_rsv freeze</title>
<updated>2006-12-07T16:39:48+00:00</updated>
<author>
<name>Hugh Dickins</name>
<email>hugh@veritas.com</email>
</author>
<published>2006-12-07T04:41:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7d1c520bb57e4b5e94ec937c13553dccf473341b'/>
<id>7d1c520bb57e4b5e94ec937c13553dccf473341b</id>
<content type='text'>
Port fix to the off-by-one in find_next_usable_block's memscan from ext2 to
ext3; but it didn't cause a serious problem for ext3 because the additional
ext3_test_allocatable check rescued it from the error.

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Port fix to the off-by-one in find_next_usable_block's memscan from ext2 to
ext3; but it didn't cause a serious problem for ext3 because the additional
ext3_test_allocatable check rescued it from the error.

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] ext3 balloc: use io_error label</title>
<updated>2006-12-07T16:39:48+00:00</updated>
<author>
<name>Hugh Dickins</name>
<email>hugh@veritas.com</email>
</author>
<published>2006-12-07T04:41:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2823b5535efad71e950ef50c2ce5f9e4dbaedc17'/>
<id>2823b5535efad71e950ef50c2ce5f9e4dbaedc17</id>
<content type='text'>
ext3_new_blocks has a nice io_error label for setting -EIO, so goto that in
the one place that doesn't already use it.

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ext3_new_blocks has a nice io_error label for setting -EIO, so goto that in
the one place that doesn't already use it.

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] ext3 balloc: say rb_entry not list_entry</title>
<updated>2006-12-07T16:39:48+00:00</updated>
<author>
<name>Hugh Dickins</name>
<email>hugh@veritas.com</email>
</author>
<published>2006-12-07T04:41:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c56d2561f7189762c4fce854630d4f7f6d64ccee'/>
<id>c56d2561f7189762c4fce854630d4f7f6d64ccee</id>
<content type='text'>
The reservations tree is an rb_tree not a list, so it's less confusing to use
rb_entry() than list_entry() - though they're both just container_of().

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The reservations tree is an rb_tree not a list, so it's less confusing to use
rb_entry() than list_entry() - though they're both just container_of().

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] ext3 balloc: fix off-by-one against rsv_end</title>
<updated>2006-12-07T16:39:48+00:00</updated>
<author>
<name>Hugh Dickins</name>
<email>hugh@veritas.com</email>
</author>
<published>2006-12-07T04:41:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ff50dc562bf6de00fec264b11531e2745209ba12'/>
<id>ff50dc562bf6de00fec264b11531e2745209ba12</id>
<content type='text'>
rsv_end is the last block within the reservation, so alloc_new_reservation
should accept start_block == rsv_end as success.

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rsv_end is the last block within the reservation, so alloc_new_reservation
should accept start_block == rsv_end as success.

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] ext3 balloc: fix off-by-one against grp_goal</title>
<updated>2006-12-07T16:39:48+00:00</updated>
<author>
<name>Hugh Dickins</name>
<email>hugh@veritas.com</email>
</author>
<published>2006-12-07T04:41:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1650242324a0c19d629a8be0d5a8ecdc174d31f8'/>
<id>1650242324a0c19d629a8be0d5a8ecdc174d31f8</id>
<content type='text'>
grp_goal 0 is a genuine goal (unlike -1), so ext3_try_to_allocate_with_rsv
should treat it as such.

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
grp_goal 0 is a genuine goal (unlike -1), so ext3_try_to_allocate_with_rsv
should treat it as such.

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] ext3 balloc: reset windowsz when full</title>
<updated>2006-12-07T16:39:48+00:00</updated>
<author>
<name>Hugh Dickins</name>
<email>hugh@veritas.com</email>
</author>
<published>2006-12-07T04:41:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ef5036782e619ab394daaec5c00876fa6b17d7a1'/>
<id>ef5036782e619ab394daaec5c00876fa6b17d7a1</id>
<content type='text'>
ext3_new_blocks should reset the reservation window size to 0 when squeezing
the last blocks out of an almost full filesystem, so the retry doesn't skip
any groups with less than half that free, reporting ENOSPC too soon.

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ext3_new_blocks should reset the reservation window size to 0 when squeezing
the last blocks out of an almost full filesystem, so the retry doesn't skip
any groups with less than half that free, reporting ENOSPC too soon.

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Signed-off-by: Hugh Dickins &lt;hugh@veritas.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] ext3/4: don't do orphan processing on readonly devices</title>
<updated>2006-12-07T16:39:44+00:00</updated>
<author>
<name>Eric Sandeen</name>
<email>sandeen@redhat.com</email>
</author>
<published>2006-12-07T04:40:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a8f48a95619cbce8f85423480e7d0a1bf971a62b'/>
<id>a8f48a95619cbce8f85423480e7d0a1bf971a62b</id>
<content type='text'>
If you do something like:

  # touch foo
  # tail -f foo &amp;
  # rm foo
  # &lt;take snapshot&gt;
  # &lt;mount snapshot&gt;

you'll panic, because ext3/4 tries to do orphan list processing on the
readonly snapshot device, and:

  kernel: journal commit I/O error
  kernel: Assertion failure in journal_flush_Rsmp_e2f189ce() at journal.c:1356: "!journal-&gt;j_checkpoint_transactions"
  kernel: Kernel panic: Fatal exception

for a truly readonly underlying device, it's reasonable and necessary
to just skip orphan list processing.

Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If you do something like:

  # touch foo
  # tail -f foo &amp;
  # rm foo
  # &lt;take snapshot&gt;
  # &lt;mount snapshot&gt;

you'll panic, because ext3/4 tries to do orphan list processing on the
readonly snapshot device, and:

  kernel: journal commit I/O error
  kernel: Assertion failure in journal_flush_Rsmp_e2f189ce() at journal.c:1356: "!journal-&gt;j_checkpoint_transactions"
  kernel: Kernel panic: Fatal exception

for a truly readonly underlying device, it's reasonable and necessary
to just skip orphan list processing.

Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Cc: &lt;linux-ext4@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] ext3: fix reservation extension</title>
<updated>2006-12-07T16:39:39+00:00</updated>
<author>
<name>Mingming Cao</name>
<email>cmm@us.ibm.com</email>
</author>
<published>2006-12-07T04:38:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2bd94bd79e5bfa217714f78e5d6d7b6517ca546f'/>
<id>2bd94bd79e5bfa217714f78e5d6d7b6517ca546f</id>
<content type='text'>
Hugh Dickins wrote:
&gt; Not found anything relevant, but I keep noticing these lines
&gt; in ext2_try_to_allocate_with_rsv(), ext3 and ext4 similar:
&gt;
&gt; 		} else if (grp_goal &gt; 0 &amp;&amp;
&gt; 				(my_rsv-&gt;rsv_end - grp_goal + 1) &lt; *count)
&gt; 			try_to_extend_reservation(my_rsv, sb,
&gt; 					*count-my_rsv-&gt;rsv_end + grp_goal - 1);
&gt;
&gt; They're wrong, a no-op in most groups, aren't they?  rsv_end is an
&gt; absolute block number, whereas grp_goal is group-relative, so the
&gt; calculation ought to bring in group_first_block?  Or I'm confused.
&gt;

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Cc: "linux-ext4@vger.kernel.org" &lt;linux-ext4@vger.kernel.org&gt;
Cc: Hugh Dickins &lt;hugh@veritas.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Hugh Dickins wrote:
&gt; Not found anything relevant, but I keep noticing these lines
&gt; in ext2_try_to_allocate_with_rsv(), ext3 and ext4 similar:
&gt;
&gt; 		} else if (grp_goal &gt; 0 &amp;&amp;
&gt; 				(my_rsv-&gt;rsv_end - grp_goal + 1) &lt; *count)
&gt; 			try_to_extend_reservation(my_rsv, sb,
&gt; 					*count-my_rsv-&gt;rsv_end + grp_goal - 1);
&gt;
&gt; They're wrong, a no-op in most groups, aren't they?  rsv_end is an
&gt; absolute block number, whereas grp_goal is group-relative, so the
&gt; calculation ought to bring in group_first_block?  Or I'm confused.
&gt;

Signed-off-by: Mingming Cao &lt;cmm@us.ibm.com&gt;
Cc: "linux-ext4@vger.kernel.org" &lt;linux-ext4@vger.kernel.org&gt;
Cc: Hugh Dickins &lt;hugh@veritas.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
