| .. | .. |
|---|
| 130 | 130 | #define CEPH_MSG_CLIENT_REQUEST 24 |
|---|
| 131 | 131 | #define CEPH_MSG_CLIENT_REQUEST_FORWARD 25 |
|---|
| 132 | 132 | #define CEPH_MSG_CLIENT_REPLY 26 |
|---|
| 133 | +#define CEPH_MSG_CLIENT_METRICS 29 |
|---|
| 133 | 134 | #define CEPH_MSG_CLIENT_CAPS 0x310 |
|---|
| 134 | 135 | #define CEPH_MSG_CLIENT_LEASE 0x311 |
|---|
| 135 | 136 | #define CEPH_MSG_CLIENT_SNAP 0x312 |
|---|
| .. | .. |
|---|
| 287 | 288 | CEPH_SESSION_FLUSHMSG_ACK, |
|---|
| 288 | 289 | CEPH_SESSION_FORCE_RO, |
|---|
| 289 | 290 | CEPH_SESSION_REJECT, |
|---|
| 291 | + CEPH_SESSION_REQUEST_FLUSH_MDLOG, |
|---|
| 290 | 292 | }; |
|---|
| 291 | 293 | |
|---|
| 292 | 294 | extern const char *ceph_session_op_name(int op); |
|---|
| .. | .. |
|---|
| 436 | 438 | __le64 length; /* num bytes to lock from start */ |
|---|
| 437 | 439 | __u8 wait; /* will caller wait for lock to become available? */ |
|---|
| 438 | 440 | } __attribute__ ((packed)) filelock_change; |
|---|
| 441 | + struct { |
|---|
| 442 | + __le32 mask; /* CEPH_CAP_* */ |
|---|
| 443 | + __le64 snapid; |
|---|
| 444 | + __le64 parent; |
|---|
| 445 | + __le32 hash; |
|---|
| 446 | + } __attribute__ ((packed)) lookupino; |
|---|
| 439 | 447 | } __attribute__ ((packed)); |
|---|
| 440 | 448 | |
|---|
| 441 | | -#define CEPH_MDS_FLAG_REPLAY 1 /* this is a replayed op */ |
|---|
| 442 | | -#define CEPH_MDS_FLAG_WANT_DENTRY 2 /* want dentry in reply */ |
|---|
| 449 | +#define CEPH_MDS_FLAG_REPLAY 1 /* this is a replayed op */ |
|---|
| 450 | +#define CEPH_MDS_FLAG_WANT_DENTRY 2 /* want dentry in reply */ |
|---|
| 451 | +#define CEPH_MDS_FLAG_ASYNC 4 /* request is asynchronous */ |
|---|
| 443 | 452 | |
|---|
| 444 | 453 | struct ceph_mds_request_head { |
|---|
| 445 | 454 | __le64 oldest_client_tid; |
|---|
| .. | .. |
|---|
| 524 | 533 | __le32 seq; |
|---|
| 525 | 534 | } __attribute__ ((packed)); |
|---|
| 526 | 535 | |
|---|
| 536 | +#define CEPH_LEASE_VALID (1 | 2) /* old and new bit values */ |
|---|
| 537 | +#define CEPH_LEASE_PRIMARY_LINK 4 /* primary linkage */ |
|---|
| 538 | + |
|---|
| 527 | 539 | struct ceph_mds_reply_dirfrag { |
|---|
| 528 | 540 | __le32 frag; /* fragment */ |
|---|
| 529 | 541 | __le32 auth; /* auth mds, if this is a delegation point */ |
|---|
| .. | .. |
|---|
| 558 | 570 | #define CEPH_FILE_MODE_RDWR 3 /* RD | WR */ |
|---|
| 559 | 571 | #define CEPH_FILE_MODE_LAZY 4 /* lazy io */ |
|---|
| 560 | 572 | #define CEPH_FILE_MODE_BITS 4 |
|---|
| 573 | +#define CEPH_FILE_MODE_MASK ((1 << CEPH_FILE_MODE_BITS) - 1) |
|---|
| 561 | 574 | |
|---|
| 562 | 575 | int ceph_flags_to_mode(int flags); |
|---|
| 563 | 576 | |
|---|
| .. | .. |
|---|
| 649 | 662 | #define CEPH_CAP_ANY (CEPH_CAP_ANY_RD | CEPH_CAP_ANY_EXCL | \ |
|---|
| 650 | 663 | CEPH_CAP_ANY_FILE_WR | CEPH_CAP_FILE_LAZYIO | \ |
|---|
| 651 | 664 | CEPH_CAP_PIN) |
|---|
| 665 | +#define CEPH_CAP_ALL_FILE (CEPH_CAP_PIN | CEPH_CAP_ANY_SHARED | \ |
|---|
| 666 | + CEPH_CAP_AUTH_EXCL | CEPH_CAP_XATTR_EXCL | \ |
|---|
| 667 | + CEPH_CAP_ANY_FILE_RD | CEPH_CAP_ANY_FILE_WR) |
|---|
| 652 | 668 | |
|---|
| 653 | 669 | #define CEPH_CAP_LOCKS (CEPH_LOCK_IFILE | CEPH_LOCK_IAUTH | CEPH_LOCK_ILINK | \ |
|---|
| 654 | 670 | CEPH_LOCK_IXATTR) |
|---|
| 671 | + |
|---|
| 672 | +/* cap masks async dir operations */ |
|---|
| 673 | +#define CEPH_CAP_DIR_CREATE CEPH_CAP_FILE_CACHE |
|---|
| 674 | +#define CEPH_CAP_DIR_UNLINK CEPH_CAP_FILE_RD |
|---|
| 675 | +#define CEPH_CAP_ANY_DIR_OPS (CEPH_CAP_FILE_CACHE | CEPH_CAP_FILE_RD | \ |
|---|
| 676 | + CEPH_CAP_FILE_WREXTEND | CEPH_CAP_FILE_LAZYIO) |
|---|
| 655 | 677 | |
|---|
| 656 | 678 | int ceph_caps_for_mode(int mode); |
|---|
| 657 | 679 | |
|---|
| .. | .. |
|---|
| 676 | 698 | /* flags field in client cap messages (version >= 10) */ |
|---|
| 677 | 699 | #define CEPH_CLIENT_CAPS_SYNC (1<<0) |
|---|
| 678 | 700 | #define CEPH_CLIENT_CAPS_NO_CAPSNAP (1<<1) |
|---|
| 679 | | -#define CEPH_CLIENT_CAPS_PENDING_CAPSNAP (1<<2); |
|---|
| 701 | +#define CEPH_CLIENT_CAPS_PENDING_CAPSNAP (1<<2) |
|---|
| 680 | 702 | |
|---|
| 681 | 703 | /* |
|---|
| 682 | 704 | * caps message, used for capability callbacks, acks, requests, etc. |
|---|