<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/cachefiles, branch tegra-10.9.7</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>CacheFiles: Update IMA counters when using dentry_open</title>
<updated>2009-12-01T15:35:11+00:00</updated>
<author>
<name>Marc Dionne</name>
<email>marc.c.dionne@gmail.com</email>
</author>
<published>2009-12-01T14:09:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3350b2acdd39d23db52710045536b943fe38a35c'/>
<id>3350b2acdd39d23db52710045536b943fe38a35c</id>
<content type='text'>
When IMA is active, using dentry_open without updating the
IMA counters will result in free/open imbalance errors when
fput is eventually called.

Signed-off-by: Marc Dionne &lt;marc.c.dionne@gmail.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When IMA is active, using dentry_open without updating the
IMA counters will result in free/open imbalance errors when
fput is eventually called.

Signed-off-by: Marc Dionne &lt;marc.c.dionne@gmail.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CacheFiles: Don't log lookup/create failing with ENOBUFS</title>
<updated>2009-11-19T18:12:08+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2009-11-19T18:12:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=14e69647c868459bcb910f771851ca7c699efd21'/>
<id>14e69647c868459bcb910f771851ca7c699efd21</id>
<content type='text'>
Don't log the CacheFiles lookup/create object routined failing with ENOBUFS as
under high memory load or high cache load they can do this quite a lot.  This
error simply means that the requested object cannot be created on disk due to
lack of space, or due to failure of the backing filesystem to find sufficient
resources.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't log the CacheFiles lookup/create object routined failing with ENOBUFS as
under high memory load or high cache load they can do this quite a lot.  This
error simply means that the requested object cannot be created on disk due to
lack of space, or due to failure of the backing filesystem to find sufficient
resources.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CacheFiles: Catch an overly long wait for an old active object</title>
<updated>2009-11-19T18:12:05+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2009-11-19T18:12:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fee096deb4f33897937b974cb2c5168bab7935be'/>
<id>fee096deb4f33897937b974cb2c5168bab7935be</id>
<content type='text'>
Catch an overly long wait for an old, dying active object when we want to
replace it with a new one.  The probability is that all the slow-work threads
are hogged, and the delete can't get a look in.

What we do instead is:

 (1) if there's nothing in the slow work queue, we sleep until either the dying
     object has finished dying or there is something in the slow work queue
     behind which we can queue our object.

 (2) if there is something in the slow work queue, we return ETIMEDOUT to
     fscache_lookup_object(), which then puts us back on the slow work queue,
     presumably behind the deletion that we're blocked by.  We are then
     deferred for a while until we work our way back through the queue -
     without blocking a slow-work thread unnecessarily.

A backtrace similar to the following may appear in the log without this patch:

	INFO: task kslowd004:5711 blocked for more than 120 seconds.
	"echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
	kslowd004     D 0000000000000000     0  5711      2 0x00000080
	 ffff88000340bb80 0000000000000046 ffff88002550d000 0000000000000000
	 ffff88002550d000 0000000000000007 ffff88000340bfd8 ffff88002550d2a8
	 000000000000ddf0 00000000000118c0 00000000000118c0 ffff88002550d2a8
	Call Trace:
	 [&lt;ffffffff81058e21&gt;] ? trace_hardirqs_on+0xd/0xf
	 [&lt;ffffffffa011c4d8&gt;] ? cachefiles_wait_bit+0x0/0xd [cachefiles]
	 [&lt;ffffffffa011c4e1&gt;] cachefiles_wait_bit+0x9/0xd [cachefiles]
	 [&lt;ffffffff81353153&gt;] __wait_on_bit+0x43/0x76
	 [&lt;ffffffff8111ae39&gt;] ? ext3_xattr_get+0x1ec/0x270
	 [&lt;ffffffff813531ef&gt;] out_of_line_wait_on_bit+0x69/0x74
	 [&lt;ffffffffa011c4d8&gt;] ? cachefiles_wait_bit+0x0/0xd [cachefiles]
	 [&lt;ffffffff8104c125&gt;] ? wake_bit_function+0x0/0x2e
	 [&lt;ffffffffa011bc79&gt;] cachefiles_mark_object_active+0x203/0x23b [cachefiles]
	 [&lt;ffffffffa011c209&gt;] cachefiles_walk_to_object+0x558/0x827 [cachefiles]
	 [&lt;ffffffffa011a429&gt;] cachefiles_lookup_object+0xac/0x12a [cachefiles]
	 [&lt;ffffffffa00aa1e9&gt;] fscache_lookup_object+0x1c7/0x214 [fscache]
	 [&lt;ffffffffa00aafc5&gt;] fscache_object_state_machine+0xa5/0x52d [fscache]
	 [&lt;ffffffffa00ab4ac&gt;] fscache_object_slow_work_execute+0x5f/0xa0 [fscache]
	 [&lt;ffffffff81082093&gt;] slow_work_execute+0x18f/0x2d1
	 [&lt;ffffffff8108239a&gt;] slow_work_thread+0x1c5/0x308
	 [&lt;ffffffff8104c0f1&gt;] ? autoremove_wake_function+0x0/0x34
	 [&lt;ffffffff810821d5&gt;] ? slow_work_thread+0x0/0x308
	 [&lt;ffffffff8104be91&gt;] kthread+0x7a/0x82
	 [&lt;ffffffff8100beda&gt;] child_rip+0xa/0x20
	 [&lt;ffffffff8100b87c&gt;] ? restore_args+0x0/0x30
	 [&lt;ffffffff8104be17&gt;] ? kthread+0x0/0x82
	 [&lt;ffffffff8100bed0&gt;] ? child_rip+0x0/0x20
	1 lock held by kslowd004/5711:
	 #0:  (&amp;sb-&gt;s_type-&gt;i_mutex_key#7/1){+.+.+.}, at: [&lt;ffffffffa011be64&gt;] cachefiles_walk_to_object+0x1b3/0x827 [cachefiles]

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Catch an overly long wait for an old, dying active object when we want to
replace it with a new one.  The probability is that all the slow-work threads
are hogged, and the delete can't get a look in.

What we do instead is:

 (1) if there's nothing in the slow work queue, we sleep until either the dying
     object has finished dying or there is something in the slow work queue
     behind which we can queue our object.

 (2) if there is something in the slow work queue, we return ETIMEDOUT to
     fscache_lookup_object(), which then puts us back on the slow work queue,
     presumably behind the deletion that we're blocked by.  We are then
     deferred for a while until we work our way back through the queue -
     without blocking a slow-work thread unnecessarily.

A backtrace similar to the following may appear in the log without this patch:

	INFO: task kslowd004:5711 blocked for more than 120 seconds.
	"echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
	kslowd004     D 0000000000000000     0  5711      2 0x00000080
	 ffff88000340bb80 0000000000000046 ffff88002550d000 0000000000000000
	 ffff88002550d000 0000000000000007 ffff88000340bfd8 ffff88002550d2a8
	 000000000000ddf0 00000000000118c0 00000000000118c0 ffff88002550d2a8
	Call Trace:
	 [&lt;ffffffff81058e21&gt;] ? trace_hardirqs_on+0xd/0xf
	 [&lt;ffffffffa011c4d8&gt;] ? cachefiles_wait_bit+0x0/0xd [cachefiles]
	 [&lt;ffffffffa011c4e1&gt;] cachefiles_wait_bit+0x9/0xd [cachefiles]
	 [&lt;ffffffff81353153&gt;] __wait_on_bit+0x43/0x76
	 [&lt;ffffffff8111ae39&gt;] ? ext3_xattr_get+0x1ec/0x270
	 [&lt;ffffffff813531ef&gt;] out_of_line_wait_on_bit+0x69/0x74
	 [&lt;ffffffffa011c4d8&gt;] ? cachefiles_wait_bit+0x0/0xd [cachefiles]
	 [&lt;ffffffff8104c125&gt;] ? wake_bit_function+0x0/0x2e
	 [&lt;ffffffffa011bc79&gt;] cachefiles_mark_object_active+0x203/0x23b [cachefiles]
	 [&lt;ffffffffa011c209&gt;] cachefiles_walk_to_object+0x558/0x827 [cachefiles]
	 [&lt;ffffffffa011a429&gt;] cachefiles_lookup_object+0xac/0x12a [cachefiles]
	 [&lt;ffffffffa00aa1e9&gt;] fscache_lookup_object+0x1c7/0x214 [fscache]
	 [&lt;ffffffffa00aafc5&gt;] fscache_object_state_machine+0xa5/0x52d [fscache]
	 [&lt;ffffffffa00ab4ac&gt;] fscache_object_slow_work_execute+0x5f/0xa0 [fscache]
	 [&lt;ffffffff81082093&gt;] slow_work_execute+0x18f/0x2d1
	 [&lt;ffffffff8108239a&gt;] slow_work_thread+0x1c5/0x308
	 [&lt;ffffffff8104c0f1&gt;] ? autoremove_wake_function+0x0/0x34
	 [&lt;ffffffff810821d5&gt;] ? slow_work_thread+0x0/0x308
	 [&lt;ffffffff8104be91&gt;] kthread+0x7a/0x82
	 [&lt;ffffffff8100beda&gt;] child_rip+0xa/0x20
	 [&lt;ffffffff8100b87c&gt;] ? restore_args+0x0/0x30
	 [&lt;ffffffff8104be17&gt;] ? kthread+0x0/0x82
	 [&lt;ffffffff8100bed0&gt;] ? child_rip+0x0/0x20
	1 lock held by kslowd004/5711:
	 #0:  (&amp;sb-&gt;s_type-&gt;i_mutex_key#7/1){+.+.+.}, at: [&lt;ffffffffa011be64&gt;] cachefiles_walk_to_object+0x1b3/0x827 [cachefiles]

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CacheFiles: Better showing of debugging information in active object problems</title>
<updated>2009-11-19T18:12:02+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2009-11-19T18:12:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d0e27b7808dc667f3015be0b6888f6d680e222c8'/>
<id>d0e27b7808dc667f3015be0b6888f6d680e222c8</id>
<content type='text'>
Show more debugging information if cachefiles_mark_object_active() is asked to
activate an active object.

This may happen, for instance, if the netfs tries to register an object with
the same key multiple times.

The code is changed to (a) get the appropriate object lock to protect the
cookie pointer whilst we dereference it, and (b) get and display the cookie key
if available.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Show more debugging information if cachefiles_mark_object_active() is asked to
activate an active object.

This may happen, for instance, if the netfs tries to register an object with
the same key multiple times.

The code is changed to (a) get the appropriate object lock to protect the
cookie pointer whilst we dereference it, and (b) get and display the cookie key
if available.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CacheFiles: Mark parent directory locks as I_MUTEX_PARENT to keep lockdep happy</title>
<updated>2009-11-19T18:11:58+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2009-11-19T18:11:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6511de33c877a53b3df545bc06c29e0f272837ff'/>
<id>6511de33c877a53b3df545bc06c29e0f272837ff</id>
<content type='text'>
Mark parent directory locks as I_MUTEX_PARENT in the callers of
cachefiles_bury_object() so that lockdep doesn't complain when that invokes
vfs_unlink():

=============================================
[ INFO: possible recursive locking detected ]
2.6.32-rc6-cachefs #47
---------------------------------------------
kslowd002/3089 is trying to acquire lock:
 (&amp;sb-&gt;s_type-&gt;i_mutex_key#7){+.+.+.}, at: [&lt;ffffffff810bbf72&gt;] vfs_unlink+0x8b/0x128

but task is already holding lock:
 (&amp;sb-&gt;s_type-&gt;i_mutex_key#7){+.+.+.}, at: [&lt;ffffffffa00e4e61&gt;] cachefiles_walk_to_object+0x1b0/0x831 [cachefiles]

other info that might help us debug this:
1 lock held by kslowd002/3089:
 #0:  (&amp;sb-&gt;s_type-&gt;i_mutex_key#7){+.+.+.}, at: [&lt;ffffffffa00e4e61&gt;] cachefiles_walk_to_object+0x1b0/0x831 [cachefiles]

stack backtrace:
Pid: 3089, comm: kslowd002 Not tainted 2.6.32-rc6-cachefs #47
Call Trace:
 [&lt;ffffffff8105ad7b&gt;] __lock_acquire+0x1649/0x16e3
 [&lt;ffffffff8118170e&gt;] ? inode_has_perm+0x5f/0x61
 [&lt;ffffffff8105ae6c&gt;] lock_acquire+0x57/0x6d
 [&lt;ffffffff810bbf72&gt;] ? vfs_unlink+0x8b/0x128
 [&lt;ffffffff81353ac3&gt;] mutex_lock_nested+0x54/0x292
 [&lt;ffffffff810bbf72&gt;] ? vfs_unlink+0x8b/0x128
 [&lt;ffffffff8118179e&gt;] ? selinux_inode_permission+0x8e/0x90
 [&lt;ffffffff8117e271&gt;] ? security_inode_permission+0x1c/0x1e
 [&lt;ffffffff810bb4fb&gt;] ? inode_permission+0x99/0xa5
 [&lt;ffffffff810bbf72&gt;] vfs_unlink+0x8b/0x128
 [&lt;ffffffff810adb19&gt;] ? kfree+0xed/0xf9
 [&lt;ffffffffa00e3f00&gt;] cachefiles_bury_object+0xb6/0x420 [cachefiles]
 [&lt;ffffffff81058e21&gt;] ? trace_hardirqs_on+0xd/0xf
 [&lt;ffffffffa00e7e24&gt;] ? cachefiles_check_object_xattr+0x233/0x293 [cachefiles]
 [&lt;ffffffffa00e51b0&gt;] cachefiles_walk_to_object+0x4ff/0x831 [cachefiles]
 [&lt;ffffffff81032238&gt;] ? finish_task_switch+0x0/0xb2
 [&lt;ffffffffa00e3429&gt;] cachefiles_lookup_object+0xac/0x12a [cachefiles]
 [&lt;ffffffffa00741e9&gt;] fscache_lookup_object+0x1c7/0x214 [fscache]
 [&lt;ffffffffa0074fc5&gt;] fscache_object_state_machine+0xa5/0x52d [fscache]
 [&lt;ffffffffa00754ac&gt;] fscache_object_slow_work_execute+0x5f/0xa0 [fscache]
 [&lt;ffffffff81082093&gt;] slow_work_execute+0x18f/0x2d1
 [&lt;ffffffff8108239a&gt;] slow_work_thread+0x1c5/0x308
 [&lt;ffffffff8104c0f1&gt;] ? autoremove_wake_function+0x0/0x34
 [&lt;ffffffff810821d5&gt;] ? slow_work_thread+0x0/0x308
 [&lt;ffffffff8104be91&gt;] kthread+0x7a/0x82
 [&lt;ffffffff8100beda&gt;] child_rip+0xa/0x20
 [&lt;ffffffff8100b87c&gt;] ? restore_args+0x0/0x30
 [&lt;ffffffff8104be17&gt;] ? kthread+0x0/0x82
 [&lt;ffffffff8100bed0&gt;] ? child_rip+0x0/0x20

Signed-off-by: Daivd Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mark parent directory locks as I_MUTEX_PARENT in the callers of
cachefiles_bury_object() so that lockdep doesn't complain when that invokes
vfs_unlink():

=============================================
[ INFO: possible recursive locking detected ]
2.6.32-rc6-cachefs #47
---------------------------------------------
kslowd002/3089 is trying to acquire lock:
 (&amp;sb-&gt;s_type-&gt;i_mutex_key#7){+.+.+.}, at: [&lt;ffffffff810bbf72&gt;] vfs_unlink+0x8b/0x128

but task is already holding lock:
 (&amp;sb-&gt;s_type-&gt;i_mutex_key#7){+.+.+.}, at: [&lt;ffffffffa00e4e61&gt;] cachefiles_walk_to_object+0x1b0/0x831 [cachefiles]

other info that might help us debug this:
1 lock held by kslowd002/3089:
 #0:  (&amp;sb-&gt;s_type-&gt;i_mutex_key#7){+.+.+.}, at: [&lt;ffffffffa00e4e61&gt;] cachefiles_walk_to_object+0x1b0/0x831 [cachefiles]

stack backtrace:
Pid: 3089, comm: kslowd002 Not tainted 2.6.32-rc6-cachefs #47
Call Trace:
 [&lt;ffffffff8105ad7b&gt;] __lock_acquire+0x1649/0x16e3
 [&lt;ffffffff8118170e&gt;] ? inode_has_perm+0x5f/0x61
 [&lt;ffffffff8105ae6c&gt;] lock_acquire+0x57/0x6d
 [&lt;ffffffff810bbf72&gt;] ? vfs_unlink+0x8b/0x128
 [&lt;ffffffff81353ac3&gt;] mutex_lock_nested+0x54/0x292
 [&lt;ffffffff810bbf72&gt;] ? vfs_unlink+0x8b/0x128
 [&lt;ffffffff8118179e&gt;] ? selinux_inode_permission+0x8e/0x90
 [&lt;ffffffff8117e271&gt;] ? security_inode_permission+0x1c/0x1e
 [&lt;ffffffff810bb4fb&gt;] ? inode_permission+0x99/0xa5
 [&lt;ffffffff810bbf72&gt;] vfs_unlink+0x8b/0x128
 [&lt;ffffffff810adb19&gt;] ? kfree+0xed/0xf9
 [&lt;ffffffffa00e3f00&gt;] cachefiles_bury_object+0xb6/0x420 [cachefiles]
 [&lt;ffffffff81058e21&gt;] ? trace_hardirqs_on+0xd/0xf
 [&lt;ffffffffa00e7e24&gt;] ? cachefiles_check_object_xattr+0x233/0x293 [cachefiles]
 [&lt;ffffffffa00e51b0&gt;] cachefiles_walk_to_object+0x4ff/0x831 [cachefiles]
 [&lt;ffffffff81032238&gt;] ? finish_task_switch+0x0/0xb2
 [&lt;ffffffffa00e3429&gt;] cachefiles_lookup_object+0xac/0x12a [cachefiles]
 [&lt;ffffffffa00741e9&gt;] fscache_lookup_object+0x1c7/0x214 [fscache]
 [&lt;ffffffffa0074fc5&gt;] fscache_object_state_machine+0xa5/0x52d [fscache]
 [&lt;ffffffffa00754ac&gt;] fscache_object_slow_work_execute+0x5f/0xa0 [fscache]
 [&lt;ffffffff81082093&gt;] slow_work_execute+0x18f/0x2d1
 [&lt;ffffffff8108239a&gt;] slow_work_thread+0x1c5/0x308
 [&lt;ffffffff8104c0f1&gt;] ? autoremove_wake_function+0x0/0x34
 [&lt;ffffffff810821d5&gt;] ? slow_work_thread+0x0/0x308
 [&lt;ffffffff8104be91&gt;] kthread+0x7a/0x82
 [&lt;ffffffff8100beda&gt;] child_rip+0xa/0x20
 [&lt;ffffffff8100b87c&gt;] ? restore_args+0x0/0x30
 [&lt;ffffffff8104be17&gt;] ? kthread+0x0/0x82
 [&lt;ffffffff8100bed0&gt;] ? child_rip+0x0/0x20

Signed-off-by: Daivd Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CacheFiles: Handle truncate unlocking the page we're reading</title>
<updated>2009-11-19T18:11:55+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2009-11-19T18:11:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5e929b33c3935ecb029b3e495356b2b8af432efa'/>
<id>5e929b33c3935ecb029b3e495356b2b8af432efa</id>
<content type='text'>
Handle truncate unlocking the page we're attempting to read from the backing
device before the read has completed.

This was causing reports like the following to occur:

	Pid: 4765, comm: kslowd Not tainted 2.6.30.1 #1
	Call Trace:
	 [&lt;ffffffffa0331d7a&gt;] ? cachefiles_read_waiter+0xd9/0x147 [cachefiles]
	 [&lt;ffffffff804b74bd&gt;] ? __wait_on_bit+0x60/0x6f
	 [&lt;ffffffff8022bbbb&gt;] ? __wake_up_common+0x3f/0x71
	 [&lt;ffffffff8022cc32&gt;] ? __wake_up+0x30/0x44
	 [&lt;ffffffff8024a41f&gt;] ? __wake_up_bit+0x28/0x2d
	 [&lt;ffffffffa003a793&gt;] ? ext3_truncate+0x4d7/0x8ed [ext3]
	 [&lt;ffffffff80281f90&gt;] ? pagevec_lookup+0x17/0x1f
	 [&lt;ffffffff8028c2ff&gt;] ? unmap_mapping_range+0x59/0x1ff
	 [&lt;ffffffff8022cc32&gt;] ? __wake_up+0x30/0x44
	 [&lt;ffffffff8028e286&gt;] ? vmtruncate+0xc2/0xe2
	 [&lt;ffffffff802b82cf&gt;] ? inode_setattr+0x22/0x10a
	 [&lt;ffffffffa003baa5&gt;] ? ext3_setattr+0x17b/0x1e6 [ext3]
	 [&lt;ffffffff802b853d&gt;] ? notify_change+0x186/0x2c9
	 [&lt;ffffffffa032d9de&gt;] ? cachefiles_attr_changed+0x133/0x1cd [cachefiles]
	 [&lt;ffffffffa032df7f&gt;] ? cachefiles_lookup_object+0xcf/0x12a [cachefiles]
	 [&lt;ffffffffa0318165&gt;] ? fscache_lookup_object+0x110/0x122 [fscache]
	 [&lt;ffffffffa03188c3&gt;] ? fscache_object_slow_work_execute+0x590/0x6bc
	[fscache]
	 [&lt;ffffffff80278f82&gt;] ? slow_work_thread+0x285/0x43a
	 [&lt;ffffffff8024a446&gt;] ? autoremove_wake_function+0x0/0x2e
	 [&lt;ffffffff80278cfd&gt;] ? slow_work_thread+0x0/0x43a
	 [&lt;ffffffff8024a317&gt;] ? kthread+0x54/0x81
	 [&lt;ffffffff8020c93a&gt;] ? child_rip+0xa/0x20
	 [&lt;ffffffff8024a2c3&gt;] ? kthread+0x0/0x81
	 [&lt;ffffffff8020c930&gt;] ? child_rip+0x0/0x20
	CacheFiles: I/O Error: Readpage failed on backing file 200000000000810
	FS-Cache: Cache cachefiles stopped due to I/O error

Reported-by: Christian Kujau &lt;lists@nerdbynature.de&gt;
Reported-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Reported-by: Duc Le Minh &lt;duclm.vn@gmail.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Handle truncate unlocking the page we're attempting to read from the backing
device before the read has completed.

This was causing reports like the following to occur:

	Pid: 4765, comm: kslowd Not tainted 2.6.30.1 #1
	Call Trace:
	 [&lt;ffffffffa0331d7a&gt;] ? cachefiles_read_waiter+0xd9/0x147 [cachefiles]
	 [&lt;ffffffff804b74bd&gt;] ? __wait_on_bit+0x60/0x6f
	 [&lt;ffffffff8022bbbb&gt;] ? __wake_up_common+0x3f/0x71
	 [&lt;ffffffff8022cc32&gt;] ? __wake_up+0x30/0x44
	 [&lt;ffffffff8024a41f&gt;] ? __wake_up_bit+0x28/0x2d
	 [&lt;ffffffffa003a793&gt;] ? ext3_truncate+0x4d7/0x8ed [ext3]
	 [&lt;ffffffff80281f90&gt;] ? pagevec_lookup+0x17/0x1f
	 [&lt;ffffffff8028c2ff&gt;] ? unmap_mapping_range+0x59/0x1ff
	 [&lt;ffffffff8022cc32&gt;] ? __wake_up+0x30/0x44
	 [&lt;ffffffff8028e286&gt;] ? vmtruncate+0xc2/0xe2
	 [&lt;ffffffff802b82cf&gt;] ? inode_setattr+0x22/0x10a
	 [&lt;ffffffffa003baa5&gt;] ? ext3_setattr+0x17b/0x1e6 [ext3]
	 [&lt;ffffffff802b853d&gt;] ? notify_change+0x186/0x2c9
	 [&lt;ffffffffa032d9de&gt;] ? cachefiles_attr_changed+0x133/0x1cd [cachefiles]
	 [&lt;ffffffffa032df7f&gt;] ? cachefiles_lookup_object+0xcf/0x12a [cachefiles]
	 [&lt;ffffffffa0318165&gt;] ? fscache_lookup_object+0x110/0x122 [fscache]
	 [&lt;ffffffffa03188c3&gt;] ? fscache_object_slow_work_execute+0x590/0x6bc
	[fscache]
	 [&lt;ffffffff80278f82&gt;] ? slow_work_thread+0x285/0x43a
	 [&lt;ffffffff8024a446&gt;] ? autoremove_wake_function+0x0/0x2e
	 [&lt;ffffffff80278cfd&gt;] ? slow_work_thread+0x0/0x43a
	 [&lt;ffffffff8024a317&gt;] ? kthread+0x54/0x81
	 [&lt;ffffffff8020c93a&gt;] ? child_rip+0xa/0x20
	 [&lt;ffffffff8024a2c3&gt;] ? kthread+0x0/0x81
	 [&lt;ffffffff8020c930&gt;] ? child_rip+0x0/0x20
	CacheFiles: I/O Error: Readpage failed on backing file 200000000000810
	FS-Cache: Cache cachefiles stopped due to I/O error

Reported-by: Christian Kujau &lt;lists@nerdbynature.de&gt;
Reported-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Reported-by: Duc Le Minh &lt;duclm.vn@gmail.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>CacheFiles: Don't write a full page if there's only a partial page to cache</title>
<updated>2009-11-19T18:11:52+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2009-11-19T18:11:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a17754fb8c28af19cd70dcbec6d5b0773b94e0c1'/>
<id>a17754fb8c28af19cd70dcbec6d5b0773b94e0c1</id>
<content type='text'>
cachefiles_write_page() writes a full page to the backing file for the last
page of the netfs file, even if the netfs file's last page is only a partial
page.

This causes the EOF on the backing file to be extended beyond the EOF of the
netfs, and thus the backing file will be truncated by cachefiles_attr_changed()
called from cachefiles_lookup_object().

So we need to limit the write we make to the backing file on that last page
such that it doesn't push the EOF too far.

Also, if a backing file that has a partial page at the end is expanded, we
discard the partial page and refetch it on the basis that we then have a hole
in the file with invalid data, and should the power go out...  A better way to
deal with this could be to record a note that the partial page contains invalid
data until the correct data is written into it.

This isn't a problem for netfs's that discard the whole backing file if the
file size changes (such as NFS).

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
cachefiles_write_page() writes a full page to the backing file for the last
page of the netfs file, even if the netfs file's last page is only a partial
page.

This causes the EOF on the backing file to be extended beyond the EOF of the
netfs, and thus the backing file will be truncated by cachefiles_attr_changed()
called from cachefiles_lookup_object().

So we need to limit the write we make to the backing file on that last page
such that it doesn't push the EOF too far.

Also, if a backing file that has a partial page at the end is expanded, we
discard the partial page and refetch it on the basis that we then have a hole
in the file with invalid data, and should the power go out...  A better way to
deal with this could be to record a note that the partial page contains invalid
data until the correct data is written into it.

This isn't a problem for netfs's that discard the whole backing file if the
file size changes (such as NFS).

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>FS-Cache: Allow the current state of all objects to be dumped</title>
<updated>2009-11-19T18:11:04+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2009-11-19T18:11:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4fbf4291aa15926cd4fdca0ffe9122e89d0459db'/>
<id>4fbf4291aa15926cd4fdca0ffe9122e89d0459db</id>
<content type='text'>
Allow the current state of all fscache objects to be dumped by doing:

	cat /proc/fs/fscache/objects

By default, all objects and all fields will be shown.  This can be restricted
by adding a suitable key to one of the caller's keyrings (such as the session
keyring):

	keyctl add user fscache:objlist "&lt;restrictions&gt;" @s

The &lt;restrictions&gt; are:

	K	Show hexdump of object key (don't show if not given)
	A	Show hexdump of object aux data (don't show if not given)

And paired restrictions:

	C	Show objects that have a cookie
	c	Show objects that don't have a cookie
	B	Show objects that are busy
	b	Show objects that aren't busy
	W	Show objects that have pending writes
	w	Show objects that don't have pending writes
	R	Show objects that have outstanding reads
	r	Show objects that don't have outstanding reads
	S	Show objects that have slow work queued
	s	Show objects that don't have slow work queued

If neither side of a restriction pair is given, then both are implied.  For
example:

	keyctl add user fscache:objlist KB @s

shows objects that are busy, and lists their object keys, but does not dump
their auxiliary data.  It also implies "CcWwRrSs", but as 'B' is given, 'b' is
not implied.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow the current state of all fscache objects to be dumped by doing:

	cat /proc/fs/fscache/objects

By default, all objects and all fields will be shown.  This can be restricted
by adding a suitable key to one of the caller's keyrings (such as the session
keyring):

	keyctl add user fscache:objlist "&lt;restrictions&gt;" @s

The &lt;restrictions&gt; are:

	K	Show hexdump of object key (don't show if not given)
	A	Show hexdump of object aux data (don't show if not given)

And paired restrictions:

	C	Show objects that have a cookie
	c	Show objects that don't have a cookie
	B	Show objects that are busy
	b	Show objects that aren't busy
	W	Show objects that have pending writes
	w	Show objects that don't have pending writes
	R	Show objects that have outstanding reads
	r	Show objects that don't have outstanding reads
	S	Show objects that have slow work queued
	s	Show objects that don't have slow work queued

If neither side of a restriction pair is given, then both are implied.  For
example:

	keyctl add user fscache:objlist KB @s

shows objects that are busy, and lists their object keys, but does not dump
their auxiliary data.  It also implies "CcWwRrSs", but as 'B' is given, 'b' is
not implied.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>enforce -&gt;sync_fs is only called for rw superblock</title>
<updated>2009-06-12T01:36:06+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2009-05-05T13:41:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5af7926ff33b68b3ba46531471c6e0564b285efc'/>
<id>5af7926ff33b68b3ba46531471c6e0564b285efc</id>
<content type='text'>
Make sure a superblock really is writeable by checking MS_RDONLY
under s_umount.  sync_filesystems needed some re-arragement for
that, but all but one sync_filesystem caller had the correct locking
already so that we could add that check there.  cachefiles grew
s_umount locking.

I've also added a WARN_ON to sync_filesystem to assert this for
future callers.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make sure a superblock really is writeable by checking MS_RDONLY
under s_umount.  sync_filesystems needed some re-arragement for
that, but all but one sync_filesystem caller had the correct locking
already so that we could add that check there.  cachefiles grew
s_umount locking.

I've also added a WARN_ON to sync_filesystem to assert this for
future callers.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vfs: Rename fsync_super() to sync_filesystem() (version 4)</title>
<updated>2009-06-12T01:36:04+00:00</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2009-04-27T14:43:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=60b0680fa236ac4e17ce31a50048c9d75f9ec831'/>
<id>60b0680fa236ac4e17ce31a50048c9d75f9ec831</id>
<content type='text'>
Rename the function so that it better describe what it really does. Also
remove the unnecessary include of buffer_head.h.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename the function so that it better describe what it really does. Also
remove the unnecessary include of buffer_head.h.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
</feed>
