<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/ceph/caps.c, branch v3.17</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>ceph: replace comma with a semicolon</title>
<updated>2014-07-24T08:04:46+00:00</updated>
<author>
<name>Himangi Saraogi</name>
<email>himangi774@gmail.com</email>
</author>
<published>2014-07-23T14:41:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=08a0f24e4c62e7dd6b8486903177c1c451819f01'/>
<id>08a0f24e4c62e7dd6b8486903177c1c451819f01</id>
<content type='text'>
Replace a comma between expression statements by a semicolon. This changes
the semantics of the code, but given the current indentation appears to be
what is intended.

A simplified version of the Coccinelle semantic patch that performs this
transformation is as follows:
// &lt;smpl&gt;
@r@
expression e1,e2;
@@

 e1
-,
+;
 e2;
// &lt;/smpl&gt;

Signed-off-by: Himangi Saraogi &lt;himangi774@gmail.com&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Ilya Dryomov &lt;ilya.dryomov@inktank.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace a comma between expression statements by a semicolon. This changes
the semantics of the code, but given the current indentation appears to be
what is intended.

A simplified version of the Coccinelle semantic patch that performs this
transformation is as follows:
// &lt;smpl&gt;
@r@
expression e1,e2;
@@

 e1
-,
+;
 e2;
// &lt;/smpl&gt;

Signed-off-by: Himangi Saraogi &lt;himangi774@gmail.com&gt;
Acked-by: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Signed-off-by: Ilya Dryomov &lt;ilya.dryomov@inktank.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mds: check cap ID when handling cap export message</title>
<updated>2014-06-06T01:29:55+00:00</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2014-04-21T07:46:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ca665e0282ece4f8121ab4de474351f291fa8c2d'/>
<id>ca665e0282ece4f8121ab4de474351f291fa8c2d</id>
<content type='text'>
handle following sequence of events:
- mds0 exports an inode to mds1. client receives the cap import
  message from mds1. caps from mds0 are removed while handling
  the cap import message.
- mds1 exports an inode to mds0. client receives the cap export
  message from mds1. handle_cap_export() adds placeholder caps
  for mds0
- client receives the first cap export message (for exporting
  inode from mds0 to mds1)

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>
handle following sequence of events:
- mds0 exports an inode to mds1. client receives the cap import
  message from mds1. caps from mds0 are removed while handling
  the cap import message.
- mds1 exports an inode to mds0. client receives the cap export
  message from mds1. handle_cap_export() adds placeholder caps
  for mds0
- client receives the first cap export message (for exporting
  inode from mds0 to mds1)

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: handle cap import atomically</title>
<updated>2014-06-06T01:29:53+00:00</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2014-04-18T05:20:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2cd698be9a3d3a0f8f3c66814eac34144c31954c'/>
<id>2cd698be9a3d3a0f8f3c66814eac34144c31954c</id>
<content type='text'>
cap import messages are processed by both handle_cap_import() and
handle_cap_grant(). These two functions are not executed in the same
atomic context, so they can races with cap release.

The fix is make handle_cap_import() not release the i_ceph_lock when
it returns. Let handle_cap_grant() release the lock after it finishes
its job.

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>
cap import messages are processed by both handle_cap_import() and
handle_cap_grant(). These two functions are not executed in the same
atomic context, so they can races with cap release.

The fix is make handle_cap_import() not release the i_ceph_lock when
it returns. Let handle_cap_grant() release the lock after it finishes
its job.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: pre-allocate ceph_cap struct for ceph_add_cap()</title>
<updated>2014-06-06T01:29:53+00:00</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2014-04-18T01:57:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d9df2783507943316b305e177e5b1c157200c76f'/>
<id>d9df2783507943316b305e177e5b1c157200c76f</id>
<content type='text'>
So that ceph_add_cap() can be used while i_ceph_lock is locked.
This simplifies the code that handle cap import/export.

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>
So that ceph_add_cap() can be used while i_ceph_lock is locked.
This simplifies the code that handle cap import/export.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: update inode fields according to issued caps</title>
<updated>2014-06-06T01:29:52+00:00</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2014-04-17T00:55:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f98a128a55ff85d0087de89f304f10bd75e792aa'/>
<id>f98a128a55ff85d0087de89f304f10bd75e792aa</id>
<content type='text'>
Cap message and request reply from non-auth MDS may carry stale
information (corresponding locks are in LOCK states) even they
have the newest inode version. So client should update inode fields
according to issued caps.

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>
Cap message and request reply from non-auth MDS may carry stale
information (corresponding locks are in LOCK states) even they
have the newest inode version. So client should update inode fields
according to issued caps.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: queue vmtruncate if necessary when handing cap grant/revoke</title>
<updated>2014-06-06T01:29:51+00:00</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2014-04-11T02:18:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c6bcda6f525129b1df169f77d96a4b0972e1ecb1'/>
<id>c6bcda6f525129b1df169f77d96a4b0972e1ecb1</id>
<content type='text'>
cap grant/revoke message from non-auth MDS can update inode's size
and truncate_seq/truncate_size. (the message arrives before auth
MDS's cap trunc message)

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>
cap grant/revoke message from non-auth MDS can update inode's size
and truncate_seq/truncate_size. (the message arrives before auth
MDS's cap trunc message)

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: avoid releasing caps that are being used</title>
<updated>2014-04-28T19:55:01+00:00</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2014-04-17T00:02:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fd7b95cd1b58171a0b931b2063729a032bec4ac2'/>
<id>fd7b95cd1b58171a0b931b2063729a032bec4ac2</id>
<content type='text'>
To avoid releasing caps that are being used, encode_inode_release()
should send implemented caps to MDS.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To avoid releasing caps that are being used, encode_inode_release()
should send implemented caps to MDS.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
Reviewed-by: Sage Weil &lt;sage@inktank.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: set mds_wanted when MDS reply changes a cap to auth cap</title>
<updated>2014-04-05T04:07:12+00:00</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2014-03-18T02:15:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d9ffc4f77073e7e1ca731f21804769de9c094b87'/>
<id>d9ffc4f77073e7e1ca731f21804769de9c094b87</id>
<content type='text'>
When adjusting caps client wants, MDS does not record caps that are
not allowed. For non-auth MDS, it does not record WR caps. So when
a MDS reply changes a non-auth cap to auth cap, client needs to set
cap's mds_wanted according to the reply.

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>
When adjusting caps client wants, MDS does not record caps that are
not allowed. For non-auth MDS, it does not record WR caps. So when
a MDS reply changes a non-auth cap to auth cap, client needs to set
cap's mds_wanted according to the reply.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: make sure write caps are registered with auth MDS</title>
<updated>2014-04-05T04:07:05+00:00</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2014-03-08T01:51:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a255060451dcb416c8097218b40d86d613d84bfc'/>
<id>a255060451dcb416c8097218b40d86d613d84bfc</id>
<content type='text'>
Only auth MDS can issue write caps to clients, so don't consider
write caps registered with non-auth MDS as valid.

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>
Only auth MDS can issue write caps to clients, so don't consider
write caps registered with non-auth MDS as valid.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ceph: add imported caps when handling cap export message</title>
<updated>2014-01-21T08:30:31+00:00</updated>
<author>
<name>Yan, Zheng</name>
<email>zheng.z.yan@intel.com</email>
</author>
<published>2013-11-24T06:44:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=11df2dfb610d68e8050c2183c344b1002351a99d'/>
<id>11df2dfb610d68e8050c2183c344b1002351a99d</id>
<content type='text'>
Version 3 cap export message includes information about the imported
caps. It allows us to add the imported caps if the corresponding cap
import message still hasn't been received.

This allow us to handle situation that the importer MDS crashes and
the cap import message is missing.

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>
Version 3 cap export message includes information about the imported
caps. It allows us to add the imported caps if the corresponding cap
import message still hasn't been received.

This allow us to handle situation that the importer MDS crashes and
the cap import message is missing.

Signed-off-by: Yan, Zheng &lt;zheng.z.yan@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
