<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs, branch v3.10.28</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs?h=v3.10.28</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs?h=v3.10.28'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-01-25T16:27:12Z</updated>
<entry>
<title>nilfs2: fix segctor bug that causes file system corruption</title>
<updated>2014-01-25T16:27:12Z</updated>
<author>
<name>Andreas Rohner</name>
<email>andreas.rohner@gmx.net</email>
</author>
<published>2014-01-15T01:56:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4cb1e59ffcbee368f32c37ca5872fd73163c7783'/>
<id>urn:sha1:4cb1e59ffcbee368f32c37ca5872fd73163c7783</id>
<content type='text'>
commit 70f2fe3a26248724d8a5019681a869abdaf3e89a upstream.

There is a bug in the function nilfs_segctor_collect, which results in
active data being written to a segment, that is marked as clean.  It is
possible, that this segment is selected for a later segment
construction, whereby the old data is overwritten.

The problem shows itself with the following kernel log message:

  nilfs_sufile_do_cancel_free: segment 6533 must be clean

Usually a few hours later the file system gets corrupted:

  NILFS: bad btree node (blocknr=8748107): level = 0, flags = 0x0, nchildren = 0
  NILFS error (device sdc1): nilfs_bmap_last_key: broken bmap (inode number=114660)

The issue can be reproduced with a file system that is nearly full and
with the cleaner running, while some IO intensive task is running.
Although it is quite hard to reproduce.

This is what happens:

 1. The cleaner starts the segment construction
 2. nilfs_segctor_collect is called
 3. sc_stage is on NILFS_ST_SUFILE and segments are freed
 4. sc_stage is on NILFS_ST_DAT current segment is full
 5. nilfs_segctor_extend_segments is called, which
    allocates a new segment
 6. The new segment is one of the segments freed in step 3
 7. nilfs_sufile_cancel_freev is called and produces an error message
 8. Loop around and the collection starts again
 9. sc_stage is on NILFS_ST_SUFILE and segments are freed
    including the newly allocated segment, which will contain active
    data and can be allocated at a later time
10. A few hours later another segment construction allocates the
    segment and causes file system corruption

This can be prevented by simply reordering the statements.  If
nilfs_sufile_cancel_freev is called before nilfs_segctor_extend_segments
the freed segments are marked as dirty and cannot be allocated any more.

Signed-off-by: Andreas Rohner &lt;andreas.rohner@gmx.net&gt;
Reviewed-by: Ryusuke Konishi &lt;konishi.ryusuke@lab.ntt.co.jp&gt;
Tested-by: Andreas Rohner &lt;andreas.rohner@gmx.net&gt;
Signed-off-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>writeback: Fix data corruption on NFS</title>
<updated>2014-01-25T16:27:11Z</updated>
<author>
<name>Jan Kara</name>
<email>jack@suse.cz</email>
</author>
<published>2013-12-13T20:21:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cc46cb337cf614b652b0068e6e388102bf8a9b54'/>
<id>urn:sha1:cc46cb337cf614b652b0068e6e388102bf8a9b54</id>
<content type='text'>
commit f9b0e058cbd04ada76b13afffa7e1df830543c24 upstream.

Commit 4f8ad655dbc8 "writeback: Refactor writeback_single_inode()" added
a condition to skip clean inode. However this is wrong in WB_SYNC_ALL
mode because there we also want to wait for outstanding writeback on
possibly clean inode. This was causing occasional data corruption issues
on NFS because it uses sync_inode() to make sure all outstanding writes
are flushed to the server before truncating the inode and with
sync_inode() returning prematurely file was sometimes extended back
by an outstanding write after it was truncated.

So modify the test to also check for pages under writeback in
WB_SYNC_ALL mode.

Fixes: 4f8ad655dbc82cf05d2edc11e66b78a42d38bf93
Reported-and-tested-by: Dan Duval &lt;dan.duval@oracle.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>vfs: In d_path don't call d_dname on a mount point</title>
<updated>2014-01-25T16:27:11Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2013-11-09T00:31:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3717eee3c4d1d44ded3bd84bf5f6437ec2aa5496'/>
<id>urn:sha1:3717eee3c4d1d44ded3bd84bf5f6437ec2aa5496</id>
<content type='text'>
commit f48cfddc6729ef133933062320039808bafa6f45 upstream.

Aditya Kali (adityakali@google.com) wrote:
&gt; Commit bf056bfa80596a5d14b26b17276a56a0dcb080e5:
&gt; "proc: Fix the namespace inode permission checks." converted
&gt; the namespace files into symlinks. The same commit changed
&gt; the way namespace bind mounts appear in /proc/mounts:
&gt;   $ mount --bind /proc/self/ns/ipc /mnt/ipc
&gt; Originally:
&gt;   $ cat /proc/mounts | grep ipc
&gt;   proc /mnt/ipc proc rw,nosuid,nodev,noexec 0 0
&gt;
&gt; After commit bf056bfa80596a5d14b26b17276a56a0dcb080e5:
&gt;   $ cat /proc/mounts | grep ipc
&gt;   proc ipc:[4026531839] proc rw,nosuid,nodev,noexec 0 0
&gt;
&gt; This breaks userspace which expects the 2nd field in
&gt; /proc/mounts to be a valid path.

The symlink /proc/&lt;pid&gt;/ns/{ipc,mnt,net,pid,user,uts} point to
dentries allocated with d_alloc_pseudo that we can mount, and
that have interesting names printed out with d_dname.

When these files are bind mounted /proc/mounts is not currently
displaying the mount point correctly because d_dname is called instead
of just displaying the path where the file is mounted.

Solve this by adding an explicit check to distinguish mounted pseudo
inodes and unmounted pseudo inodes.  Unmounted pseudo inodes always
use mount of their filesstem as the mnt_root  in their path making
these two cases easy to distinguish.

Acked-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Reported-by: Aditya Kali &lt;adityakali@google.com&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>GFS2: Increase i_writecount during gfs2_setattr_chown</title>
<updated>2014-01-25T16:27:11Z</updated>
<author>
<name>Bob Peterson</name>
<email>rpeterso@redhat.com</email>
</author>
<published>2014-01-06T22:16:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=350f737ed039d2b36329ddcbcdf78e12c6d8c758'/>
<id>urn:sha1:350f737ed039d2b36329ddcbcdf78e12c6d8c758</id>
<content type='text'>
commit 62e96cf81988101fe9e086b2877307b6adda5197 upstream.

This patch calls get_write_access in function gfs2_setattr_chown,
which merely increases inode-&gt;i_writecount for the duration of the
function. That will ensure that any file closes won't delete the
inode's multi-block reservation while the function is running.
It also ensures that a multi-block reservation exists when needed
for quota change operations during the chown.

Signed-off-by: Bob Peterson &lt;rpeterso@redhat.com&gt;
Signed-off-by: Steven Whitehouse &lt;swhiteho@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ext4: fix bigalloc regression</title>
<updated>2014-01-09T20:24:27Z</updated>
<author>
<name>Eric Whitney</name>
<email>enwlinux@gmail.com</email>
</author>
<published>2014-01-06T19:00:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=70139b6643db61809db76dd642af87979421d41d'/>
<id>urn:sha1:70139b6643db61809db76dd642af87979421d41d</id>
<content type='text'>
commit d0abafac8c9162f39c4f6b2f8141b772a09b3770 upstream.

Commit f5a44db5d2 introduced a regression on filesystems created with
the bigalloc feature (cluster size &gt; blocksize).  It causes xfstests
generic/006 and /013 to fail with an unexpected JBD2 failure and
transaction abort that leaves the test file system in a read only state.
Other xfstests run on bigalloc file systems are likely to fail as well.

The cause is the accidental use of a cluster mask where a cluster
offset was needed in ext4_ext_map_blocks().

Signed-off-by: Eric Whitney &lt;enwlinux@gmail.com&gt;
Cc: Theodore Ts'o &lt;tytso@mit.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ceph: allow sync_read/write return partial successed size of read/write.</title>
<updated>2014-01-09T20:24:25Z</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2013-08-21T07:02:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=30379f4553bae684a928c6bdd9dc606fd0ef6093'/>
<id>urn:sha1:30379f4553bae684a928c6bdd9dc606fd0ef6093</id>
<content type='text'>
commit ee7289bfadda5f4ef60884547ebc9989c8fb314a upstream.

For sync_read/write, it may do multi stripe operations.If one of those
met erro, we return the former successed size rather than a error value.
There is a exception for write-operation met -EOLDSNAPC.If this occur,we
retry the whole write again.

Signed-off-by: Jianpeng Ma &lt;majianpeng@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ceph: fix bugs about handling short-read for sync read mode.</title>
<updated>2014-01-09T20:24:25Z</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2013-08-06T08:20:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=533bc2950e085ee99225655f60276760c00af31f'/>
<id>urn:sha1:533bc2950e085ee99225655f60276760c00af31f</id>
<content type='text'>
commit 02ae66d8b229708fd94b764f6c17ead1c7741fcf upstream.

cephfs . show_layout
&gt;layyout.data_pool:     0
&gt;layout.object_size:   4194304
&gt;layout.stripe_unit:   4194304
&gt;layout.stripe_count:  1

TestA:
&gt;dd if=/dev/urandom of=test bs=1M count=2 oflag=direct
&gt;dd if=/dev/urandom of=test bs=1M count=2 seek=4  oflag=direct
&gt;dd if=test of=/dev/null bs=6M count=1 iflag=direct
The messages from func striped_read are:
ceph:           file.c:350  : striped_read 0~6291456 (read 0) got 2097152 HITSTRIPE SHORT
ceph:           file.c:350  : striped_read 2097152~4194304 (read 2097152) got 0 HITSTRIPE SHORT
ceph:           file.c:381  : zero tail 4194304
ceph:           file.c:390  : striped_read returns 6291456
The hole of file is from 2M--4M.But actualy it zero the last 4M include
the last 2M area which isn't a hole.
Using this patch, the messages are:
ceph:           file.c:350  : striped_read 0~6291456 (read 0) got 2097152 HITSTRIPE SHORT
ceph:           file.c:358  :  zero gap 2097152 to 4194304
ceph:           file.c:350  : striped_read 4194304~2097152 (read 4194304) got 2097152
ceph:           file.c:384  : striped_read returns 6291456

TestB:
&gt;echo majianpeng &gt; test
&gt;dd if=test of=/dev/null bs=2M count=1 iflag=direct
The messages are:
ceph:           file.c:350  : striped_read 0~6291456 (read 0) got 11 HITSTRIPE SHORT
ceph:           file.c:350  : striped_read 11~6291445 (read 11) got 0 HITSTRIPE SHORT
ceph:           file.c:390  : striped_read returns 11
For this case,it did once more striped_read.It's no meaningless.
Using this patch, the message are:
ceph:           file.c:350  : striped_read 0~6291456 (read 0) got 11 HITSTRIPE SHORT
ceph:           file.c:384  : striped_read returns 11

Big thanks to Yan Zheng for the patch.

Reviewed-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Signed-off-by: Jianpeng Ma &lt;majianpeng@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ceph: Add check returned value on func ceph_calc_ceph_pg.</title>
<updated>2014-01-09T20:24:25Z</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2013-08-02T10:14:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=01bb1b04a1dd3736d20b859a9bcf3d7509566c1f'/>
<id>urn:sha1:01bb1b04a1dd3736d20b859a9bcf3d7509566c1f</id>
<content type='text'>
commit 2fbcbff1d6b9243ef71c64a8ab993bc3c7bb7af1 upstream.

Func ceph_calc_ceph_pg maybe failed.So add check for returned value.

Signed-off-by: Jianpeng Ma &lt;majianpeng@gmail.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ceph: cleanup types in striped_read()</title>
<updated>2014-01-09T20:24:25Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2013-07-23T13:48:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=10debbda102fe52eb75ba531b8ee79e98d3b8774'/>
<id>urn:sha1:10debbda102fe52eb75ba531b8ee79e98d3b8774</id>
<content type='text'>
commit 688bac461ba3e9d221a879ab40b687f5d7b5b19c upstream.

We pass in a u64 value for "len" and then immediately truncate away the
upper 32 bits.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Reviewed-by: Alex Elder &lt;alex.elder@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ceph: fix null pointer dereference</title>
<updated>2014-01-09T20:24:25Z</updated>
<author>
<name>Nathaniel Yazdani</name>
<email>n1ght.4nd.d4y@gmail.com</email>
</author>
<published>2013-08-05T04:04:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=acb2e930c72a1d38504d6d9c1f338562bbb9aa55'/>
<id>urn:sha1:acb2e930c72a1d38504d6d9c1f338562bbb9aa55</id>
<content type='text'>
commit c338c07c51e3106711fad5eb599e375eadb6855d upstream.

When register_session() is given an out-of-range argument for mds,
ceph_mdsmap_get_addr() will return a null pointer, which would be given to
ceph_con_open() &amp; be dereferenced, causing a kernel oops. This fixes bug #4685
in the Ceph bug tracker &lt;http://tracker.ceph.com/issues/4685&gt;.

Signed-off-by: Nathaniel Yazdani &lt;n1ght.4nd.d4y@gmail.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
