<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/fs/ceph/file.c, branch linux-3.13.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>ceph: use fscache as a local presisent cache</title>
<updated>2013-09-06T16:50:11+00:00</updated>
<author>
<name>Milosz Tanski</name>
<email>milosz@adfin.com</email>
</author>
<published>2013-08-21T21:29:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=99ccbd229cf7453206bc858e795ec1f0345ff258'/>
<id>99ccbd229cf7453206bc858e795ec1f0345ff258</id>
<content type='text'>
Adding support for fscache to the Ceph filesystem. This would bring it to on
par with some of the other network filesystems in Linux (like NFS, AFS, etc...)

In order to mount the filesystem with fscache the 'fsc' mount option must be
passed.

Signed-off-by: Milosz Tanski &lt;milosz@adfin.com&gt;
Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adding support for fscache to the Ceph filesystem. This would bring it to on
par with some of the other network filesystems in Linux (like NFS, AFS, etc...)

In order to mount the filesystem with fscache the 'fsc' mount option must be
passed.

Signed-off-by: Milosz Tanski &lt;milosz@adfin.com&gt;
Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: allow sync_read/write return partial successed size of read/write.</title>
<updated>2013-08-27T19:28:46+00:00</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2013-08-21T07:02:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ee7289bfadda5f4ef60884547ebc9989c8fb314a'/>
<id>ee7289bfadda5f4ef60884547ebc9989c8fb314a</id>
<content type='text'>
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: fix bugs about handling short-read for sync read mode.</title>
<updated>2013-08-27T19:28:45+00:00</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2013-08-06T08:20:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=02ae66d8b229708fd94b764f6c17ead1c7741fcf'/>
<id>02ae66d8b229708fd94b764f6c17ead1c7741fcf</id>
<content type='text'>
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: fix fallocate division</title>
<updated>2013-08-27T19:26:29+00:00</updated>
<author>
<name>Sage Weil</name>
<email>sage@inktank.com</email>
</author>
<published>2013-08-27T19:15:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b314a90d8f3f1d16ec45744e5e2141ea6e14e034'/>
<id>b314a90d8f3f1d16ec45744e5e2141ea6e14e034</id>
<content type='text'>
We need to use do_div to divide by a 64-bit value.

Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
Reviewed-by: Josh Durgin &lt;josh.durgin@inktank.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to use do_div to divide by a 64-bit value.

Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
Reviewed-by: Josh Durgin &lt;josh.durgin@inktank.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: punch hole support</title>
<updated>2013-08-15T18:12:17+00:00</updated>
<author>
<name>Li Wang</name>
<email>liwang@ubuntukylin.com</email>
</author>
<published>2013-08-15T03:51:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ad7a60de882aca31afb58721db166f7e77afcd92'/>
<id>ad7a60de882aca31afb58721db166f7e77afcd92</id>
<content type='text'>
This patch implements fallocate and punch hole support for Ceph kernel client.

Signed-off-by: Li Wang &lt;liwang@ubuntukylin.com&gt;
Signed-off-by: Yunchuan Wen &lt;yunchuanwen@ubuntukylin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements fallocate and punch hole support for Ceph kernel client.

Signed-off-by: Li Wang &lt;liwang@ubuntukylin.com&gt;
Signed-off-by: Yunchuan Wen &lt;yunchuanwen@ubuntukylin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: introduce i_truncate_mutex</title>
<updated>2013-08-15T18:12:06+00:00</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2013-08-13T04:42:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b0d7c2231015b331b942746610a05b6ea72977ab'/>
<id>b0d7c2231015b331b942746610a05b6ea72977ab</id>
<content type='text'>
I encountered below deadlock when running fsstress

wmtruncate work      truncate                 MDS
---------------  ------------------  --------------------------
                   lock i_mutex
                                      &lt;- truncate file
lock i_mutex (blocked)
                                      &lt;- revoking Fcb (filelock to MIX)
                   send request -&gt;
                                         handle request (xlock filelock)

At the initial time, there are some dirty pages in the page cache.
When the kclient receives the truncate message, it reduces inode size
and creates some 'out of i_size' dirty pages. wmtruncate work can't
truncate these dirty pages because it's blocked by the i_mutex. Later
when the kclient receives the cap message that revokes Fcb caps, It
can't flush all dirty pages because writepages() only flushes dirty
pages within the inode size.

When the MDS handles the 'truncate' request from kclient, it waits
for the filelock to become stable. But the filelock is stuck in
unstable state because it can't finish revoking kclient's Fcb caps.

The truncate pagecache locking has already caused lots of trouble
for use. I think it's time simplify it by introducing a new mutex.
We use the new mutex to prevent concurrent truncate_inode_pages().
There is no need to worry about race between buffered write and
truncate_inode_pages(), because our "get caps" mechanism prevents
them from concurrent execution.

Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I encountered below deadlock when running fsstress

wmtruncate work      truncate                 MDS
---------------  ------------------  --------------------------
                   lock i_mutex
                                      &lt;- truncate file
lock i_mutex (blocked)
                                      &lt;- revoking Fcb (filelock to MIX)
                   send request -&gt;
                                         handle request (xlock filelock)

At the initial time, there are some dirty pages in the page cache.
When the kclient receives the truncate message, it reduces inode size
and creates some 'out of i_size' dirty pages. wmtruncate work can't
truncate these dirty pages because it's blocked by the i_mutex. Later
when the kclient receives the cap message that revokes Fcb caps, It
can't flush all dirty pages because writepages() only flushes dirty
pages within the inode size.

When the MDS handles the 'truncate' request from kclient, it waits
for the filelock to become stable. But the filelock is stuck in
unstable state because it can't finish revoking kclient's Fcb caps.

The truncate pagecache locking has already caused lots of trouble
for use. I think it's time simplify it by introducing a new mutex.
We use the new mutex to prevent concurrent truncate_inode_pages().
There is no need to worry about race between buffered write and
truncate_inode_pages(), because our "get caps" mechanism prevents
them from concurrent execution.

Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'linus/master' into testing</title>
<updated>2013-08-15T18:11:45+00:00</updated>
<author>
<name>Sage Weil</name>
<email>sage@inktank.com</email>
</author>
<published>2013-08-15T18:11:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ee3e542fec6e69bc9fb668698889a37d93950ddf'/>
<id>ee3e542fec6e69bc9fb668698889a37d93950ddf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: replace hold_mutex flag with goto</title>
<updated>2013-08-10T00:55:48+00:00</updated>
<author>
<name>Sage Weil</name>
<email>sage@inktank.com</email>
</author>
<published>2013-08-09T16:57:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2f75e9e17911524f294aa7b3bf0d7233f99a3218'/>
<id>2f75e9e17911524f294aa7b3bf0d7233f99a3218</id>
<content type='text'>
All of the early exit paths need to drop the mutex; it is only the normal
path through the function that does not.  Skip the unlock in that case
with a goto out_unlocked.

Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
Reviewed-by: Jianpeng Ma &lt;majianpeng@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All of the early exit paths need to drop the mutex; it is only the normal
path through the function that does not.  Skip the unlock in that case
with a goto out_unlocked.

Signed-off-by: Sage Weil &lt;sage@inktank.com&gt;
Reviewed-by: Jianpeng Ma &lt;majianpeng@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: Move the place for EOLDSNAPC handle in ceph_aio_write to easily understand</title>
<updated>2013-08-10T00:55:43+00:00</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2013-08-08T07:32:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0e5dd45ce4c41d3e3857116a77f34f04c99e78ad'/>
<id>0e5dd45ce4c41d3e3857116a77f34f04c99e78ad</id>
<content type='text'>
Only for ceph_sync_write, the osd can return EOLDSNAPC.so move the
related codes after the call ceph_sync_write.

Signed-off-by: Jianpeng Ma &lt;majianpeng@gmail.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only for ceph_sync_write, the osd can return EOLDSNAPC.so move the
related codes after the call ceph_sync_write.

Signed-off-by: Jianpeng Ma &lt;majianpeng@gmail.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: Don't use ceph-sync-mode for synchronous-fs.</title>
<updated>2013-08-10T00:55:18+00:00</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2013-06-27T07:56:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7ab9b3807097fcb87b0e85a9ad82b12322d9cc63'/>
<id>7ab9b3807097fcb87b0e85a9ad82b12322d9cc63</id>
<content type='text'>
Sending reads and writes through the sync read/write paths bypasses the
page cache, which is not expected or generally a good idea.  Removing
the write check is safe as there is a conditional vfs_fsync_range() later
in ceph_aio_write that already checks for the same flag (via
IS_SYNC(inode)).

Signed-off-by: Jianpeng Ma &lt;majianpeng@gmail.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sending reads and writes through the sync read/write paths bypasses the
page cache, which is not expected or generally a good idea.  Removing
the write check is safe as there is a conditional vfs_fsync_range() later
in ceph_aio_write that already checks for the same flag (via
IS_SYNC(inode)).

Signed-off-by: Jianpeng Ma &lt;majianpeng@gmail.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
