17b94a
From d9781ed4964d9e752fc880c8cd8afcbd2c561ebe Mon Sep 17 00:00:00 2001
17b94a
From: Jiffin Tony Thottan <jthottan@redhat.com>
17b94a
Date: Wed, 26 Jun 2019 15:58:33 +0530
17b94a
Subject: [PATCH 219/221] posix : add posix_set_ctime() in posix_ftruncate()
17b94a
17b94a
Upstream references :
17b94a
> release 6: https://review.gluster.org/#/c/glusterfs/+/22965/
17b94a
> mainline: https://review.gluster.org/#/c/glusterfs/+/22948/
17b94a
17b94a
Change-Id: I0cb5320fea71306e0283509ae47024f23874b53b
17b94a
fixes: bz#1720163
17b94a
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
17b94a
Reviewed-on: https://code.engineering.redhat.com/gerrit/174837
17b94a
Tested-by: RHGS Build Bot <nigelb@redhat.com>
17b94a
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
17b94a
---
17b94a
 xlators/storage/posix/src/posix-inode-fd-ops.c | 2 ++
17b94a
 1 file changed, 2 insertions(+)
17b94a
17b94a
diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c
17b94a
index fc847d6..c949f68 100644
17b94a
--- a/xlators/storage/posix/src/posix-inode-fd-ops.c
17b94a
+++ b/xlators/storage/posix/src/posix-inode-fd-ops.c
17b94a
@@ -5059,6 +5059,8 @@ posix_ftruncate(call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
17b94a
         goto out;
17b94a
     }
17b94a
 
17b94a
+    posix_set_ctime(frame, this, NULL, pfd->fd, fd->inode, &postop);
17b94a
+
17b94a
     op_ret = 0;
17b94a
 
17b94a
 out:
17b94a
-- 
17b94a
1.8.3.1
17b94a