Skip to content

Commit

Permalink
Merge pull request ceph#11790 from jcsp/wip-mclientcaps
Browse files Browse the repository at this point in the history
client: remove unneeded layout on MClientCaps

Reviewed-by: Jeff Layton <[email protected]>
  • Loading branch information
John Spray authored Nov 11, 2016
2 parents d5bea25 + 469ba82 commit c88c395
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/client/Client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3250,7 +3250,6 @@ void Client::send_cap(Inode *in, MetaSession *session, Cap *cap,
m->head.xattr_version = in->xattr_version;
}

m->layout = in->layout;
m->size = in->size;
m->max_size = in->max_size;
m->truncate_seq = in->truncate_seq;
Expand Down
2 changes: 1 addition & 1 deletion src/mds/CInode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3389,7 +3389,7 @@ void CInode::encode_cap_message(MClientCaps *m, Capability *cap)
<< " ctime " << i->ctime << dendl;

i = pfile ? pi:oi;
m->layout = i->layout;
m->set_layout(i->layout);
m->size = i->size;
m->truncate_seq = i->truncate_seq;
m->truncate_size = i->truncate_size;
Expand Down
7 changes: 6 additions & 1 deletion src/messages/MClientCaps.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class MClientCaps : public Message {
uint64_t size, max_size, truncate_size, change_attr;
uint32_t truncate_seq;
utime_t mtime, atime, ctime, btime;
file_layout_t layout;
uint32_t time_warp_seq;

struct ceph_mds_cap_peer peer;
Expand Down Expand Up @@ -72,6 +71,10 @@ class MClientCaps : public Message {
return layout;
}

void set_layout(const file_layout_t &l) {
layout = l;
}

int get_migrate_seq() { return head.migrate_seq; }
int get_op() { return head.op; }

Expand Down Expand Up @@ -176,6 +179,8 @@ class MClientCaps : public Message {
inline_version = 0;
}
private:
file_layout_t layout;

~MClientCaps() {}

public:
Expand Down

0 comments on commit c88c395

Please sign in to comment.