From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Dryomov Subject: Re: [PATCH v6 1/7] libceph: remove req->r_replay_version Date: Tue, 4 Apr 2017 16:55:05 +0200 Message-ID: References: <20170330180546.11021-1-jlayton@redhat.com> <20170330180707.11137-1-jlayton@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-vk0-f66.google.com ([209.85.213.66]:34192 "EHLO mail-vk0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752922AbdDDOzH (ORCPT ); Tue, 4 Apr 2017 10:55:07 -0400 Received: by mail-vk0-f66.google.com with SMTP id y16so23197158vky.1 for ; Tue, 04 Apr 2017 07:55:07 -0700 (PDT) In-Reply-To: <20170330180707.11137-1-jlayton@redhat.com> Sender: ceph-devel-owner@vger.kernel.org List-ID: To: Jeff Layton Cc: "Yan, Zheng" , Sage Weil , John Spray , Ceph Development On Thu, Mar 30, 2017 at 8:07 PM, Jeff Layton wrote: > Nothing uses this anymore with the removal of the ack vs. commit code. > Remove the field and just encode zeroes into place in the request > encoding. > > Signed-off-by: Jeff Layton > --- > include/linux/ceph/osd_client.h | 1 - > net/ceph/debugfs.c | 4 +--- > net/ceph/osd_client.c | 6 +++--- > 3 files changed, 4 insertions(+), 7 deletions(-) > > diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h > index d6a625e75040..3fc9e7754a9b 100644 > --- a/include/linux/ceph/osd_client.h > +++ b/include/linux/ceph/osd_client.h > @@ -192,7 +192,6 @@ struct ceph_osd_request { > unsigned long r_stamp; /* jiffies, send or check time */ > unsigned long r_start_stamp; /* jiffies */ > int r_attempts; > - struct ceph_eversion r_replay_version; /* aka reassert_version */ > u32 r_last_force_resend; > u32 r_map_dne_bound; > > diff --git a/net/ceph/debugfs.c b/net/ceph/debugfs.c > index c62b2b029a6e..d7e63a4f5578 100644 > --- a/net/ceph/debugfs.c > +++ b/net/ceph/debugfs.c > @@ -177,9 +177,7 @@ static void dump_request(struct seq_file *s, struct ceph_osd_request *req) > seq_printf(s, "%llu\t", req->r_tid); > dump_target(s, &req->r_t); > > - seq_printf(s, "\t%d\t%u'%llu", req->r_attempts, > - le32_to_cpu(req->r_replay_version.epoch), > - le64_to_cpu(req->r_replay_version.version)); > + seq_printf(s, "\t%d", req->r_attempts); > > for (i = 0; i < req->r_num_ops; i++) { > struct ceph_osd_req_op *op = &req->r_ops[i]; > diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c > index b4500a8ab8b3..27f14ae69eb7 100644 > --- a/net/ceph/osd_client.c > +++ b/net/ceph/osd_client.c > @@ -1503,9 +1503,9 @@ static void encode_request(struct ceph_osd_request *req, struct ceph_msg *msg) > ceph_encode_32(&p, req->r_flags); > ceph_encode_timespec(p, &req->r_mtime); > p += sizeof(struct ceph_timespec); > - /* aka reassert_version */ > - memcpy(p, &req->r_replay_version, sizeof(req->r_replay_version)); > - p += sizeof(req->r_replay_version); > + /* replay version field */ > + memset(p, 0, sizeof(struct ceph_eversion)); > + p += sizeof(struct ceph_eversion); It's called reassert_version in userspace. Don't change the comment, just drop the "aka": /* reassert_version */ memset(p, 0, sizeof(struct ceph_eversion)); p += sizeof(struct ceph_eversion); With that, Reviewed-by: Ilya Dryomov Thanks, Ilya