<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/ceph/caps.c, branch linux-3.13.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.13.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.13.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2013-11-23T19:01:02Z</updated>
<entry>
<title>ceph: handle race between cap reconnect and cap release</title>
<updated>2013-11-23T19:01:02Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2013-09-22T03:08:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99a9c273b94a087f8feaec6c5ffbe3205a2dbe51'/>
<id>urn:sha1:99a9c273b94a087f8feaec6c5ffbe3205a2dbe51</id>
<content type='text'>
When a cap get released while composing the cap reconnect message.
We should skip queuing the release message if the cap hasn't been
added to the cap reconnect message.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
</entry>
<entry>
<title>ceph: queue cap release in __ceph_remove_cap()</title>
<updated>2013-11-23T19:00:59Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2013-09-22T02:15:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a096b09aeec6ff99edfdfd8cee24d6f25377d585'/>
<id>urn:sha1:a096b09aeec6ff99edfdfd8cee24d6f25377d585</id>
<content type='text'>
call __queue_cap_release() in __ceph_remove_cap(), this avoids
acquiring s_cap_lock twice.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
</entry>
<entry>
<title>ceph: use d_invalidate() to invalidate aliases</title>
<updated>2013-09-06T19:55:29Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2013-09-02T07:19:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a8d436f015b627a55ec3b1d15f13d6ab92dd892b'/>
<id>urn:sha1:a8d436f015b627a55ec3b1d15f13d6ab92dd892b</id>
<content type='text'>
d_invalidate() is the standard VFS method to invalidate dentry.
compare to d_delete(), it also try shrinking children dentries.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
</entry>
<entry>
<title>ceph: use fscache as a local presisent cache</title>
<updated>2013-09-06T16:50:11Z</updated>
<author>
<name>Milosz Tanski</name>
</author>
<published>2013-08-21T21:29:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99ccbd229cf7453206bc858e795ec1f0345ff258'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>ceph: remove useless variable revoked_rdcache</title>
<updated>2013-08-27T19:28:44Z</updated>
<author>
<name>Li Wang</name>
</author>
<published>2013-08-16T05:00:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e90757432361bb8b3ad3c3fd866324ed47875693'/>
<id>urn:sha1:e90757432361bb8b3ad3c3fd866324ed47875693</id>
<content type='text'>
Cleanup in handle_cap_grant().

Signed-off-by: Li Wang &lt;liwang@ubuntukylin.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
</entry>
<entry>
<title>ceph: fix request max size</title>
<updated>2013-08-15T18:12:11Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2013-08-05T06:10:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3871cbb9a41b1371dc13fc619e3ab4e0a1e29b4a'/>
<id>urn:sha1:3871cbb9a41b1371dc13fc619e3ab4e0a1e29b4a</id>
<content type='text'>
ceph_check_caps() requests new max size only when there is Fw cap.
If we call check_max_size() while there is no Fw cap. It updates
i_wanted_max_size and calls ceph_check_caps(), but ceph_check_caps()
does nothing. Later when Fw cap is issued, we call check_max_size()
again. But i_wanted_max_size is equal to 'endoff' at this time, so
check_max_size() doesn't call ceph_check_caps() and we end up with
waiting for the new max size forever.

The fix is duplicate ceph_check_caps()'s "request max size" code in
check_max_size(), and make try_get_cap_refs() wait for the Fw cap
before retry requesting new max size.

This patch also removes the "endoff &gt; (inode-&gt;i_size &lt;&lt; 1)" check
in check_max_size(). It's useless because there is no corresponding
logic in ceph_check_caps().

Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
</content>
</entry>
<entry>
<title>ceph: introduce i_truncate_mutex</title>
<updated>2013-08-15T18:12:06Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2013-08-13T04:42:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b0d7c2231015b331b942746610a05b6ea72977ab'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>ceph: trim deleted inode</title>
<updated>2013-08-10T00:55:10Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2013-07-21T02:07:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ca20c991917ef6a98d6b40184fefe981727d9328'/>
<id>urn:sha1:ca20c991917ef6a98d6b40184fefe981727d9328</id>
<content type='text'>
The MDS uses caps message to notify clients about deleted inode.
when receiving a such message, invalidate any alias of the inode.
This makes the kernel release the inode ASAP.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
</entry>
<entry>
<title>ceph: fix race between cap issue and revoke</title>
<updated>2013-07-03T22:32:57Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2013-07-02T04:40:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6ee6b95373dfa1d0a4c9bc76689ec10a60c1d6f2'/>
<id>urn:sha1:6ee6b95373dfa1d0a4c9bc76689ec10a60c1d6f2</id>
<content type='text'>
If we receive new caps from the auth MDS and the non-auth MDS is
revoking the newly issued caps, we should release the caps from
the non-auth MDS. The scenario is filelock's state changes from
SYNC to LOCK. Non-auth MDS revokes Fc cap, the client gets Fc cap
from the auth MDS at the same time.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
</entry>
<entry>
<title>ceph: fix cap revoke race</title>
<updated>2013-07-03T22:32:57Z</updated>
<author>
<name>Yan, Zheng</name>
</author>
<published>2013-07-02T04:40:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b1530f57042297f85330a140a6921b6f95fe74d3'/>
<id>urn:sha1:b1530f57042297f85330a140a6921b6f95fe74d3</id>
<content type='text'>
If caps are been revoking by the auth MDS, don't consider them as
issued even they are still issued by non-auth MDS. The non-auth
MDS should also be revoking/exporting these caps, the client just
hasn't received the cap revoke/export message.

The race I encountered is: When caps are exporting to new MDS, the
client receives cap import message and cap revoke message from the
new MDS, then receives cap export message from the old MDS. When
the client receives cap revoke message from the new MDS, the revoking
caps are still issued by the old MDS, so the client does nothing.
Later when the cap export message is received, the client removes
the caps issued by the old MDS. (Another way to fix the race is
calling ceph_check_caps() in handle_cap_export())

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
</entry>
</feed>
