]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: only includee xattrs in caps msg if we are flushing that bit
authorSage Weil <sage@newdream.net>
Tue, 24 Aug 2010 20:06:13 +0000 (13:06 -0700)
committerSage Weil <sage@newdream.net>
Tue, 24 Aug 2010 20:06:13 +0000 (13:06 -0700)
src/client/Client.cc

index 4ee5c8b437dd390527ef3f9eb29b73b15b2502de..d290236a2f73f02c4047f2a16c532215608c0099 100644 (file)
@@ -1751,8 +1751,10 @@ void Client::send_cap(Inode *in, int mds, InodeCap *cap, int used, int want, int
   
   m->head.nlink = in->nlink;
   
-  ::encode(in->xattrs, m->xattrbl);
-  m->head.xattr_version = in->xattr_version;
+  if (flush & CEPH_CAP_XATTR_EXCL) {
+    ::encode(in->xattrs, m->xattrbl);
+    m->head.xattr_version = in->xattr_version;
+  }
   
   m->head.layout = in->layout;
   m->head.size = in->size;