]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: request xattrs if xattr_version is 0 2503/head
authorYan, Zheng <zyan@redhat.com>
Tue, 16 Sep 2014 06:40:13 +0000 (14:40 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 17 Sep 2014 03:32:17 +0000 (11:32 +0800)
commit1f450faaacce3e2a0560efb3db6f88b4ccdd27e5
tree8cf753415fbb84bd2b48d038e3b73263af56a71c
parentc837fb9428890a53090bc007d202c3692ac7048c
client: request xattrs if xattr_version is 0

Following sequence of events can happen.
 - Client releases an inode, queues cap release message.
 - A 'lookup' reply brings the same inode back, but the reply
   doesn't contain xattrs because MDS didn't receive the cap release
   message and thought client already has up-to-data xattrs.

The fix is force sending a getattr request to MDS if xattrs_version is 0.
The getattr mask is set to CEPH_STAT_CAP_XATTR, so MDS knows client does
not have xattr.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/client/Client.cc