<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/fs-writeback.c, branch v3.8</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.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-12-13T01:38:34Z</updated>
<entry>
<title>writeback: fix a typo in comment</title>
<updated>2012-12-13T01:38:34Z</updated>
<author>
<name>Yan Hong</name>
<email>clouds.yan@gmail.com</email>
</author>
<published>2012-12-12T21:52:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5aaea51dfbddcccaf38eacd03379f47c99bbe944'/>
<id>urn:sha1:5aaea51dfbddcccaf38eacd03379f47c99bbe944</id>
<content type='text'>
Signed-off-by: Yan Hong &lt;clouds.yan@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>writeback: put unused inodes to LRU after writeback completion</title>
<updated>2012-11-27T01:41:24Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2012-11-27T00:29:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4eff96dd5283a102e0c1cac95247090be74a38ed'/>
<id>urn:sha1:4eff96dd5283a102e0c1cac95247090be74a38ed</id>
<content type='text'>
Commit 169ebd90131b ("writeback: Avoid iput() from flusher thread")
removed iget-iput pair from inode writeback.  As a side effect, inodes
that are dirty during iput_final() call won't be ever added to inode LRU
(iput_final() doesn't add dirty inodes to LRU and later when the inode
is cleaned there's noone to add the inode there).  Thus inodes are
effectively unreclaimable until someone looks them up again.

The practical effect of this bug is limited by the fact that inodes are
pinned by a dentry for long enough that the inode gets cleaned.  But
still the bug can have nasty consequences leading up to OOM conditions
under certain circumstances.  Following can easily reproduce the
problem:

  for (( i = 0; i &lt; 1000; i++ )); do
    mkdir $i
    for (( j = 0; j &lt; 1000; j++ )); do
      touch $i/$j
      echo 2 &gt; /proc/sys/vm/drop_caches
    done
  done

then one needs to run 'sync; ls -lR' to make inodes reclaimable again.

We fix the issue by inserting unused clean inodes into the LRU after
writeback finishes in inode_sync_complete().

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Reported-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Cc: Wu Fengguang &lt;fengguang.wu@intel.com&gt;
Cc: Dave Chinner &lt;david@fromorbit.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;		[3.5+]
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 branch 'writeback-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux</title>
<updated>2012-10-12T01:46:03Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-10-12T01:46:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=40924754f2cabd5d9af4bcd4dcecc362b5e0baa1'/>
<id>urn:sha1:40924754f2cabd5d9af4bcd4dcecc362b5e0baa1</id>
<content type='text'>
Pull writeback fixes from Fengguang Wu:
 "Three trivial writeback fixes"

* 'writeback-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
  CPU hotplug, writeback: Don't call writeback_set_ratelimit() too often during hotplug
  writeback: correct comment for move_expired_inodes()
  backing-dev: use kstrto* in preference to simple_strtoul
</content>
</entry>
<entry>
<title>fs/fs-writeback.c: remove unneccesary parameter of __writeback_single_inode()</title>
<updated>2012-10-09T07:23:00Z</updated>
<author>
<name>Yan Hong</name>
<email>clouds.yan@gmail.com</email>
</author>
<published>2012-10-08T23:33:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cd8ed2a45a401cb692d769e92de7d73aa42fabce'/>
<id>urn:sha1:cd8ed2a45a401cb692d769e92de7d73aa42fabce</id>
<content type='text'>
The parameter 'wb' is never used in this function.

Signed-off-by: Yan Hong &lt;clouds.yan@gmail.com&gt;
Acked-by: 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 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4</title>
<updated>2012-10-07T21:36:39Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-10-07T21:36:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6432f2128414edbea5fd4f6c4fa4c28d0e1c6151'/>
<id>urn:sha1:6432f2128414edbea5fd4f6c4fa4c28d0e1c6151</id>
<content type='text'>
Pull ext4 updates from Ted Ts'o:
 "The big new feature added this time is supporting online resizing
  using the meta_bg feature.  This allows us to resize file systems
  which are greater than 16TB.  In addition, the speed of online
  resizing has been improved in general.

  We also fix a number of races, some of which could lead to deadlocks,
  in ext4's Asynchronous I/O and online defrag support, thanks to good
  work by Dmitry Monakhov.

  There are also a large number of more minor bug fixes and cleanups
  from a number of other ext4 contributors, quite of few of which have
  submitted fixes for the first time."

* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (69 commits)
  ext4: fix ext4_flush_completed_IO wait semantics
  ext4: fix mtime update in nodelalloc mode
  ext4: fix ext_remove_space for punch_hole case
  ext4: punch_hole should wait for DIO writers
  ext4: serialize truncate with owerwrite DIO workers
  ext4: endless truncate due to nonlocked dio readers
  ext4: serialize unlocked dio reads with truncate
  ext4: serialize dio nonlocked reads with defrag workers
  ext4: completed_io locking cleanup
  ext4: fix unwritten counter leakage
  ext4: give i_aiodio_unwritten a more appropriate name
  ext4: ext4_inode_info diet
  ext4: convert to use leXX_add_cpu()
  ext4: ext4_bread usage audit
  fs: reserve fallocate flag codepoint
  ext4: remove redundant offset check in mext_check_arguments()
  ext4: don't clear orphan list on ro mount with errors
  jbd2: fix assertion failure in commit code due to lacking transaction credits
  ext4: release donor reference when EXT4_IOC_MOVE_EXT ioctl fails
  ext4: enable FITRIM ioctl on bigalloc file system
  ...
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial</title>
<updated>2012-10-01T16:06:36Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-10-01T16:06:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=99dbb1632f1165c2726056ebfce6edde0e5a0208'/>
<id>urn:sha1:99dbb1632f1165c2726056ebfce6edde0e5a0208</id>
<content type='text'>
Pull the trivial tree from Jiri Kosina:
 "Tiny usual fixes all over the place"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
  doc: fix old config name of kprobetrace
  fs/fs-writeback.c: cleanup riteback_sb_inodes kerneldoc
  btrfs: fix the commment for the action flags in delayed-ref.h
  btrfs: fix trivial typo for the comment of BTRFS_FREE_INO_OBJECTID
  vfs: fix kerneldoc for generic_fh_to_parent()
  treewide: fix comment/printk/variable typos
  ipr: fix small coding style issues
  doc: fix broken utf8 encoding
  nfs: comment fix
  platform/x86: fix asus_laptop.wled_type module parameter
  mfd: printk/comment fixes
  doc: getdelays.c: remember to close() socket on error in create_nl_socket()
  doc: aliasing-test: close fd on write error
  mmc: fix comment typos
  dma: fix comments
  spi: fix comment/printk typos in spi
  Coccinelle: fix typo in memdup_user.cocci
  tmiofb: missing NULL pointer checks
  tools: perf: Fix typo in tools/perf
  tools/testing: fix comment / output typos
  ...
</content>
</entry>
<entry>
<title>fs/fs-writeback.c: cleanup riteback_sb_inodes kerneldoc</title>
<updated>2012-09-21T10:04:36Z</updated>
<author>
<name>Liu Bo</name>
<email>liub.liubo@gmail.com</email>
</author>
<published>2012-09-20T07:49:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7dfd8cc536dc4984ee92d9a8863ea705b955bc37'/>
<id>urn:sha1:7dfd8cc536dc4984ee92d9a8863ea705b955bc37</id>
<content type='text'>
Argument @only_this_sb has been removed.

Signed-off-by: Liu Bo &lt;liub.liubo@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>ext4: fix potential deadlock in ext4_nonda_switch()</title>
<updated>2012-09-20T02:42:36Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2012-09-20T02:42:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=00d4e7362ed01987183e9528295de3213031309c'/>
<id>urn:sha1:00d4e7362ed01987183e9528295de3213031309c</id>
<content type='text'>
In ext4_nonda_switch(), if the file system is getting full we used to
call writeback_inodes_sb_if_idle().  The problem is that we can be
holding i_mutex already, and this causes a potential deadlock when
writeback_inodes_sb_if_idle() when it tries to take s_umount.  (See
lockdep output below).

As it turns out we don't need need to hold s_umount; the fact that we
are in the middle of the write(2) system call will keep the superblock
pinned.  Unfortunately writeback_inodes_sb() checks to make sure
s_umount is taken, and the VFS uses a different mechanism for making
sure the file system doesn't get unmounted out from under us.  The
simplest way of dealing with this is to just simply grab s_umount
using a trylock, and skip kicking the writeback flusher thread in the
very unlikely case that we can't take a read lock on s_umount without
blocking.

Also, we now check the cirteria for kicking the writeback thread
before we decide to whether to fall back to non-delayed writeback, so
if there are any outstanding delayed allocation writes, we try to get
them resolved as soon as possible.

   [ INFO: possible circular locking dependency detected ]
   3.6.0-rc1-00042-gce894ca #367 Not tainted
   -------------------------------------------------------
   dd/8298 is trying to acquire lock:
    (&amp;type-&gt;s_umount_key#18){++++..}, at: [&lt;c02277d4&gt;] writeback_inodes_sb_if_idle+0x28/0x46

   but task is already holding lock:
    (&amp;sb-&gt;s_type-&gt;i_mutex_key#8){+.+...}, at: [&lt;c01ddcce&gt;] generic_file_aio_write+0x5f/0xd3

   which lock already depends on the new lock.

   2 locks held by dd/8298:
    #0:  (sb_writers#2){.+.+.+}, at: [&lt;c01ddcc5&gt;] generic_file_aio_write+0x56/0xd3
    #1:  (&amp;sb-&gt;s_type-&gt;i_mutex_key#8){+.+...}, at: [&lt;c01ddcce&gt;] generic_file_aio_write+0x5f/0xd3

   stack backtrace:
   Pid: 8298, comm: dd Not tainted 3.6.0-rc1-00042-gce894ca #367
   Call Trace:
    [&lt;c015b79c&gt;] ? console_unlock+0x345/0x372
    [&lt;c06d62a1&gt;] print_circular_bug+0x190/0x19d
    [&lt;c019906c&gt;] __lock_acquire+0x86d/0xb6c
    [&lt;c01999db&gt;] ? mark_held_locks+0x5c/0x7b
    [&lt;c0199724&gt;] lock_acquire+0x66/0xb9
    [&lt;c02277d4&gt;] ? writeback_inodes_sb_if_idle+0x28/0x46
    [&lt;c06db935&gt;] down_read+0x28/0x58
    [&lt;c02277d4&gt;] ? writeback_inodes_sb_if_idle+0x28/0x46
    [&lt;c02277d4&gt;] writeback_inodes_sb_if_idle+0x28/0x46
    [&lt;c026f3b2&gt;] ext4_nonda_switch+0xe1/0xf4
    [&lt;c0271ece&gt;] ext4_da_write_begin+0x27/0x193
    [&lt;c01dcdb0&gt;] generic_file_buffered_write+0xc8/0x1bb
    [&lt;c01ddc47&gt;] __generic_file_aio_write+0x1dd/0x205
    [&lt;c01ddce7&gt;] generic_file_aio_write+0x78/0xd3
    [&lt;c026d336&gt;] ext4_file_write+0x480/0x4a6
    [&lt;c0198c1d&gt;] ? __lock_acquire+0x41e/0xb6c
    [&lt;c0180944&gt;] ? sched_clock_cpu+0x11a/0x13e
    [&lt;c01967e9&gt;] ? trace_hardirqs_off+0xb/0xd
    [&lt;c018099f&gt;] ? local_clock+0x37/0x4e
    [&lt;c0209f2c&gt;] do_sync_write+0x67/0x9d
    [&lt;c0209ec5&gt;] ? wait_on_retry_sync_kiocb+0x44/0x44
    [&lt;c020a7b9&gt;] vfs_write+0x7b/0xe6
    [&lt;c020a9a6&gt;] sys_write+0x3b/0x64
    [&lt;c06dd4bd&gt;] syscall_call+0x7/0xb

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>writeback: correct comment for move_expired_inodes()</title>
<updated>2012-09-11T00:29:50Z</updated>
<author>
<name>Wang Sheng-Hui</name>
<email>shhuiw@gmail.com</email>
</author>
<published>2012-09-11T00:28:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0e2f2b23672055e1301c11509d5b8eda7b718d8e'/>
<id>urn:sha1:0e2f2b23672055e1301c11509d5b8eda7b718d8e</id>
<content type='text'>
The function scans @delaying_queue and stops at the first inode
whose dirtied_when is after *work-&gt;older_than_this. So the expired
ones being moved are those before *work-&gt;older_than_this. Correct
the comment here.

Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Wang Sheng-Hui &lt;shhuiw@gmail.com&gt;
</content>
</entry>
<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>
</feed>
