]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: better printing on lock messages
authorGreg Farnum <gregf@hq.newdream.net>
Fri, 14 May 2010 23:53:12 +0000 (16:53 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Mon, 2 Aug 2010 17:39:56 +0000 (10:39 -0700)
src/include/ceph_strings.cc
src/messages/MClientRequest.h

index 0f943a0a3b5e40cc7d078ab1c0b98deb1b1a2f2b..c6179d3a26a216cb7b8f6ee0119884162887c778 100644 (file)
@@ -130,6 +130,8 @@ const char *ceph_mds_op_name(int op)
        case CEPH_MDS_OP_LSSNAP: return "lssnap";
        case CEPH_MDS_OP_MKSNAP: return "mksnap";
        case CEPH_MDS_OP_RMSNAP: return "rmsnap";
+       case CEPH_MDS_OP_SETFILELOCK: return "setfilelock";
+       case CEPH_MDS_OP_GETFILELOCK: return "getfilelock";
        }
        return "???";
 }
index 1a82d00fcd4ea3faddedf491c34564d710a172e0..d4ec62943c5ecadd1c0018f94b8ce2b6b553301a 100644 (file)
@@ -178,6 +178,15 @@ public:
       if (head.args.setattr.mask & CEPH_SETATTR_ATIME)
        out << " atime=" << utime_t(head.args.setattr.atime);
     }
+    if (head.op == CEPH_MDS_OP_SETFILELOCK ||
+       head.op == CEPH_MDS_OP_GETFILELOCK) {
+      out << "rule " << (int)head.args.filelock_change.rule
+         << ", type " << (int)head.args.filelock_change.type
+         << ", pid " << head.args.filelock_change.pid
+         << ", start " << head.args.filelock_change.start
+         << ", length " << head.args.filelock_change.length
+         << ", wait " << (int)head.args.filelock_change.wait;
+    }
     //if (!get_filepath().empty()) 
     out << " " << get_filepath();
     if (!get_filepath2().empty())