diff options
author | Sage Weil <sage@newdream.net> | 2010-03-01 16:20:50 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-03-01 18:20:05 -0500 |
commit | 70edb55bdfa8922c8ad40bc5a67abb6d9fee8d47 (patch) | |
tree | 4e2f3445a71bc016adba9095a8885048b2d3bcfe /fs/ceph/caps.c | |
parent | c16e786927b977cb880873214bbd815e8d5ec4ba (diff) |
ceph: fix snaptrace decoding on cap migration between mds
This was simply broken. Apparently at some point we thought about putting
the snaptrace in the middle section, but didn't.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r-- | fs/ceph/caps.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index bb846164addc..9afa8d37a6e3 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -2608,6 +2608,7 @@ void ceph_handle_caps(struct ceph_mds_session *session, | |||
2608 | u64 size, max_size; | 2608 | u64 size, max_size; |
2609 | u64 tid; | 2609 | u64 tid; |
2610 | int check_caps = 0; | 2610 | int check_caps = 0; |
2611 | void *snaptrace; | ||
2611 | int r; | 2612 | int r; |
2612 | 2613 | ||
2613 | dout("handle_caps from mds%d\n", mds); | 2614 | dout("handle_caps from mds%d\n", mds); |
@@ -2617,6 +2618,7 @@ void ceph_handle_caps(struct ceph_mds_session *session, | |||
2617 | if (msg->front.iov_len < sizeof(*h)) | 2618 | if (msg->front.iov_len < sizeof(*h)) |
2618 | goto bad; | 2619 | goto bad; |
2619 | h = msg->front.iov_base; | 2620 | h = msg->front.iov_base; |
2621 | snaptrace = h + 1; | ||
2620 | op = le32_to_cpu(h->op); | 2622 | op = le32_to_cpu(h->op); |
2621 | vino.ino = le64_to_cpu(h->ino); | 2623 | vino.ino = le64_to_cpu(h->ino); |
2622 | vino.snap = CEPH_NOSNAP; | 2624 | vino.snap = CEPH_NOSNAP; |
@@ -2651,8 +2653,7 @@ void ceph_handle_caps(struct ceph_mds_session *session, | |||
2651 | 2653 | ||
2652 | case CEPH_CAP_OP_IMPORT: | 2654 | case CEPH_CAP_OP_IMPORT: |
2653 | handle_cap_import(mdsc, inode, h, session, | 2655 | handle_cap_import(mdsc, inode, h, session, |
2654 | msg->middle, | 2656 | snaptrace, le32_to_cpu(h->snap_trace_len)); |
2655 | le32_to_cpu(h->snap_trace_len)); | ||
2656 | check_caps = 1; /* we may have sent a RELEASE to the old auth */ | 2657 | check_caps = 1; /* we may have sent a RELEASE to the old auth */ |
2657 | goto done; | 2658 | goto done; |
2658 | } | 2659 | } |