<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs, branch v3.1-rc5</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs</title>
<updated>2011-09-02T15:25:23+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-09-02T15:25:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4d7b5a116f9c08719d98f81e21c7d47f672bdb69'/>
<id>4d7b5a116f9c08719d98f81e21c7d47f672bdb69</id>
<content type='text'>
* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: fix -&gt;write_inode return values
  xfs: fix xfs_mark_inode_dirty during umount
  xfs: deprecate the nodelaylog mount option
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: fix -&gt;write_inode return values
  xfs: fix xfs_mark_inode_dirty during umount
  xfs: deprecate the nodelaylog mount option
</pre>
</div>
</content>
</entry>
<entry>
<title>xfs: fix -&gt;write_inode return values</title>
<updated>2011-09-01T14:46:11+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2011-08-27T05:57:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=58d84c4ee0389ddeb86238d5d8359a982c9f7a5b'/>
<id>58d84c4ee0389ddeb86238d5d8359a982c9f7a5b</id>
<content type='text'>
Currently we always redirty an inode that was attempted to be written out
synchronously but has been cleaned by an AIL pushed internall, which is
rather bogus.  Fix that by doing the i_update_core check early on and
return 0 for it.  Also include async calls for it, as doing any work for
those is just as pointless.  While we're at it also fix the sign for the
EIO return in case of a filesystem shutdown, and fix the completely
non-sensical locking around xfs_log_inode.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;
(cherry picked from commit 297db93bb74cf687510313eb235a7aec14d67e97)

Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently we always redirty an inode that was attempted to be written out
synchronously but has been cleaned by an AIL pushed internall, which is
rather bogus.  Fix that by doing the i_update_core check early on and
return 0 for it.  Also include async calls for it, as doing any work for
those is just as pointless.  While we're at it also fix the sign for the
EIO return in case of a filesystem shutdown, and fix the completely
non-sensical locking around xfs_log_inode.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;
(cherry picked from commit 297db93bb74cf687510313eb235a7aec14d67e97)

Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xfs: fix xfs_mark_inode_dirty during umount</title>
<updated>2011-08-31T22:59:39+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2011-08-27T05:57:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=866e4ed77448a0c311e1b055eb72ea05423fd799'/>
<id>866e4ed77448a0c311e1b055eb72ea05423fd799</id>
<content type='text'>
During umount we do not add a dirty inode to the lru and wait for it to
become clean first, but force writeback of data and metadata with
I_WILL_FREE set.  Currently there is no way for XFS to detect that the
inode has been redirtied for metadata operations, as we skip the
mark_inode_dirty call during teardown.  Fix this by setting i_update_core
nanually in that case, so that the inode gets flushed during inode reclaim.

Alternatively we could enable calling mark_inode_dirty for inodes in
I_WILL_FREE state, and let the VFS dirty tracking handle this.  I decided
against this as we will get better I/O patterns from reclaim compared to
the synchronous writeout in write_inode_now, and always marking the inode
dirty in some way from xfs_mark_inode_dirty is a better safetly net in
either case.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;
(cherry picked from commit da6742a5a4cc844a9982fdd936ddb537c0747856)

Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During umount we do not add a dirty inode to the lru and wait for it to
become clean first, but force writeback of data and metadata with
I_WILL_FREE set.  Currently there is no way for XFS to detect that the
inode has been redirtied for metadata operations, as we skip the
mark_inode_dirty call during teardown.  Fix this by setting i_update_core
nanually in that case, so that the inode gets flushed during inode reclaim.

Alternatively we could enable calling mark_inode_dirty for inodes in
I_WILL_FREE state, and let the VFS dirty tracking handle this.  I decided
against this as we will get better I/O patterns from reclaim compared to
the synchronous writeout in write_inode_now, and always marking the inode
dirty in some way from xfs_mark_inode_dirty is a better safetly net in
either case.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;
(cherry picked from commit da6742a5a4cc844a9982fdd936ddb537c0747856)

Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'for_linus-20110831' of git://github.com/tytso/ext4</title>
<updated>2011-08-31T22:08:19+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-08-31T22:08:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b79c4f75e4d3fbfd225660c12f29a7fafcd8e6d9'/>
<id>b79c4f75e4d3fbfd225660c12f29a7fafcd8e6d9</id>
<content type='text'>
* tag 'for_linus-20110831' of git://github.com/tytso/ext4:
  ext4: remove i_mutex lock in ext4_evict_inode to fix lockdep complaining
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* tag 'for_linus-20110831' of git://github.com/tytso/ext4:
  ext4: remove i_mutex lock in ext4_evict_inode to fix lockdep complaining
</pre>
</div>
</content>
</entry>
<entry>
<title>ext4: remove i_mutex lock in ext4_evict_inode to fix lockdep complaining</title>
<updated>2011-08-31T15:50:51+00:00</updated>
<author>
<name>Jiaying Zhang</name>
<email>jiayingz@google.com</email>
</author>
<published>2011-08-31T15:50:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8c0bec2151a47906bf779c6715a10ce04453ab77'/>
<id>8c0bec2151a47906bf779c6715a10ce04453ab77</id>
<content type='text'>
The i_mutex lock and flush_completed_IO() added by commit 2581fdc810
in ext4_evict_inode() causes lockdep complaining about potential
deadlock in several places.  In most/all of these LOCKDEP complaints
it looks like it's a false positive, since many of the potential
circular locking cases can't take place by the time the
ext4_evict_inode() is called; but since at the very least it may mask
real problems, we need to address this.

This change removes the flush_completed_IO() and i_mutex lock in
ext4_evict_inode().  Instead, we take a different approach to resolve
the software lockup that commit 2581fdc810 intends to fix.  Rather
than having ext4-dio-unwritten thread wait for grabing the i_mutex
lock of an inode, we use mutex_trylock() instead, and simply requeue
the work item if we fail to grab the inode's i_mutex lock.

This should speed up work queue processing in general and also
prevents the following deadlock scenario: During page fault,
shrink_icache_memory is called that in turn evicts another inode B.
Inode B has some pending io_end work so it calls ext4_ioend_wait()
that waits for inode B's i_ioend_count to become zero.  However, inode
B's ioend work was queued behind some of inode A's ioend work on the
same cpu's ext4-dio-unwritten workqueue.  As the ext4-dio-unwritten
thread on that cpu is processing inode A's ioend work, it tries to
grab inode A's i_mutex lock.  Since the i_mutex lock of inode A is
still hold before the page fault happened, we enter a deadlock.

Signed-off-by: Jiaying Zhang &lt;jiayingz@google.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The i_mutex lock and flush_completed_IO() added by commit 2581fdc810
in ext4_evict_inode() causes lockdep complaining about potential
deadlock in several places.  In most/all of these LOCKDEP complaints
it looks like it's a false positive, since many of the potential
circular locking cases can't take place by the time the
ext4_evict_inode() is called; but since at the very least it may mask
real problems, we need to address this.

This change removes the flush_completed_IO() and i_mutex lock in
ext4_evict_inode().  Instead, we take a different approach to resolve
the software lockup that commit 2581fdc810 intends to fix.  Rather
than having ext4-dio-unwritten thread wait for grabing the i_mutex
lock of an inode, we use mutex_trylock() instead, and simply requeue
the work item if we fail to grab the inode's i_mutex lock.

This should speed up work queue processing in general and also
prevents the following deadlock scenario: During page fault,
shrink_icache_memory is called that in turn evicts another inode B.
Inode B has some pending io_end work so it calls ext4_ioend_wait()
that waits for inode B's i_ioend_count to become zero.  However, inode
B's ioend work was queued behind some of inode A's ioend work on the
same cpu's ext4-dio-unwritten workqueue.  As the ext4-dio-unwritten
thread on that cpu is processing inode A's ioend work, it tries to
grab inode A's i_mutex lock.  Since the i_mutex lock of inode A is
still hold before the page fault happened, we enter a deadlock.

Signed-off-by: Jiaying Zhang &lt;jiayingz@google.com&gt;
Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>All Arch: remove linkage for sys_nfsservctl system call</title>
<updated>2011-08-26T22:09:58+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-08-26T22:03:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f5b940997397229975ea073679b03967932a541b'/>
<id>f5b940997397229975ea073679b03967932a541b</id>
<content type='text'>
The nfsservctl system call is now gone, so we should remove all
linkage for it.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@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>
The nfsservctl system call is now gone, so we should remove all
linkage for it.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lockdep: Add helper function for dir vs file i_mutex annotation</title>
<updated>2011-08-25T17:50:18+00:00</updated>
<author>
<name>Josh Boyer</name>
<email>jwboyer@redhat.com</email>
</author>
<published>2011-08-25T11:48:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e096d0c7e2e4e5893792db865dd065ac73cf1f00'/>
<id>e096d0c7e2e4e5893792db865dd065ac73cf1f00</id>
<content type='text'>
Purely in-memory filesystems do not use the inode hash as the dcache
tells us if an entry already exists.  As a result, they do not call
unlock_new_inode, and thus directory inodes do not get put into a
different lockdep class for i_sem.

We need the different lockdep classes, because the locking order for
i_mutex is different for directory inodes and regular inodes.  Directory
inodes can do "readdir()", which takes i_mutex *before* possibly taking
mm-&gt;mmap_sem (due to a page fault while copying the directory entry to
user space).

In contrast, regular inodes can be mmap'ed, which takes mm-&gt;mmap_sem
before accessing i_mutex.

The two cases can never happen for the same inode, so no real deadlock
can occur, but without the different lockdep classes, lockdep cannot
understand that.  As a result, if CONFIG_DEBUG_LOCK_ALLOC is set, this
can lead to false positives from lockdep like below:

    find/645 is trying to acquire lock:
     (&amp;mm-&gt;mmap_sem){++++++}, at: [&lt;ffffffff81109514&gt;] might_fault+0x5c/0xac

    but task is already holding lock:
     (&amp;sb-&gt;s_type-&gt;i_mutex_key#15){+.+.+.}, at: [&lt;ffffffff81149f34&gt;]
    vfs_readdir+0x5b/0xb4

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -&gt; #1 (&amp;sb-&gt;s_type-&gt;i_mutex_key#15){+.+.+.}:
          [&lt;ffffffff8108ac26&gt;] lock_acquire+0xbf/0x103
          [&lt;ffffffff814db822&gt;] __mutex_lock_common+0x4c/0x361
          [&lt;ffffffff814dbc46&gt;] mutex_lock_nested+0x40/0x45
          [&lt;ffffffff811daa87&gt;] hugetlbfs_file_mmap+0x82/0x110
          [&lt;ffffffff81111557&gt;] mmap_region+0x258/0x432
          [&lt;ffffffff811119dd&gt;] do_mmap_pgoff+0x2ac/0x306
          [&lt;ffffffff81111b4f&gt;] sys_mmap_pgoff+0x118/0x16a
          [&lt;ffffffff8100c858&gt;] sys_mmap+0x22/0x24
          [&lt;ffffffff814e3ec2&gt;] system_call_fastpath+0x16/0x1b

    -&gt; #0 (&amp;mm-&gt;mmap_sem){++++++}:
          [&lt;ffffffff8108a4bc&gt;] __lock_acquire+0xa1a/0xcf7
          [&lt;ffffffff8108ac26&gt;] lock_acquire+0xbf/0x103
          [&lt;ffffffff81109541&gt;] might_fault+0x89/0xac
          [&lt;ffffffff81149cff&gt;] filldir+0x6f/0xc7
          [&lt;ffffffff811586ea&gt;] dcache_readdir+0x67/0x205
          [&lt;ffffffff81149f54&gt;] vfs_readdir+0x7b/0xb4
          [&lt;ffffffff8114a073&gt;] sys_getdents+0x7e/0xd1
          [&lt;ffffffff814e3ec2&gt;] system_call_fastpath+0x16/0x1b

This patch moves the directory vs file lockdep annotation into a helper
function that can be called by in-memory filesystems and has hugetlbfs
call it.

Signed-off-by: Josh Boyer &lt;jwboyer@redhat.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&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>
Purely in-memory filesystems do not use the inode hash as the dcache
tells us if an entry already exists.  As a result, they do not call
unlock_new_inode, and thus directory inodes do not get put into a
different lockdep class for i_sem.

We need the different lockdep classes, because the locking order for
i_mutex is different for directory inodes and regular inodes.  Directory
inodes can do "readdir()", which takes i_mutex *before* possibly taking
mm-&gt;mmap_sem (due to a page fault while copying the directory entry to
user space).

In contrast, regular inodes can be mmap'ed, which takes mm-&gt;mmap_sem
before accessing i_mutex.

The two cases can never happen for the same inode, so no real deadlock
can occur, but without the different lockdep classes, lockdep cannot
understand that.  As a result, if CONFIG_DEBUG_LOCK_ALLOC is set, this
can lead to false positives from lockdep like below:

    find/645 is trying to acquire lock:
     (&amp;mm-&gt;mmap_sem){++++++}, at: [&lt;ffffffff81109514&gt;] might_fault+0x5c/0xac

    but task is already holding lock:
     (&amp;sb-&gt;s_type-&gt;i_mutex_key#15){+.+.+.}, at: [&lt;ffffffff81149f34&gt;]
    vfs_readdir+0x5b/0xb4

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -&gt; #1 (&amp;sb-&gt;s_type-&gt;i_mutex_key#15){+.+.+.}:
          [&lt;ffffffff8108ac26&gt;] lock_acquire+0xbf/0x103
          [&lt;ffffffff814db822&gt;] __mutex_lock_common+0x4c/0x361
          [&lt;ffffffff814dbc46&gt;] mutex_lock_nested+0x40/0x45
          [&lt;ffffffff811daa87&gt;] hugetlbfs_file_mmap+0x82/0x110
          [&lt;ffffffff81111557&gt;] mmap_region+0x258/0x432
          [&lt;ffffffff811119dd&gt;] do_mmap_pgoff+0x2ac/0x306
          [&lt;ffffffff81111b4f&gt;] sys_mmap_pgoff+0x118/0x16a
          [&lt;ffffffff8100c858&gt;] sys_mmap+0x22/0x24
          [&lt;ffffffff814e3ec2&gt;] system_call_fastpath+0x16/0x1b

    -&gt; #0 (&amp;mm-&gt;mmap_sem){++++++}:
          [&lt;ffffffff8108a4bc&gt;] __lock_acquire+0xa1a/0xcf7
          [&lt;ffffffff8108ac26&gt;] lock_acquire+0xbf/0x103
          [&lt;ffffffff81109541&gt;] might_fault+0x89/0xac
          [&lt;ffffffff81149cff&gt;] filldir+0x6f/0xc7
          [&lt;ffffffff811586ea&gt;] dcache_readdir+0x67/0x205
          [&lt;ffffffff81149f54&gt;] vfs_readdir+0x7b/0xb4
          [&lt;ffffffff8114a073&gt;] sys_getdents+0x7e/0xd1
          [&lt;ffffffff814e3ec2&gt;] system_call_fastpath+0x16/0x1b

This patch moves the directory vs file lockdep annotation into a helper
function that can be called by in-memory filesystems and has hugetlbfs
call it.

Signed-off-by: Josh Boyer &lt;jwboyer@redhat.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xfs: deprecate the nodelaylog mount option</title>
<updated>2011-08-25T15:30:05+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2011-08-24T05:57:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=242d621964dd8641df53f7d51d4c6ead655cc5a6'/>
<id>242d621964dd8641df53f7d51d4c6ead655cc5a6</id>
<content type='text'>
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Dave Chinner &lt;dchinner@redhat.com&gt;
Signed-off-by: Alex Elder &lt;aelder@sgi.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse</title>
<updated>2011-08-24T16:14:42+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-08-24T16:14:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=051732bcbe3cff3fea04dc9042266562fe8b0859'/>
<id>051732bcbe3cff3fea04dc9042266562fe8b0859</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
  fuse: check size of FUSE_NOTIFY_INVAL_ENTRY message
  fuse: mark pages accessed when written to
  fuse: delete dead .write_begin and .write_end aops
  fuse: fix flock
  fuse: fix non-ANSI void function notation
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
  fuse: check size of FUSE_NOTIFY_INVAL_ENTRY message
  fuse: mark pages accessed when written to
  fuse: delete dead .write_begin and .write_end aops
  fuse: fix flock
  fuse: fix non-ANSI void function notation
</pre>
</div>
</content>
</entry>
<entry>
<title>fuse: check size of FUSE_NOTIFY_INVAL_ENTRY message</title>
<updated>2011-08-24T08:20:17+00:00</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2011-08-24T08:20:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c2183d1e9b3f313dd8ba2b1b0197c8d9fb86a7ae'/>
<id>c2183d1e9b3f313dd8ba2b1b0197c8d9fb86a7ae</id>
<content type='text'>
FUSE_NOTIFY_INVAL_ENTRY didn't check the length of the write so the
message processing could overrun and result in a "kernel BUG at
fs/fuse/dev.c:629!"

Reported-by: Han-Wen Nienhuys &lt;hanwenn@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
CC: stable@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FUSE_NOTIFY_INVAL_ENTRY didn't check the length of the write so the
message processing could overrun and result in a "kernel BUG at
fs/fuse/dev.c:629!"

Reported-by: Han-Wen Nienhuys &lt;hanwenn@gmail.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
CC: stable@kernel.org
</pre>
</div>
</content>
</entry>
</feed>
