Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1418071 > unrolled thread

[PATCH 12/21] block: rbd: Replace non inode CURRENT_TIME with current_fs_time()

Started byDeepa Dinamani <deepa.kernel@gmail.com>
First post2016-06-09 07:10 +0200
Last post2016-06-09 07:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 12/21] block: rbd: Replace non inode CURRENT_TIME with current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-06-09 07:10 +0200

#1418071 — [PATCH 12/21] block: rbd: Replace non inode CURRENT_TIME with current_fs_time()

FromDeepa Dinamani <deepa.kernel@gmail.com>
Date2016-06-09 07:10 +0200
Subject[PATCH 12/21] block: rbd: Replace non inode CURRENT_TIME with current_fs_time()
Message-ID<rI0oa-1PH-27@gated-at.bofh.it>
CURRENT_TIME macro is not appropriate for filesystems as it
doesn't use the right granularity for filesystem timestamps.
Use current_fs_time() instead.

This is also in preparation for the patch that transitions
vfs timestamps to use 64 bit time and hence make them
y2038 safe. As part of the effort current_fs_time() will be
extended to do range checks. Hence, it is necessary for all
file system timestamps to use current_fs_time().

Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Cc: Ilya Dryomov <idryomov@gmail.com>
Cc: Sage Weil <sage@redhat.com>
Cc: Alex Elder <elder@kernel.org>
Cc: ceph-devel@vger.kernel.org
---
 drivers/block/rbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 81666a5..4dcafe4 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1888,7 +1888,7 @@ static void rbd_osd_req_format_write(struct rbd_obj_request *obj_request)
 {
 	struct ceph_osd_request *osd_req = obj_request->osd_req;
 
-	osd_req->r_mtime = CURRENT_TIME;
+	osd_req->r_mtime = current_fs_time(osd_req->r_inode->i_sb);
 	osd_req->r_data_offset = obj_request->offset;
 }
 
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web