<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/fscache, branch v4.0</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>fs/fscache/object-list.c: use __seq_open_private()</title>
<updated>2014-10-13T16:52:21+00:00</updated>
<author>
<name>Rob Jones</name>
<email>rob.jones@codethink.co.uk</email>
</author>
<published>2014-09-17T08:56:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d5d962265d99088ce96480db3e61358d7170e24c'/>
<id>d5d962265d99088ce96480db3e61358d7170e24c</id>
<content type='text'>
Reduce boilerplate code by using __seq_open_private() instead of seq_open()
in fscache_objlist_open().

Signed-off-by: Rob Jones &lt;rob.jones@codethink.co.uk&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Steve Dickson &lt;steved@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reduce boilerplate code by using __seq_open_private() instead of seq_open()
in fscache_objlist_open().

Signed-off-by: Rob Jones &lt;rob.jones@codethink.co.uk&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Steve Dickson &lt;steved@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>FS-Cache: refcount becomes corrupt under vma pressure.</title>
<updated>2014-09-17T21:41:40+00:00</updated>
<author>
<name>Milosz Tanski</name>
<email>milosz@adfin.com</email>
</author>
<published>2014-08-13T16:58:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3e1199dcad004a40b55297a4736ccd1b9b81a952'/>
<id>3e1199dcad004a40b55297a4736ccd1b9b81a952</id>
<content type='text'>
In rare cases under heavy VMA pressure the ref count for a fscache cookie
becomes corrupt. In this case we decrement ref count even if we fail before
incrementing the refcount.

FS-Cache: Assertion failed bnode-eca5f9c6/syslog
0 &gt; 0 is false
------------[ cut here ]------------
kernel BUG at fs/fscache/cookie.c:519!
invalid opcode: 0000 [#1] SMP
Call Trace:
[&lt;ffffffffa01ba060&gt;] __fscache_relinquish_cookie+0x50/0x220 [fscache]
[&lt;ffffffffa02d64ce&gt;] ceph_fscache_unregister_inode_cookie+0x3e/0x50 [ceph]
[&lt;ffffffffa02ae1d3&gt;] ceph_destroy_inode+0x33/0x200 [ceph]
[&lt;ffffffff811cf67e&gt;] ? __fsnotify_inode_delete+0xe/0x10
[&lt;ffffffff811a9e0c&gt;] destroy_inode+0x3c/0x70
[&lt;ffffffff811a9f51&gt;] evict+0x111/0x180
[&lt;ffffffff811aa763&gt;] iput+0x103/0x190
[&lt;ffffffff811a5de8&gt;] __dentry_kill+0x1c8/0x220
[&lt;ffffffff811a5f31&gt;] shrink_dentry_list+0xf1/0x250
[&lt;ffffffff811a762c&gt;] prune_dcache_sb+0x4c/0x60
[&lt;ffffffff811930af&gt;] super_cache_scan+0xff/0x170
[&lt;ffffffff8113d7a0&gt;] shrink_slab_node+0x140/0x2c0
[&lt;ffffffff8113f2da&gt;] shrink_slab+0x8a/0x130
[&lt;ffffffff81142572&gt;] balance_pgdat+0x3e2/0x5d0
[&lt;ffffffff811428ca&gt;] kswapd+0x16a/0x4a0
[&lt;ffffffff810a43f0&gt;] ? __wake_up_sync+0x20/0x20
[&lt;ffffffff81142760&gt;] ? balance_pgdat+0x5d0/0x5d0
[&lt;ffffffff81083e09&gt;] kthread+0xc9/0xe0
[&lt;ffffffff81010000&gt;] ? ftrace_raw_event_xen_mmu_release_ptpage+0x70/0x90
[&lt;ffffffff81083d40&gt;] ? flush_kthread_worker+0xb0/0xb0
[&lt;ffffffff8159f63c&gt;] ret_from_fork+0x7c/0xb0
[&lt;ffffffff81083d40&gt;] ? flush_kthread_worker+0xb0/0xb0
RIP [&lt;ffffffffa01b984b&gt;] __fscache_disable_cookie+0x1db/0x210 [fscache]
RSP &lt;ffff8803bc85f9b8&gt;
---[ end trace 254d0d7c74a01f25 ]---

Signed-off-by: Milosz Tanski &lt;milosz@adfin.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>
In rare cases under heavy VMA pressure the ref count for a fscache cookie
becomes corrupt. In this case we decrement ref count even if we fail before
incrementing the refcount.

FS-Cache: Assertion failed bnode-eca5f9c6/syslog
0 &gt; 0 is false
------------[ cut here ]------------
kernel BUG at fs/fscache/cookie.c:519!
invalid opcode: 0000 [#1] SMP
Call Trace:
[&lt;ffffffffa01ba060&gt;] __fscache_relinquish_cookie+0x50/0x220 [fscache]
[&lt;ffffffffa02d64ce&gt;] ceph_fscache_unregister_inode_cookie+0x3e/0x50 [ceph]
[&lt;ffffffffa02ae1d3&gt;] ceph_destroy_inode+0x33/0x200 [ceph]
[&lt;ffffffff811cf67e&gt;] ? __fsnotify_inode_delete+0xe/0x10
[&lt;ffffffff811a9e0c&gt;] destroy_inode+0x3c/0x70
[&lt;ffffffff811a9f51&gt;] evict+0x111/0x180
[&lt;ffffffff811aa763&gt;] iput+0x103/0x190
[&lt;ffffffff811a5de8&gt;] __dentry_kill+0x1c8/0x220
[&lt;ffffffff811a5f31&gt;] shrink_dentry_list+0xf1/0x250
[&lt;ffffffff811a762c&gt;] prune_dcache_sb+0x4c/0x60
[&lt;ffffffff811930af&gt;] super_cache_scan+0xff/0x170
[&lt;ffffffff8113d7a0&gt;] shrink_slab_node+0x140/0x2c0
[&lt;ffffffff8113f2da&gt;] shrink_slab+0x8a/0x130
[&lt;ffffffff81142572&gt;] balance_pgdat+0x3e2/0x5d0
[&lt;ffffffff811428ca&gt;] kswapd+0x16a/0x4a0
[&lt;ffffffff810a43f0&gt;] ? __wake_up_sync+0x20/0x20
[&lt;ffffffff81142760&gt;] ? balance_pgdat+0x5d0/0x5d0
[&lt;ffffffff81083e09&gt;] kthread+0xc9/0xe0
[&lt;ffffffff81010000&gt;] ? ftrace_raw_event_xen_mmu_release_ptpage+0x70/0x90
[&lt;ffffffff81083d40&gt;] ? flush_kthread_worker+0xb0/0xb0
[&lt;ffffffff8159f63c&gt;] ret_from_fork+0x7c/0xb0
[&lt;ffffffff81083d40&gt;] ? flush_kthread_worker+0xb0/0xb0
RIP [&lt;ffffffffa01b984b&gt;] __fscache_disable_cookie+0x1db/0x210 [fscache]
RSP &lt;ffff8803bc85f9b8&gt;
---[ end trace 254d0d7c74a01f25 ]---

Signed-off-by: Milosz Tanski &lt;milosz@adfin.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>FS-Cache: Reduce cookie ref count if submit fails.</title>
<updated>2014-08-27T14:29:34+00:00</updated>
<author>
<name>Milosz Tanski</name>
<email>milosz@adfin.com</email>
</author>
<published>2014-08-13T16:58:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=920bce20d74817bdd8bfcbc28ecb1179c9e01081'/>
<id>920bce20d74817bdd8bfcbc28ecb1179c9e01081</id>
<content type='text'>
I've been seeing issues with disposing cookies under vma pressure. The symptom
is that the refcount gets out of sync. In this case we fail to decrement the
refcount if submit fails. I found this while auditing the error in and around
cookie operations.

Signed-off-by: Milosz Tanski &lt;milosz@adfin.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>
I've been seeing issues with disposing cookies under vma pressure. The symptom
is that the refcount gets out of sync. In this case we fail to decrement the
refcount if submit fails. I found this while auditing the error in and around
cookie operations.

Signed-off-by: Milosz Tanski &lt;milosz@adfin.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>FS-Cache: Timeout for releasepage()</title>
<updated>2014-08-27T14:24:06+00:00</updated>
<author>
<name>Milosz Tanski</name>
<email>milosz@adfin.com</email>
</author>
<published>2014-08-13T16:58:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9776de96e51565286da25c74d6f631abc50c63ef'/>
<id>9776de96e51565286da25c74d6f631abc50c63ef</id>
<content type='text'>
This is meant to avoid a recusive hang caused by underlying filesystem trying
to grab a free page and causing a write-out.

INFO: task kworker/u30:7:28375 blocked for more than 120 seconds.
      Not tainted 3.15.0-virtual #74
"echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kworker/u30:7   D 0000000000000000     0 28375      2 0x00000000
Workqueue: fscache_operation fscache_op_work_func [fscache]
 ffff88000b147148 0000000000000046 0000000000000000 ffff88000b1471c8
 ffff8807aa031820 0000000000014040 ffff88000b147fd8 0000000000014040
 ffff880f0c50c860 ffff8807aa031820 ffff88000b147158 ffff88007be59cd0
Call Trace:
 [&lt;ffffffff815930e9&gt;] schedule+0x29/0x70
 [&lt;ffffffffa018bed5&gt;] __fscache_wait_on_page_write+0x55/0x90 [fscache]
 [&lt;ffffffff810a4350&gt;] ? __wake_up_sync+0x20/0x20
 [&lt;ffffffffa018c135&gt;] __fscache_maybe_release_page+0x65/0x1e0 [fscache]
 [&lt;ffffffffa02ad813&gt;] ceph_releasepage+0x83/0x100 [ceph]
 [&lt;ffffffff811635b0&gt;] ? anon_vma_fork+0x130/0x130
 [&lt;ffffffff8112cdd2&gt;] try_to_release_page+0x32/0x50
 [&lt;ffffffff81140096&gt;] shrink_page_list+0x7e6/0x9d0
 [&lt;ffffffff8113f278&gt;] ? isolate_lru_pages.isra.73+0x78/0x1e0
 [&lt;ffffffff81140932&gt;] shrink_inactive_list+0x252/0x4c0
 [&lt;ffffffff811412b1&gt;] shrink_lruvec+0x3e1/0x670
 [&lt;ffffffff8114157f&gt;] shrink_zone+0x3f/0x110
 [&lt;ffffffff81141b06&gt;] do_try_to_free_pages+0x1d6/0x450
 [&lt;ffffffff8114a939&gt;] ? zone_statistics+0x99/0xc0
 [&lt;ffffffff81141e44&gt;] try_to_free_pages+0xc4/0x180
 [&lt;ffffffff81136982&gt;] __alloc_pages_nodemask+0x6b2/0xa60
 [&lt;ffffffff811c1d4e&gt;] ? __find_get_block+0xbe/0x250
 [&lt;ffffffff810a405e&gt;] ? wake_up_bit+0x2e/0x40
 [&lt;ffffffff811740c3&gt;] alloc_pages_current+0xb3/0x180
 [&lt;ffffffff8112cf07&gt;] __page_cache_alloc+0xb7/0xd0
 [&lt;ffffffff8112da6c&gt;] grab_cache_page_write_begin+0x7c/0xe0
 [&lt;ffffffff81214072&gt;] ? ext4_mark_inode_dirty+0x82/0x220
 [&lt;ffffffff81214a89&gt;] ext4_da_write_begin+0x89/0x2d0
 [&lt;ffffffff8112c6ee&gt;] generic_perform_write+0xbe/0x1d0
 [&lt;ffffffff811a96b1&gt;] ? update_time+0x81/0xc0
 [&lt;ffffffff811ad4c2&gt;] ? mnt_clone_write+0x12/0x30
 [&lt;ffffffff8112e80e&gt;] __generic_file_aio_write+0x1ce/0x3f0
 [&lt;ffffffff8112ea8e&gt;] generic_file_aio_write+0x5e/0xe0
 [&lt;ffffffff8120b94f&gt;] ext4_file_write+0x9f/0x410
 [&lt;ffffffff8120af56&gt;] ? ext4_file_open+0x66/0x180
 [&lt;ffffffff8118f0da&gt;] do_sync_write+0x5a/0x90
 [&lt;ffffffffa025c6c9&gt;] cachefiles_write_page+0x149/0x430 [cachefiles]
 [&lt;ffffffff812cf439&gt;] ? radix_tree_gang_lookup_tag+0x89/0xd0
 [&lt;ffffffffa018c512&gt;] fscache_write_op+0x222/0x3b0 [fscache]
 [&lt;ffffffffa018b35a&gt;] fscache_op_work_func+0x3a/0x100 [fscache]
 [&lt;ffffffff8107bfe9&gt;] process_one_work+0x179/0x4a0
 [&lt;ffffffff8107d47b&gt;] worker_thread+0x11b/0x370
 [&lt;ffffffff8107d360&gt;] ? manage_workers.isra.21+0x2e0/0x2e0
 [&lt;ffffffff81083d69&gt;] kthread+0xc9/0xe0
 [&lt;ffffffff81010000&gt;] ? ftrace_raw_event_xen_mmu_release_ptpage+0x70/0x90
 [&lt;ffffffff81083ca0&gt;] ? flush_kthread_worker+0xb0/0xb0
 [&lt;ffffffff8159eefc&gt;] ret_from_fork+0x7c/0xb0
 [&lt;ffffffff81083ca0&gt;] ? flush_kthread_worker+0xb0/0xb0

Signed-off-by: Milosz Tanski &lt;milosz@adfin.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>
This is meant to avoid a recusive hang caused by underlying filesystem trying
to grab a free page and causing a write-out.

INFO: task kworker/u30:7:28375 blocked for more than 120 seconds.
      Not tainted 3.15.0-virtual #74
"echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kworker/u30:7   D 0000000000000000     0 28375      2 0x00000000
Workqueue: fscache_operation fscache_op_work_func [fscache]
 ffff88000b147148 0000000000000046 0000000000000000 ffff88000b1471c8
 ffff8807aa031820 0000000000014040 ffff88000b147fd8 0000000000014040
 ffff880f0c50c860 ffff8807aa031820 ffff88000b147158 ffff88007be59cd0
Call Trace:
 [&lt;ffffffff815930e9&gt;] schedule+0x29/0x70
 [&lt;ffffffffa018bed5&gt;] __fscache_wait_on_page_write+0x55/0x90 [fscache]
 [&lt;ffffffff810a4350&gt;] ? __wake_up_sync+0x20/0x20
 [&lt;ffffffffa018c135&gt;] __fscache_maybe_release_page+0x65/0x1e0 [fscache]
 [&lt;ffffffffa02ad813&gt;] ceph_releasepage+0x83/0x100 [ceph]
 [&lt;ffffffff811635b0&gt;] ? anon_vma_fork+0x130/0x130
 [&lt;ffffffff8112cdd2&gt;] try_to_release_page+0x32/0x50
 [&lt;ffffffff81140096&gt;] shrink_page_list+0x7e6/0x9d0
 [&lt;ffffffff8113f278&gt;] ? isolate_lru_pages.isra.73+0x78/0x1e0
 [&lt;ffffffff81140932&gt;] shrink_inactive_list+0x252/0x4c0
 [&lt;ffffffff811412b1&gt;] shrink_lruvec+0x3e1/0x670
 [&lt;ffffffff8114157f&gt;] shrink_zone+0x3f/0x110
 [&lt;ffffffff81141b06&gt;] do_try_to_free_pages+0x1d6/0x450
 [&lt;ffffffff8114a939&gt;] ? zone_statistics+0x99/0xc0
 [&lt;ffffffff81141e44&gt;] try_to_free_pages+0xc4/0x180
 [&lt;ffffffff81136982&gt;] __alloc_pages_nodemask+0x6b2/0xa60
 [&lt;ffffffff811c1d4e&gt;] ? __find_get_block+0xbe/0x250
 [&lt;ffffffff810a405e&gt;] ? wake_up_bit+0x2e/0x40
 [&lt;ffffffff811740c3&gt;] alloc_pages_current+0xb3/0x180
 [&lt;ffffffff8112cf07&gt;] __page_cache_alloc+0xb7/0xd0
 [&lt;ffffffff8112da6c&gt;] grab_cache_page_write_begin+0x7c/0xe0
 [&lt;ffffffff81214072&gt;] ? ext4_mark_inode_dirty+0x82/0x220
 [&lt;ffffffff81214a89&gt;] ext4_da_write_begin+0x89/0x2d0
 [&lt;ffffffff8112c6ee&gt;] generic_perform_write+0xbe/0x1d0
 [&lt;ffffffff811a96b1&gt;] ? update_time+0x81/0xc0
 [&lt;ffffffff811ad4c2&gt;] ? mnt_clone_write+0x12/0x30
 [&lt;ffffffff8112e80e&gt;] __generic_file_aio_write+0x1ce/0x3f0
 [&lt;ffffffff8112ea8e&gt;] generic_file_aio_write+0x5e/0xe0
 [&lt;ffffffff8120b94f&gt;] ext4_file_write+0x9f/0x410
 [&lt;ffffffff8120af56&gt;] ? ext4_file_open+0x66/0x180
 [&lt;ffffffff8118f0da&gt;] do_sync_write+0x5a/0x90
 [&lt;ffffffffa025c6c9&gt;] cachefiles_write_page+0x149/0x430 [cachefiles]
 [&lt;ffffffff812cf439&gt;] ? radix_tree_gang_lookup_tag+0x89/0xd0
 [&lt;ffffffffa018c512&gt;] fscache_write_op+0x222/0x3b0 [fscache]
 [&lt;ffffffffa018b35a&gt;] fscache_op_work_func+0x3a/0x100 [fscache]
 [&lt;ffffffff8107bfe9&gt;] process_one_work+0x179/0x4a0
 [&lt;ffffffff8107d47b&gt;] worker_thread+0x11b/0x370
 [&lt;ffffffff8107d360&gt;] ? manage_workers.isra.21+0x2e0/0x2e0
 [&lt;ffffffff81083d69&gt;] kthread+0xc9/0xe0
 [&lt;ffffffff81010000&gt;] ? ftrace_raw_event_xen_mmu_release_ptpage+0x70/0x90
 [&lt;ffffffff81083ca0&gt;] ? flush_kthread_worker+0xb0/0xb0
 [&lt;ffffffff8159eefc&gt;] ret_from_fork+0x7c/0xb0
 [&lt;ffffffff81083ca0&gt;] ? flush_kthread_worker+0xb0/0xb0

Signed-off-by: Milosz Tanski &lt;milosz@adfin.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/fscache: make ctl_table static</title>
<updated>2014-08-07T01:01:12+00:00</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2014-08-06T23:03:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3e584064840de14856451ea9ce443c5d4f7e31ff'/>
<id>3e584064840de14856451ea9ce443c5d4f7e31ff</id>
<content type='text'>
fscache_sysctls and fscache_sysctls_root are only used in main.c

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Joe Perches &lt;joe@perches.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fscache_sysctls and fscache_sysctls_root are only used in main.c

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sched: Remove proliferation of wait_on_bit() action functions</title>
<updated>2014-07-16T13:10:39+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2014-07-07T05:16:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=743162013d40ca612b4cb53d3a200dff2d9ab26e'/>
<id>743162013d40ca612b4cb53d3a200dff2d9ab26e</id>
<content type='text'>
The current "wait_on_bit" interface requires an 'action'
function to be provided which does the actual waiting.
There are over 20 such functions, many of them identical.
Most cases can be satisfied by one of just two functions, one
which uses io_schedule() and one which just uses schedule().

So:
 Rename wait_on_bit and        wait_on_bit_lock to
        wait_on_bit_action and wait_on_bit_lock_action
 to make it explicit that they need an action function.

 Introduce new wait_on_bit{,_lock} and wait_on_bit{,_lock}_io
 which are *not* given an action function but implicitly use
 a standard one.
 The decision to error-out if a signal is pending is now made
 based on the 'mode' argument rather than being encoded in the action
 function.

 All instances of the old wait_on_bit and wait_on_bit_lock which
 can use the new version have been changed accordingly and their
 action functions have been discarded.
 wait_on_bit{_lock} does not return any specific error code in the
 event of a signal so the caller must check for non-zero and
 interpolate their own error code as appropriate.

The wait_on_bit() call in __fscache_wait_on_invalidate() was
ambiguous as it specified TASK_UNINTERRUPTIBLE but used
fscache_wait_bit_interruptible as an action function.
David Howells confirms this should be uniformly
"uninterruptible"

The main remaining user of wait_on_bit{,_lock}_action is NFS
which needs to use a freezer-aware schedule() call.

A comment in fs/gfs2/glock.c notes that having multiple 'action'
functions is useful as they display differently in the 'wchan'
field of 'ps'. (and /proc/$PID/wchan).
As the new bit_wait{,_io} functions are tagged "__sched", they
will not show up at all, but something higher in the stack.  So
the distinction will still be visible, only with different
function names (gds2_glock_wait versus gfs2_glock_dq_wait in the
gfs2/glock.c case).

Since first version of this patch (against 3.15) two new action
functions appeared, on in NFS and one in CIFS.  CIFS also now
uses an action function that makes the same freezer aware
schedule call as NFS.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt; (fscache, keys)
Acked-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt; (gfs2)
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Steve French &lt;sfrench@samba.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: http://lkml.kernel.org/r/20140707051603.28027.72349.stgit@notabene.brown
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current "wait_on_bit" interface requires an 'action'
function to be provided which does the actual waiting.
There are over 20 such functions, many of them identical.
Most cases can be satisfied by one of just two functions, one
which uses io_schedule() and one which just uses schedule().

So:
 Rename wait_on_bit and        wait_on_bit_lock to
        wait_on_bit_action and wait_on_bit_lock_action
 to make it explicit that they need an action function.

 Introduce new wait_on_bit{,_lock} and wait_on_bit{,_lock}_io
 which are *not* given an action function but implicitly use
 a standard one.
 The decision to error-out if a signal is pending is now made
 based on the 'mode' argument rather than being encoded in the action
 function.

 All instances of the old wait_on_bit and wait_on_bit_lock which
 can use the new version have been changed accordingly and their
 action functions have been discarded.
 wait_on_bit{_lock} does not return any specific error code in the
 event of a signal so the caller must check for non-zero and
 interpolate their own error code as appropriate.

The wait_on_bit() call in __fscache_wait_on_invalidate() was
ambiguous as it specified TASK_UNINTERRUPTIBLE but used
fscache_wait_bit_interruptible as an action function.
David Howells confirms this should be uniformly
"uninterruptible"

The main remaining user of wait_on_bit{,_lock}_action is NFS
which needs to use a freezer-aware schedule() call.

A comment in fs/gfs2/glock.c notes that having multiple 'action'
functions is useful as they display differently in the 'wchan'
field of 'ps'. (and /proc/$PID/wchan).
As the new bit_wait{,_io} functions are tagged "__sched", they
will not show up at all, but something higher in the stack.  So
the distinction will still be visible, only with different
function names (gds2_glock_wait versus gfs2_glock_dq_wait in the
gfs2/glock.c case).

Since first version of this patch (against 3.15) two new action
functions appeared, on in NFS and one in CIFS.  CIFS also now
uses an action function that makes the same freezer aware
schedule call as NFS.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt; (fscache, keys)
Acked-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt; (gfs2)
Acked-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Steve French &lt;sfrench@samba.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: http://lkml.kernel.org/r/20140707051603.28027.72349.stgit@notabene.brown
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fscache: convert use of typedef ctl_table to struct ctl_table</title>
<updated>2014-06-06T23:08:16+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-06-06T21:38:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=75a3294ec51c091c6d848afd9c031ef31d436ae1'/>
<id>75a3294ec51c091c6d848afd9c031ef31d436ae1</id>
<content type='text'>
This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches &lt;joe@perches.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This typedef is unnecessary and should just be removed.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/fscache: replace seq_printf by seq_puts</title>
<updated>2014-06-04T23:53:52+00:00</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2014-06-04T23:05:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3185a88ce37490938d56119c474aa48616d386e8'/>
<id>3185a88ce37490938d56119c474aa48616d386e8</id>
<content type='text'>
Replace seq_printf where possible + coalesce formats from 2 existing
seq_puts

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Cc: David Howells &lt;dhowells@redhat.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace seq_printf where possible + coalesce formats from 2 existing
seq_puts

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/fscache: convert printk to pr_foo()</title>
<updated>2014-06-04T23:53:51+00:00</updated>
<author>
<name>Fabian Frederick</name>
<email>fabf@skynet.be</email>
</author>
<published>2014-06-04T23:05:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=36dfd116edd48fa6174d5694c143f1d4bd81aba8'/>
<id>36dfd116edd48fa6174d5694c143f1d4bd81aba8</id>
<content type='text'>
All printk converted to pr_foo() except internal.h: printk(KERN_DEBUG

Coalesce formats.

Add pr_fmt

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Cc: David Howells &lt;dhowells@redhat.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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All printk converted to pr_foo() except internal.h: printk(KERN_DEBUG

Coalesce formats.

Add pr_fmt

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>FS-Cache: Handle removal of unadded object to the fscache_object_list rb tree</title>
<updated>2014-02-17T21:47:35+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2014-02-17T15:01:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7026f1929e18921fd67bf478f475a8fdfdff16ae'/>
<id>7026f1929e18921fd67bf478f475a8fdfdff16ae</id>
<content type='text'>
When FS-Cache allocates an object, the following sequence of events can
occur:

 --&gt;fscache_alloc_object()
    --&gt;cachefiles_alloc_object() [via cache-&gt;ops-&gt;alloc_object]
    &lt;--[returns new object]
    --&gt;fscache_attach_object()
    &lt;--[failed]
    --&gt;cachefiles_put_object() [via cache-&gt;ops-&gt;put_object]
       --&gt;fscache_object_destroy()
          --&gt;fscache_objlist_remove()
             --&gt;rb_erase() to remove the object from fscache_object_list.

resulting in a crash in the rbtree code.

The problem is that the object is only added to fscache_object_list on
the success path of fscache_attach_object() where it calls
fscache_objlist_add().

So if fscache_attach_object() fails, the object won't have been added to
the objlist rbtree.  We do, however, unconditionally try to remove the
object from the tree.

Thanks to NeilBrown for finding this and suggesting this solution.

Reported-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Tested-by: (a customer of) NeilBrown &lt;neilb@suse.de&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 FS-Cache allocates an object, the following sequence of events can
occur:

 --&gt;fscache_alloc_object()
    --&gt;cachefiles_alloc_object() [via cache-&gt;ops-&gt;alloc_object]
    &lt;--[returns new object]
    --&gt;fscache_attach_object()
    &lt;--[failed]
    --&gt;cachefiles_put_object() [via cache-&gt;ops-&gt;put_object]
       --&gt;fscache_object_destroy()
          --&gt;fscache_objlist_remove()
             --&gt;rb_erase() to remove the object from fscache_object_list.

resulting in a crash in the rbtree code.

The problem is that the object is only added to fscache_object_list on
the success path of fscache_attach_object() where it calls
fscache_objlist_add().

So if fscache_attach_object() fails, the object won't have been added to
the objlist rbtree.  We do, however, unconditionally try to remove the
object from the tree.

Thanks to NeilBrown for finding this and suggesting this solution.

Reported-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Tested-by: (a customer of) NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
