<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/nilfs2, branch linux-2.6.34.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.34.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.34.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-05-17T15:21:08Z</updated>
<entry>
<title>mm: prevent concurrent unmap_mapping_range() on the same inode</title>
<updated>2012-05-17T15:21:08Z</updated>
<author>
<name>Miklos Szeredi</name>
</author>
<published>2011-02-23T12:49:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6fb7c40b505e5a2fd57164a7d5bd7f9e2a6a5ede'/>
<id>urn:sha1:6fb7c40b505e5a2fd57164a7d5bd7f9e2a6a5ede</id>
<content type='text'>
commit 2aa15890f3c191326678f1bd68af61ec6b8753ec upstream.

Michael Leun reported that running parallel opens on a fuse filesystem
can trigger a "kernel BUG at mm/truncate.c:475"

Gurudas Pai reported the same bug on NFS.

The reason is, unmap_mapping_range() is not prepared for more than
one concurrent invocation per inode.  For example:

  thread1: going through a big range, stops in the middle of a vma and
     stores the restart address in vm_truncate_count.

  thread2: comes in with a small (e.g. single page) unmap request on
     the same vma, somewhere before restart_address, finds that the
     vma was already unmapped up to the restart address and happily
     returns without doing anything.

Another scenario would be two big unmap requests, both having to
restart the unmapping and each one setting vm_truncate_count to its
own value.  This could go on forever without any of them being able to
finish.

Truncate and hole punching already serialize with i_mutex.  Other
callers of unmap_mapping_range() do not, and it's difficult to get
i_mutex protection for all callers.  In particular -&gt;d_revalidate(),
which calls invalidate_inode_pages2_range() in fuse, may be called
with or without i_mutex.

This patch adds a new mutex to 'struct address_space' to prevent
running multiple concurrent unmap_mapping_range() on the same mapping.

[ We'll hopefully get rid of all this with the upcoming mm
  preemptibility series by Peter Zijlstra, the "mm: Remove i_mmap_mutex
  lockbreak" patch in particular.  But that is for 2.6.39 ]

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Reported-by: Michael Leun &lt;lkml20101129@newton.leun.net&gt;
Reported-by: Gurudas Pai &lt;gurudas.pai@oracle.com&gt;
Tested-by: Gurudas Pai &lt;gurudas.pai@oracle.com&gt;
Acked-by: Hugh Dickins &lt;hughd@google.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
[PG: Some chunks dropped, since no ebdfed4dc5 in 34; came in at 2.6.37]
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>nilfs2: fix data loss in mmap page write for hole blocks</title>
<updated>2012-03-14T14:56:56Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2011-03-27T13:50:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=58066c381153035a6707222e374a5438438f5a3b'/>
<id>urn:sha1:58066c381153035a6707222e374a5438438f5a3b</id>
<content type='text'>
commit 34094537943113467faee98fe67c8a3d3f9a0a8b upstream.

From the result of a function test of mmap, mmap write to shared pages
turned out to be broken for hole blocks.  It doesn't write out filled
blocks and the data will be lost after umount.  This is due to a bug
that the target file is not queued for log writer when filling hole
blocks.

Also, nilfs_page_mkwrite function exits normal code path even after
successfully filled hole blocks due to a change of block_page_mkwrite
function; just after nilfs was merged into the mainline,
block_page_mkwrite() started to return VM_FAULT_LOCKED instead of zero
by the patch "mm: close page_mkwrite races" (commit:
b827e496c893de0c).  The current nilfs_page_mkwrite() is not handling
this value properly.

This corrects nilfs_page_mkwrite() and will resolve the data loss
problem in mmap write.

[This should be applied to every kernel since 2.6.30 but a fix is
 needed for 2.6.37 and prior kernels]

[PG: add sb as 1st arg to nilfs_set_file_dirty() as per 34 codebase]

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Tested-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>nilfs2: fix list corruption after ifile creation failure</title>
<updated>2010-08-26T23:43:23Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2010-08-13T03:42:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=28d07211a380ec003784c454c6438c72e458c5ef'/>
<id>urn:sha1:28d07211a380ec003784c454c6438c72e458c5ef</id>
<content type='text'>
commit af4e36318edb848fcc0a8d5f75000ca00cdc7595 upstream.

If nilfs_attach_checkpoint() gets a memory allocation failure during
creation of ifile, it will return without removing nilfs_sb_info
struct from ns_supers list.  When a concurrently mounted snapshot is
unmounted or another new snapshot is mounted after that, this causes
kernel oops as below:

&gt; BUG: unable to handle kernel NULL pointer dereference at (null)
&gt; IP: [&lt;f83662ff&gt;] nilfs_find_sbinfo+0x74/0xa4 [nilfs2]
&gt; *pde = 00000000
&gt; Oops: 0000 [#1] SMP
&lt;snip&gt;
&gt; Call Trace:
&gt;  [&lt;f835dc29&gt;] ? nilfs_get_sb+0x165/0x532 [nilfs2]
&gt;  [&lt;c1173c87&gt;] ? ida_get_new_above+0x16d/0x187
&gt;  [&lt;c109a7f8&gt;] ? alloc_vfsmnt+0x7e/0x10a
&gt;  [&lt;c1070790&gt;] ? kstrdup+0x2c/0x40
&gt;  [&lt;c1089041&gt;] ? vfs_kern_mount+0x96/0x14e
&gt;  [&lt;c108913d&gt;] ? do_kern_mount+0x32/0xbd
&gt;  [&lt;c109b331&gt;] ? do_mount+0x642/0x6a1
&gt;  [&lt;c101a415&gt;] ? do_page_fault+0x0/0x2d1
&gt;  [&lt;c1099c00&gt;] ? copy_mount_options+0x80/0xe2
&gt;  [&lt;c10705d8&gt;] ? strndup_user+0x48/0x67
&gt;  [&lt;c109b3f1&gt;] ? sys_mount+0x61/0x90
&gt;  [&lt;c10027cc&gt;] ? sysenter_do_call+0x12/0x22

This fixes the problem.

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Tested-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>nilfs2: fix sync silent failure</title>
<updated>2010-05-03T14:36:01Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2010-05-03T12:00:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=973bec34bfc1bc2465646181653d67f767d418c8'/>
<id>urn:sha1:973bec34bfc1bc2465646181653d67f767d418c8</id>
<content type='text'>
As of 32a88aa1, __sync_filesystem() will return 0 if s_bdi is not set.
And nilfs does not set s_bdi anywhere.  I noticed this problem by the
warning introduced by the recent commit 5129a469 ("Catch filesystem
lacking s_bdi").

 WARNING: at fs/super.c:959 vfs_kern_mount+0xc5/0x14e()
 Hardware name: PowerEdge 2850
 Modules linked in: nilfs2 loop tpm_tis tpm tpm_bios video shpchp pci_hotplug output dcdbas
 Pid: 3773, comm: mount.nilfs2 Not tainted 2.6.34-rc6-debug #38
 Call Trace:
  [&lt;c1028422&gt;] warn_slowpath_common+0x60/0x90
  [&lt;c102845f&gt;] warn_slowpath_null+0xd/0x10
  [&lt;c1095936&gt;] vfs_kern_mount+0xc5/0x14e
  [&lt;c1095a03&gt;] do_kern_mount+0x32/0xbd
  [&lt;c10a811e&gt;] do_mount+0x671/0x6d0
  [&lt;c1073794&gt;] ? __get_free_pages+0x1f/0x21
  [&lt;c10a684f&gt;] ? copy_mount_options+0x2b/0xe2
  [&lt;c107b634&gt;] ? strndup_user+0x48/0x67
  [&lt;c10a81de&gt;] sys_mount+0x61/0x8f
  [&lt;c100280c&gt;] sysenter_do_call+0x12/0x32

This ensures to set s_bdi for nilfs and fixes the sync silent failure.

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Acked-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2</title>
<updated>2010-04-13T01:34:25Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2010-04-13T01:34:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=44fa2b4bee5b07d506a7b002b4e2eb73654db7e0'/>
<id>urn:sha1:44fa2b4bee5b07d506a7b002b4e2eb73654db7e0</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
  nilfs2: fix typo "numer" -&gt; "number" in alloc.c
  nilfs2: Remove an uninitialization warning in nilfs_btree_propagate_v()
  nilfs2: fix a wrong type conversion in nilfs_ioctl()
</content>
</entry>
<entry>
<title>nilfs2: fix typo "numer" -&gt; "number" in alloc.c</title>
<updated>2010-04-11T16:51:03Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2010-04-11T16:51:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be3bd2223b89d270853302ab0a5909fa875fd831'/>
<id>urn:sha1:be3bd2223b89d270853302ab0a5909fa875fd831</id>
<content type='text'>
Fixes the typo found in a warning message of a persistent object
allocator function.

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
</content>
</entry>
<entry>
<title>nilfs2: Remove an uninitialization warning in nilfs_btree_propagate_v()</title>
<updated>2010-04-02T11:03:30Z</updated>
<author>
<name>Li Hong</name>
</author>
<published>2010-04-02T10:40:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=308f44193f796b1c522b3b87760e43d8d8e316d2'/>
<id>urn:sha1:308f44193f796b1c522b3b87760e43d8d8e316d2</id>
<content type='text'>
`make CONFIG_NILFS2_FS=m M=fs/nilfs2/` will give the following warnings:

fs/nilfs2/btree.c: In function 'nilfs_btree_propagate':
fs/nilfs2/btree.c:1882: warning: 'maxlevel' may be used uninitialized in this function
fs/nilfs2/btree.c:1882: note: 'maxlevel' was declared here

Set maxlevel = 0 to fix it.

Signed-off-by: Li Hong &lt;lihong.hi@gmail.com&gt;
Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
</content>
</entry>
<entry>
<title>nilfs2: fix a wrong type conversion in nilfs_ioctl()</title>
<updated>2010-03-31T07:55:00Z</updated>
<author>
<name>Li Hong</name>
</author>
<published>2010-03-31T07:41:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=753234007f4ac2c96921cfb19ec1ba535ac29790'/>
<id>urn:sha1:753234007f4ac2c96921cfb19ec1ba535ac29790</id>
<content type='text'>
(void * __user *) should be (void __user *)

Signed-off-by: Li Hong &lt;lihong.hi@gmail.com&gt;
Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2010-03-24T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
<entry>
<title>nilfs2: fix imperfect completion wait in nilfs_wait_on_logs</title>
<updated>2010-03-23T16:17:20Z</updated>
<author>
<name>Ryusuke Konishi</name>
</author>
<published>2010-03-22T10:33:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d067633b4483f3c7d971d8f889f35340a8635bb5'/>
<id>urn:sha1:d067633b4483f3c7d971d8f889f35340a8635bb5</id>
<content type='text'>
nilfs_wait_on_logs has a potential to slip out before completion of
all bio requests when it met an error.  This synchronization fault may
cause unexpected results, for instance, violative access to freed
segment buffers from an end-bio callback routine.

This fixes the issue by ensuring that nilfs_wait_on_logs waits all
given logs.

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