<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/nilfs2/cpfile.c, branch linux-3.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-07-31T00:25:19Z</updated>
<entry>
<title>nilfs2: fix timing issue between rmcp and chcp ioctls</title>
<updated>2012-07-31T00:25:19Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2012-07-30T21:42:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fe0627e7b3d32a41c16fac6e0af091991545865e'/>
<id>urn:sha1:fe0627e7b3d32a41c16fac6e0af091991545865e</id>
<content type='text'>
The checkpoint deletion ioctl (rmcp ioctl) has potential for breaking
snapshot because it is not fully exclusive with checkpoint mode change
ioctl (chcp ioctl).

The rmcp ioctl first tests if the specified checkpoint is a snapshot or
not within nilfs_cpfile_delete_checkpoint function, and then calls
nilfs_cpfile_delete_checkpoints function to actually invalidate the
checkpoint only if it's not a snapshot.  However, the checkpoint can be
changed into a snapshot by the chcp ioctl between these two operations.
In that case, calling nilfs_cpfile_delete_checkpoints() wrongly
invalidates the snapshot, which leads to snapshot list corruption and
snapshot count mismatch.

This fixes the issue by changing nilfs_cpfile_delete_checkpoints() so
that it reconfirms the target checkpoints are snapshot or not.

This second check is exclusive with the chcp operation since it is
protected by an existing semaphore.

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;
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>nilfs2: remove the second argument of k[un]map_atomic()</title>
<updated>2012-03-20T13:48:24Z</updated>
<author>
<name>Cong Wang</name>
</author>
<published>2011-11-25T15:14:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7b9c0976ac5e549feb1d4731bc76b9acf9ac47a8'/>
<id>urn:sha1:7b9c0976ac5e549feb1d4731bc76b9acf9ac47a8</id>
<content type='text'>
Acked-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
</content>
</entry>
<entry>
<title>nilfs2: use mark_buffer_dirty to mark btnode or meta data dirty</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=5fc7b14177b1a1c2f2511aed62a4ca870d0332e7'/>
<id>urn:sha1:5fc7b14177b1a1c2f2511aed62a4ca870d0332e7</id>
<content type='text'>
This replaces nilfs_mdt_mark_buffer_dirty and nilfs_btnode_mark_dirty
macros with mark_buffer_dirty and gets rid of nilfs_mark_buffer_dirty,
an own mark buffer dirty function.

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
</content>
</entry>
<entry>
<title>nilfs2: see state of root dentry for mount check of snapshots</title>
<updated>2010-10-23T00:24:38Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2010-09-13T02:16:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=032dbb3b503a30fce732ec4c05525d0abed1f1d6'/>
<id>urn:sha1:032dbb3b503a30fce732ec4c05525d0abed1f1d6</id>
<content type='text'>
After applied the patch that unified sb instances, root dentry of
snapshots can be left in dcache even after their trees are unmounted.

The orphan root dentry/inode keeps a root object, and this causes
false positive of nilfs_checkpoint_is_mounted function.

This resolves the issue by having nilfs_checkpoint_is_mounted test
whether the root dentry is busy or not.

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
</content>
</entry>
<entry>
<title>nilfs2: use iget for all metadata files</title>
<updated>2010-10-23T00:24:38Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2010-09-05T03:20:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f1e89c86fdd0f5e59f6768146c86437934202033'/>
<id>urn:sha1:f1e89c86fdd0f5e59f6768146c86437934202033</id>
<content type='text'>
This makes use of iget5_locked to allocate or get inode for metadata
files to stop using own inode allocator.

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
</content>
</entry>
<entry>
<title>nilfs2: trivial coding style fix</title>
<updated>2009-12-25T04:01:50Z</updated>
<author>
<name>Jiro SEKIBA</name>
</author>
<published>2009-12-06T06:43:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5ee581483246e832ca5a9fc1ac669bba0b6ec468'/>
<id>urn:sha1:5ee581483246e832ca5a9fc1ac669bba0b6ec468</id>
<content type='text'>
This is a trivial style fix patch to mend errors/warnings
reported by "checkpatch.pl --file".

Signed-off-by: Jiro SEKIBA &lt;jir@unicus.jp&gt;
Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
</content>
</entry>
<entry>
<title>nilfs2: separate read method of meta data files on super root block</title>
<updated>2009-11-20T01:05:48Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2009-11-12T16:36:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8707df38478c8e0958b706f0ea1cdf99d00a9469'/>
<id>urn:sha1:8707df38478c8e0958b706f0ea1cdf99d00a9469</id>
<content type='text'>
Will displace nilfs_mdt_read_inode_direct function with an individual
read method: nilfs_dat_read, nilfs_sufile_read, nilfs_cpfile_read.

This provides the opportunity to initialize local variables of each
metadata file after reading the inode.

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
</content>
</entry>
<entry>
<title>nilfs2: separate constructor of metadata files</title>
<updated>2009-11-20T01:05:48Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2009-11-12T14:56:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=79739565e15f2adbc482207a0800fc127c84d1a0'/>
<id>urn:sha1:79739565e15f2adbc482207a0800fc127c84d1a0</id>
<content type='text'>
This will displace nilfs_mdt_new() constructor with individual
metadata file constructors like nilfs_dat_new(), new_sufile_new(),
nilfs_cpfile_new(), and nilfs_ifile_new().

This makes it possible for each metadata file to have own
intialization code.

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
</content>
</entry>
<entry>
<title>nilfs2: fix lock order reversal in chcp operation</title>
<updated>2009-11-13T01:33:24Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2009-11-11T15:13:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c1ea985c710f41e97f1c72c29bbf367375370f0b'/>
<id>urn:sha1:c1ea985c710f41e97f1c72c29bbf367375370f0b</id>
<content type='text'>
Will fix the following lock order reversal lockdep detected:

=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.32-rc6 #7
-------------------------------------------------------
chcp/30157 is trying to acquire lock:
 (&amp;nilfs-&gt;ns_mount_mutex){+.+.+.}, at: [&lt;fed7cfcc&gt;] nilfs_cpfile_change_cpmode+0x46/0x752 [nilfs2]

but task is already holding lock:
 (&amp;nilfs-&gt;ns_segctor_sem){++++.+}, at: [&lt;fed7ca32&gt;] nilfs_transaction_begin+0xba/0x110 [nilfs2]

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #2 (&amp;nilfs-&gt;ns_segctor_sem){++++.+}:
       [&lt;c105799c&gt;] __lock_acquire+0x109c/0x139d
       [&lt;c1057d26&gt;] lock_acquire+0x89/0xa0
       [&lt;c14151e2&gt;] down_read+0x31/0x45
       [&lt;fed6d77b&gt;] nilfs_attach_checkpoint+0x8f/0x16b [nilfs2]
       [&lt;fed6e393&gt;] nilfs_get_sb+0x3e7/0x653 [nilfs2]
       [&lt;c10c0ccb&gt;] vfs_kern_mount+0x8b/0x124
       [&lt;c10c0db2&gt;] do_kern_mount+0x37/0xc3
       [&lt;c10d7517&gt;] do_mount+0x64d/0x69d
       [&lt;c10d75cd&gt;] sys_mount+0x66/0x95
       [&lt;c1002a14&gt;] sysenter_do_call+0x12/0x32

-&gt; #1 (&amp;type-&gt;s_umount_key#31/1){+.+.+.}:
       [&lt;c105799c&gt;] __lock_acquire+0x109c/0x139d
       [&lt;c1057d26&gt;] lock_acquire+0x89/0xa0
       [&lt;c104c0f3&gt;] down_write_nested+0x34/0x52
       [&lt;c10c08fe&gt;] sget+0x22e/0x389
       [&lt;fed6e133&gt;] nilfs_get_sb+0x187/0x653 [nilfs2]
       [&lt;c10c0ccb&gt;] vfs_kern_mount+0x8b/0x124
       [&lt;c10c0db2&gt;] do_kern_mount+0x37/0xc3
       [&lt;c10d7517&gt;] do_mount+0x64d/0x69d
       [&lt;c10d75cd&gt;] sys_mount+0x66/0x95
       [&lt;c1002a14&gt;] sysenter_do_call+0x12/0x32

-&gt; #0 (&amp;nilfs-&gt;ns_mount_mutex){+.+.+.}:
       [&lt;c1057727&gt;] __lock_acquire+0xe27/0x139d
       [&lt;c1057d26&gt;] lock_acquire+0x89/0xa0
       [&lt;c1414d63&gt;] mutex_lock_nested+0x41/0x23e
       [&lt;fed7cfcc&gt;] nilfs_cpfile_change_cpmode+0x46/0x752 [nilfs2]
       [&lt;fed801b2&gt;] nilfs_ioctl+0x11a/0x7da [nilfs2]
       [&lt;c10cca12&gt;] vfs_ioctl+0x27/0x6e
       [&lt;c10ccf93&gt;] do_vfs_ioctl+0x491/0x4db
       [&lt;c10cd022&gt;] sys_ioctl+0x45/0x5f
       [&lt;c1002a14&gt;] sysenter_do_call+0x12/0x32

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
</content>
</entry>
<entry>
<title>nilfs2: add more check routines in mount process</title>
<updated>2009-09-14T09:27:14Z</updated>
<author>
<name>Zhu Yanhai</name>
</author>
<published>2009-08-12T06:17:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=43be0ec0387a5ccce2e064cb78502e7b2b4dd590'/>
<id>urn:sha1:43be0ec0387a5ccce2e064cb78502e7b2b4dd590</id>
<content type='text'>
nilfs2: Add more safeguard routines and protections in mount process,
which also makes nilfs2 report consistency error messages when
checkpoint number is invalid.

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