summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-03-01 22:20:50 +0100
committerSage Weil <sage@newdream.net>2010-03-02 00:20:05 +0100
commit70edb55bdfa8922c8ad40bc5a67abb6d9fee8d47 (patch)
tree4e2f3445a71bc016adba9095a8885048b2d3bcfe /fs/ceph
parentceph: use single osd op reply msg (diff)
downloadlinux-70edb55bdfa8922c8ad40bc5a67abb6d9fee8d47.tar.xz
linux-70edb55bdfa8922c8ad40bc5a67abb6d9fee8d47.zip
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')
-rw-r--r--fs/ceph/caps.c5
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,
u64 size, max_size;
u64 tid;
int check_caps = 0;
+ void *snaptrace;
int r;
dout("handle_caps from mds%d\n", mds);
@@ -2617,6 +2618,7 @@ void ceph_handle_caps(struct ceph_mds_session *session,
if (msg->front.iov_len < sizeof(*h))
goto bad;
h = msg->front.iov_base;
+ snaptrace = h + 1;
op = le32_to_cpu(h->op);
vino.ino = le64_to_cpu(h->ino);
vino.snap = CEPH_NOSNAP;
@@ -2651,8 +2653,7 @@ void ceph_handle_caps(struct ceph_mds_session *session,
case CEPH_CAP_OP_IMPORT:
handle_cap_import(mdsc, inode, h, session,
- msg->middle,
- le32_to_cpu(h->snap_trace_len));
+ snaptrace, le32_to_cpu(h->snap_trace_len));
check_caps = 1; /* we may have sent a RELEASE to the old auth */
goto done;
}