]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: check xattr version independent of inode version
authorYan, Zheng <zyan@redhat.com>
Thu, 18 Dec 2014 03:41:38 +0000 (11:41 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 5 Feb 2015 14:40:38 +0000 (22:40 +0800)
Fixes: #10343
Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/client/Client.cc

index 1c305510a7162872163c6d4a97f785063a242aa5..53e225c47a952557cd2b4688a9f0f5b2dc686fb2 100644 (file)
@@ -792,14 +792,6 @@ Inode * Client::add_update_inode(InodeStat *st, utime_t from,
       in->nlink = st->nlink;
     }
 
-    if ((in->xattr_version  == 0 || !(issued & CEPH_CAP_XATTR_EXCL)) &&
-       st->xattrbl.length() &&
-       st->xattr_version > in->xattr_version) {
-      bufferlist::iterator p = st->xattrbl.begin();
-      ::decode(in->xattrs, p);
-      in->xattr_version = st->xattr_version;
-    }
-
     in->dirstat = st->dirstat;
     in->rstat = st->rstat;
 
@@ -823,6 +815,14 @@ Inode * Client::add_update_inode(InodeStat *st, utime_t from,
     in->inline_version = st->inline_version;
   }
 
+  if ((in->xattr_version  == 0 || !(issued & CEPH_CAP_XATTR_EXCL)) &&
+      st->xattrbl.length() &&
+      st->xattr_version > in->xattr_version) {
+    bufferlist::iterator p = st->xattrbl.begin();
+    ::decode(in->xattrs, p);
+    in->xattr_version = st->xattr_version;
+  }
+
   // move me if/when version reflects fragtree changes.
   if (in->dirfragtree != st->dirfragtree) {
     in->dirfragtree = st->dirfragtree;