• Yan, Zheng's avatar
    ceph: request xattrs if xattr_version is zero · 508b32d8
    Yan, Zheng authored
    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: default avatarYan, Zheng <zyan@redhat.com>
    508b32d8
xattr.c 27.6 KB