diff mbox series

[v2,3/6] fs: ceph: Delete timespec64_trunc() usage

Message ID 20191203051945.9440-4-deepa.kernel@gmail.com (mailing list archive)
State New, archived
Headers show
Series Delete timespec64_trunc() | expand

Commit Message

Deepa Dinamani Dec. 3, 2019, 5:19 a.m. UTC
Since ceph always uses ns granularity, skip the
truncation which is a no-op.

Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Cc: jlayton@kernel.org
Cc: ceph-devel@vger.kernel.org
---
 fs/ceph/mds_client.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Jeff Layton Dec. 3, 2019, 6:55 p.m. UTC | #1
On Mon, 2019-12-02 at 21:19 -0800, Deepa Dinamani wrote:
> Since ceph always uses ns granularity, skip the
> truncation which is a no-op.
> 
> Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
> Cc: jlayton@kernel.org
> Cc: ceph-devel@vger.kernel.org
> ---
>  fs/ceph/mds_client.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index 068b029cf073..88687ed65cff 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -2069,7 +2069,6 @@ struct ceph_mds_request *
>  ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode)
>  {
>  	struct ceph_mds_request *req = kzalloc(sizeof(*req), GFP_NOFS);
> -	struct timespec64 ts;
>  
>  	if (!req)
>  		return ERR_PTR(-ENOMEM);
> @@ -2088,8 +2087,7 @@ ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode)
>  	init_completion(&req->r_safe_completion);
>  	INIT_LIST_HEAD(&req->r_unsafe_item);
>  
> -	ktime_get_coarse_real_ts64(&ts);
> -	req->r_stamp = timespec64_trunc(ts, mdsc->fsc->sb->s_time_gran);
> +	ktime_get_coarse_real_ts64(&req->r_stamp);
>  
>  	req->r_op = op;
>  	req->r_direct_mode = mode;

Thanks Deepa. We'll plan to take this one in via the ceph tree.

Cheers,
Deepa Dinamani Dec. 3, 2019, 7:41 p.m. UTC | #2
> Thanks Deepa. We'll plan to take this one in via the ceph tree.

Actually, deletion of the timespec64_trunc() will depend on this
patch. Can we merge the series through a common tree? Otherwise,
whoever takes the [PATCH 6/7] ("fs:
Delete timespec64_trunc()") would have to depend on your tree. If you
are ok with the change, can you ack it?

Thanks,
Deepa
Jeff Layton Dec. 3, 2019, 7:49 p.m. UTC | #3
On Tue, 2019-12-03 at 11:41 -0800, Deepa Dinamani wrote:
> > Thanks Deepa. We'll plan to take this one in via the ceph tree.
> 
> Actually, deletion of the timespec64_trunc() will depend on this
> patch. Can we merge the series through a common tree? Otherwise,
> whoever takes the [PATCH 6/7] ("fs:
> Delete timespec64_trunc()") would have to depend on your tree. If you
> are ok with the change, can you ack it?
> 
> Thanks,
> Deepa

Sure, no problem if that works better for you.

Acked-by: Jeff Layton <jlayton@kernel.org>
diff mbox series

Patch

diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 068b029cf073..88687ed65cff 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -2069,7 +2069,6 @@  struct ceph_mds_request *
 ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode)
 {
 	struct ceph_mds_request *req = kzalloc(sizeof(*req), GFP_NOFS);
-	struct timespec64 ts;
 
 	if (!req)
 		return ERR_PTR(-ENOMEM);
@@ -2088,8 +2087,7 @@  ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode)
 	init_completion(&req->r_safe_completion);
 	INIT_LIST_HEAD(&req->r_unsafe_item);
 
-	ktime_get_coarse_real_ts64(&ts);
-	req->r_stamp = timespec64_trunc(ts, mdsc->fsc->sb->s_time_gran);
+	ktime_get_coarse_real_ts64(&req->r_stamp);
 
 	req->r_op = op;
 	req->r_direct_mode = mode;