<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/fs-writeback.c, branch v3.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.6</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-08-01T01:42:40Z</updated>
<entry>
<title>mm: prepare for removal of obsolete /proc/sys/vm/nr_pdflush_threads</title>
<updated>2012-08-01T01:42:40Z</updated>
<author>
<name>Wanpeng Li</name>
<email>liwp@linux.vnet.ibm.com</email>
</author>
<published>2012-07-31T23:41:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3965c9ae47d64aadf6f13b6fcd37767b83c0689a'/>
<id>urn:sha1:3965c9ae47d64aadf6f13b6fcd37767b83c0689a</id>
<content type='text'>
Since per-BDI flusher threads were introduced in 2.6, the pdflush
mechanism is not used any more.  But the old interface exported through
/proc/sys/vm/nr_pdflush_threads still exists and is obviously useless.

For back-compatibility, printk warning information and return 2 to notify
the users that the interface is removed.

Signed-off-by: Wanpeng Li &lt;liwp@linux.vnet.ibm.com&gt;
Cc: Wu Fengguang &lt;fengguang.wu@intel.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>Merge tag 'writeback-proportions' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux</title>
<updated>2012-07-31T05:14:04Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-07-31T05:14:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2e3ee613480563a6d5c01b57d342e65cc58c06df'/>
<id>urn:sha1:2e3ee613480563a6d5c01b57d342e65cc58c06df</id>
<content type='text'>
Pull writeback updates from Wu Fengguang:
 "Use time based periods to age the writeback proportions, which can
  adapt equally well to fast/slow devices."

Fix up trivial conflict in comment in fs/sync.c

* tag 'writeback-proportions' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
  writeback: Fix some comment errors
  block: Convert BDI proportion calculations to flexible proportions
  lib: Fix possible deadlock in flexible proportion code
  lib: Proportions with flexible period
</content>
</entry>
<entry>
<title>vfs: Move noop_backing_dev_info check from sync into writeback</title>
<updated>2012-07-22T19:58:18Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-07-03T14:45:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6eedc70150d55b5885800eb6664ea226dc2cb66f'/>
<id>urn:sha1:6eedc70150d55b5885800eb6664ea226dc2cb66f</id>
<content type='text'>
In principle, a filesystem may want to have -&gt;sync_fs() called during sync(1)
although it does not have a bdi (i.e. s_bdi is set to noop_backing_dev_info).
Only writeback code really needs bdi set to something reasonable. So move the
checks where they are more logical.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>writeback: Fix some comment errors</title>
<updated>2012-06-09T11:54:47Z</updated>
<author>
<name>Wanpeng Li</name>
<email>liwp@linux.vnet.ibm.com</email>
</author>
<published>2012-06-09T03:10:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=331cbdeedeb2f4ef01ccb761513708af0fe77098'/>
<id>urn:sha1:331cbdeedeb2f4ef01ccb761513708af0fe77098</id>
<content type='text'>
Signed-off-by: Wanpeng Li &lt;liwp@linux.vnet.ibm.com&gt;
Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
</content>
</entry>
<entry>
<title>writeback: Fix lock imbalance in writeback_sb_inodes()</title>
<updated>2012-06-08T23:32:15Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-06-08T15:07:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ead188f9f930fb5d7f0c49315a7fce3d8bd16b7e'/>
<id>urn:sha1:ead188f9f930fb5d7f0c49315a7fce3d8bd16b7e</id>
<content type='text'>
Fix bug introduced by 169ebd90.  We have to have wb_list_lock locked when
restarting writeback loop after having waited for inode writeback.

Bug description by Ted Tso:

  I can reproduce this fairly easily by using ext4 w/o a journal, running
  under KVM with 1024megs memory, with fsstress (xfstests #13):

  [   45.153294] =====================================
  [   45.154784] [ BUG: bad unlock balance detected! ]
  [   45.155591] 3.5.0-rc1-00002-gb22b1f1 #124 Not tainted
  [   45.155591] -------------------------------------
  [   45.155591] flush-254:16/2499 is trying to release lock (&amp;(&amp;wb-&gt;list_lock)-&gt;rlock) at:
  [   45.155591] [&lt;c022c3da&gt;] writeback_sb_inodes+0x160/0x327
  [   45.155591] but there are no more locks to release!

Reported-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Tested-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
</content>
</entry>
<entry>
<title>writeback: Avoid iput() from flusher thread</title>
<updated>2012-05-06T05:43:41Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-05-03T12:48:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=169ebd90131b2ffca74bb2dbe7eeacd39fb83714'/>
<id>urn:sha1:169ebd90131b2ffca74bb2dbe7eeacd39fb83714</id>
<content type='text'>
Doing iput() from flusher thread (writeback_sb_inodes()) can create problems
because iput() can do a lot of work - for example truncate the inode if it's
the last iput on unlinked file. Some filesystems depend on flusher thread
progressing (e.g. because they need to flush delay allocated blocks to reduce
allocation uncertainty) and so flusher thread doing truncate creates
interesting dependencies and possibilities for deadlocks.

We get rid of iput() in flusher thread by using the fact that I_SYNC inode
flag effectively pins the inode in memory. So if we take care to either hold
i_lock or have I_SYNC set, we can get away without taking inode reference
in writeback_sb_inodes().

As a side effect of these changes, we also fix possible use-after-free in
wb_writeback() because inode_wait_for_writeback() call could try to reacquire
i_lock on the inode that was already free.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
</content>
</entry>
<entry>
<title>writeback: Refactor writeback_single_inode()</title>
<updated>2012-05-06T05:43:40Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-05-03T12:48:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4f8ad655dbc82cf05d2edc11e66b78a42d38bf93'/>
<id>urn:sha1:4f8ad655dbc82cf05d2edc11e66b78a42d38bf93</id>
<content type='text'>
The code in writeback_single_inode() is relatively complex. The list requeing
logic makes sense only for flusher thread but not really for sync_inode() or
write_inode_now() callers. Also when we want to get rid of inode references
held by flusher thread, we will need a special I_SYNC handling there.

So separate part of writeback_single_inode() which does the real writeback work
into __writeback_single_inode() and make writeback_single_inode() do only stuff
necessary for callers writing only one inode, moving the special list handling
into writeback_sb_inodes(). As a sideeffect this fixes a possible race where we
could skip some inode during sync(2) because other writer refiled it from b_io
to b_dirty list. Also I_SYNC handling is moved into the callers of
__writeback_single_inode() to make locking easier.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
</content>
</entry>
<entry>
<title>writeback: Remove wb-&gt;list_lock from writeback_single_inode()</title>
<updated>2012-05-06T05:43:39Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-05-03T12:47:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f0d07b7ffde758a27a48509ceda9a9ef413e0ea0'/>
<id>urn:sha1:f0d07b7ffde758a27a48509ceda9a9ef413e0ea0</id>
<content type='text'>
writeback_single_inode() doesn't need wb-&gt;list_lock for anything on entry now.
So remove the requirement. This makes locking of writeback_single_inode()
temporarily awkward (entering with i_lock, returning with i_lock and
wb-&gt;list_lock) but it will be sanitized in the next patch.

Also inode_wait_for_writeback() doesn't need wb-&gt;list_lock for anything. It was
just taking it to make usage convenient for callers but with
writeback_single_inode() changing it's not very convenient anymore. So remove
the lock from that function.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
</content>
</entry>
<entry>
<title>writeback: Separate inode requeueing after writeback</title>
<updated>2012-05-06T05:43:39Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-05-03T12:47:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ccb26b5a65867839d95156e02ea4861f64a8cbf3'/>
<id>urn:sha1:ccb26b5a65867839d95156e02ea4861f64a8cbf3</id>
<content type='text'>
Move inode requeueing after inode has been written out into a separate
function.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
</content>
</entry>
<entry>
<title>writeback: Move I_DIRTY_PAGES handling</title>
<updated>2012-05-06T05:43:39Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-05-03T12:47:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6290be1c1dc6589eeda213aa40946b27fa4faac8'/>
<id>urn:sha1:6290be1c1dc6589eeda213aa40946b27fa4faac8</id>
<content type='text'>
Instead of clearing I_DIRTY_PAGES and resetting it when we didn't succeed in
writing them all, just clear the bit only when we succeeded writing all the
pages. We also move the clearing of the bit close to other i_state handling to
separate it from writeback list handling. This is desirable because list
handling will differ for flusher thread and other writeback_single_inode()
callers in future. No filesystem plays any tricks with I_DIRTY_PAGES (like
checking it in -&gt;writepages or -&gt;write_inode implementation) so this movement
is safe.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
</content>
</entry>
</feed>
