Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199319
b: refs/heads/master
c: dd1c905
h: refs/heads/master
i:
  199317: 3a336d9
  199315: f4a163f
  199311: a3a08fa
v: v3
  • Loading branch information
Sage Weil committed May 29, 2010
1 parent 45aa21c commit 5ecfd7d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7e34bc524ecae3a04d8cc427ee76ddad826a937b
refs/heads/master: dd1c9057366f329911180e9000e2b425f23fc287
21 changes: 11 additions & 10 deletions trunk/fs/ceph/ceph_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,17 @@ extern const char *ceph_mds_state_name(int s);
* - they also define the lock ordering by the MDS
* - a few of these are internal to the mds
*/
#define CEPH_LOCK_DN 1
#define CEPH_LOCK_ISNAP 2
#define CEPH_LOCK_IVERSION 4 /* mds internal */
#define CEPH_LOCK_IFILE 8 /* mds internal */
#define CEPH_LOCK_IAUTH 32
#define CEPH_LOCK_ILINK 64
#define CEPH_LOCK_IDFT 128 /* dir frag tree */
#define CEPH_LOCK_INEST 256 /* mds internal */
#define CEPH_LOCK_IXATTR 512
#define CEPH_LOCK_INO 2048 /* immutable inode bits; not a lock */
#define CEPH_LOCK_DVERSION 1
#define CEPH_LOCK_DN 2
#define CEPH_LOCK_ISNAP 16
#define CEPH_LOCK_IVERSION 32 /* mds internal */
#define CEPH_LOCK_IFILE 64
#define CEPH_LOCK_IAUTH 128
#define CEPH_LOCK_ILINK 256
#define CEPH_LOCK_IDFT 512 /* dir frag tree */
#define CEPH_LOCK_INEST 1024 /* mds internal */
#define CEPH_LOCK_IXATTR 2048
#define CEPH_LOCK_INO 8192 /* immutable inode bits; not a lock */

/* client_session ops */
enum {
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/ceph/mds_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -2541,7 +2541,7 @@ void ceph_mdsc_lease_send_msg(struct ceph_mds_session *session,
return;
lease = msg->front.iov_base;
lease->action = action;
lease->mask = cpu_to_le16(CEPH_LOCK_DN);
lease->mask = cpu_to_le16(1);
lease->ino = cpu_to_le64(ceph_vino(inode).ino);
lease->first = lease->last = cpu_to_le64(ceph_vino(inode).snap);
lease->seq = cpu_to_le32(seq);
Expand Down Expand Up @@ -2571,7 +2571,7 @@ void ceph_mdsc_lease_release(struct ceph_mds_client *mdsc, struct inode *inode,

BUG_ON(inode == NULL);
BUG_ON(dentry == NULL);
BUG_ON(mask != CEPH_LOCK_DN);
BUG_ON(mask == 0);

/* is dentry lease valid? */
spin_lock(&dentry->d_lock);
Expand Down

0 comments on commit 5ecfd7d

Please sign in to comment.