<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/nilfs2/super.c, branch linux-3.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-08-15T15:10:05Z</updated>
<entry>
<title>nilfs2: fix deadlock issue between chcp and thaw ioctls</title>
<updated>2012-08-15T15:10:05Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2012-07-30T21:42:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d7c61cba59ebdb18ebe357b7952f61e4100c2d92'/>
<id>urn:sha1:d7c61cba59ebdb18ebe357b7952f61e4100c2d92</id>
<content type='text'>
commit 572d8b3945a31bee7c40d21556803e4807fd9141 upstream.

An fs-thaw ioctl causes deadlock with a chcp or mkcp -s command:

 chcp            D ffff88013870f3d0     0  1325   1324 0x00000004
 ...
 Call Trace:
   nilfs_transaction_begin+0x11c/0x1a0 [nilfs2]
   wake_up_bit+0x20/0x20
   copy_from_user+0x18/0x30 [nilfs2]
   nilfs_ioctl_change_cpmode+0x7d/0xcf [nilfs2]
   nilfs_ioctl+0x252/0x61a [nilfs2]
   do_page_fault+0x311/0x34c
   get_unmapped_area+0x132/0x14e
   do_vfs_ioctl+0x44b/0x490
   __set_task_blocked+0x5a/0x61
   vm_mmap_pgoff+0x76/0x87
   __set_current_blocked+0x30/0x4a
   sys_ioctl+0x4b/0x6f
   system_call_fastpath+0x16/0x1b
 thaw            D ffff88013870d890     0  1352   1351 0x00000004
 ...
 Call Trace:
   rwsem_down_failed_common+0xdb/0x10f
   call_rwsem_down_write_failed+0x13/0x20
   down_write+0x25/0x27
   thaw_super+0x13/0x9e
   do_vfs_ioctl+0x1f5/0x490
   vm_mmap_pgoff+0x76/0x87
   sys_ioctl+0x4b/0x6f
   filp_close+0x64/0x6c
   system_call_fastpath+0x16/0x1b

where the thaw ioctl deadlocked at thaw_super() when called while chcp was
waiting at nilfs_transaction_begin() called from
nilfs_ioctl_change_cpmode().  This deadlock is 100% reproducible.

This is because nilfs_ioctl_change_cpmode() first locks sb-&gt;s_umount in
read mode and then waits for unfreezing in nilfs_transaction_begin(),
whereas thaw_super() locks sb-&gt;s_umount in write mode.  The locking of
sb-&gt;s_umount here was intended to make snapshot mounts and the downgrade
of snapshots to checkpoints exclusive.

This fixes the deadlock issue by replacing the sb-&gt;s_umount usage in
nilfs_ioctl_change_cpmode() with a dedicated mutex which protects snapshot
mounts.

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Cc: Fernando Luis Vazquez Cao &lt;fernando@oss.ntt.co.jp&gt;
Tested-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>switch open-coded instances of d_make_root() to new helper</title>
<updated>2012-03-21T01:29:35Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2012-01-09T03:15:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=48fde701aff662559b38d9a609574068f22d00fe'/>
<id>urn:sha1:48fde701aff662559b38d9a609574068f22d00fe</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>vfs: check i_nlink limits in vfs_{mkdir,rename_dir,link}</title>
<updated>2012-03-21T01:29:32Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2012-02-06T17:45:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8de52778798fe39660a8d6b26f290e0c93202761'/>
<id>urn:sha1:8de52778798fe39660a8d6b26f290e0c93202761</id>
<content type='text'>
New field of struct super_block - -&gt;s_max_links.  Maximal allowed
value of -&gt;i_nlink or 0; in the latter case all checks still need
to be done in -&gt;link/-&gt;mkdir/-&gt;rename instances.  Note that this
limit applies both to directoris and to non-directories.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>vfs: switch -&gt;show_options() to struct dentry *</title>
<updated>2012-01-07T04:19:54Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2011-12-09T02:32:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=34c80b1d93e6e20ca9dea0baf583a5b5510d92d4'/>
<id>urn:sha1:34c80b1d93e6e20ca9dea0baf583a5b5510d92d4</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>vfs: fix the stupidity with i_dentry in inode destructors</title>
<updated>2012-01-04T03:52:40Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2011-12-12T20:51:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6b520e0565422966cdf1c3759bd73df77b0f248c'/>
<id>urn:sha1:6b520e0565422966cdf1c3759bd73df77b0f248c</id>
<content type='text'>
Seeing that just about every destructor got that INIT_LIST_HEAD() copied into
it, there is no point whatsoever keeping this INIT_LIST_HEAD in inode_init_once();
the cost of taking it into inode_init_always() will be negligible for pipes
and sockets and negative for everything else.  Not to mention the removal of
boilerplate code from -&gt;destroy_inode() instances...

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>nilfs2: always set back pointer to host inode in mapping-&gt;host</title>
<updated>2011-05-10T13:21:57Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2011-05-05T03:56:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aa405b1f4238401616e7d98620170b424b2dbefc'/>
<id>urn:sha1:aa405b1f4238401616e7d98620170b424b2dbefc</id>
<content type='text'>
In the current nilfs, page cache for btree nodes and meta data files
do not set a valid back pointer to the host inode in mapping-&gt;host.

This will change it so that every address space in nilfs uses
mapping-&gt;host to hold its host inode.

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
</content>
</entry>
<entry>
<title>nilfs2: implement resize ioctl</title>
<updated>2011-05-10T13:21:46Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2011-05-04T16:23:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4e33f9eab07e985282fece4121066c2db1d332ed'/>
<id>urn:sha1:4e33f9eab07e985282fece4121066c2db1d332ed</id>
<content type='text'>
This adds resize ioctl which makes online resize possible.

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
</content>
</entry>
<entry>
<title>nilfs2: add routine to move secondary super block</title>
<updated>2011-05-10T13:21:45Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2011-05-04T16:23:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cfb0a4bfd8736418cbe5cbc115cabc84b527111e'/>
<id>urn:sha1:cfb0a4bfd8736418cbe5cbc115cabc84b527111e</id>
<content type='text'>
After resizing the filesystem, the secondary super block must be moved
to a new location.  This adds a helper function for this.

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
</content>
</entry>
<entry>
<title>nilfs2: get rid of nilfs_sb_info structure</title>
<updated>2011-03-09T02:54:26Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2011-03-09T02:05:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e3154e9748f0f337e9f6ff9dc7d7bf24d426bd1a'/>
<id>urn:sha1:e3154e9748f0f337e9f6ff9dc7d7bf24d426bd1a</id>
<content type='text'>
This directly uses sb-&gt;s_fs_info to keep a nilfs filesystem object and
fully removes the intermediate nilfs_sb_info structure.  With this
change, the hierarchy of on-memory structures of nilfs will be
simplified as follows:

Before:
  super_block
       -&gt; nilfs_sb_info
             -&gt; the_nilfs
                   -&gt; cptree --+-&gt; nilfs_root (current file system)
                               +-&gt; nilfs_root (snapshot A)
                               +-&gt; nilfs_root (snapshot B)
                               :
             -&gt; nilfs_sc_info (log writer structure)
After:
  super_block
       -&gt; the_nilfs
             -&gt; cptree --+-&gt; nilfs_root (current file system)
                         +-&gt; nilfs_root (snapshot A)
                         +-&gt; nilfs_root (snapshot B)
                         :
             -&gt; nilfs_sc_info (log writer structure)

The reason why we didn't design so from the beginning is because the
initial shape also differed from the above.  The early hierachy was
composed of "per-mount-point" super_block -&gt; nilfs_sb_info pairs and a
shared nilfs object.  On the kernel 2.6.37, it was changed to the
current shape in order to unify super block instances into one per
device, and this cleanup became applicable as the result.

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
</content>
</entry>
<entry>
<title>nilfs2: use sb instance instead of nilfs_sb_info struct</title>
<updated>2011-03-09T02:05:08Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2011-03-09T02:05:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f7545144c2e3d280139260df934043e0a6ccce6f'/>
<id>urn:sha1:f7545144c2e3d280139260df934043e0a6ccce6f</id>
<content type='text'>
This replaces sbi uses with direct reference to sb instance.

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
</content>
</entry>
</feed>
