<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/features/utime, branch v9dev</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>features/utime: Don't access frame after stack-wind</title>
<updated>2020-04-03T07:46:44+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2020-04-02T10:00:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=f55c45537435cc2a1412c80a6c922db63ce65965'/>
<id>f55c45537435cc2a1412c80a6c922db63ce65965</id>
<content type='text'>
Problem:
frame is accessed after stack-wind. This can lead to crash
if the cbk frees the frame.

Fix:
Use new frame for the wind instead.

Updates: #832
Change-Id: I64754609f1114b0bbd4d1336fa81a56f2cca6e03
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
frame is accessed after stack-wind. This can lead to crash
if the cbk frees the frame.

Fix:
Use new frame for the wind instead.

Updates: #832
Change-Id: I64754609f1114b0bbd4d1336fa81a56f2cca6e03
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>utime: resolve an issue of permission denied logs</title>
<updated>2020-03-13T12:15:21+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@kadalu.io</email>
</author>
<published>2020-03-03T19:16:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=eb916c057036db8289b41265797e5dce066d1512'/>
<id>eb916c057036db8289b41265797e5dce066d1512</id>
<content type='text'>
In case where uid is not set to be 0, there are possible errors
from acl xlator. So, set `uid = 0;` with pid indicating this is
set from UTIME activity.

The message "E [MSGID: 148002] [utime.c:146:gf_utime_set_mdata_setxattr_cbk] 0-dev_SNIP_data-utime: dict set of key for set-ctime-mdata failed [Permission denied]" repeated 2 times between [2019-12-19 21:27:55.042634] and [2019-12-19 21:27:55.047887]

Change-Id: Ieadf329835a40a13ac0bf908dac776e66954466c
Fixes: #832
Signed-off-by: Amar Tumballi &lt;amar@kadalu.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case where uid is not set to be 0, there are possible errors
from acl xlator. So, set `uid = 0;` with pid indicating this is
set from UTIME activity.

The message "E [MSGID: 148002] [utime.c:146:gf_utime_set_mdata_setxattr_cbk] 0-dev_SNIP_data-utime: dict set of key for set-ctime-mdata failed [Permission denied]" repeated 2 times between [2019-12-19 21:27:55.042634] and [2019-12-19 21:27:55.047887]

Change-Id: Ieadf329835a40a13ac0bf908dac776e66954466c
Fixes: #832
Signed-off-by: Amar Tumballi &lt;amar@kadalu.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctime: Fix ctime inconsisteny with utimensat</title>
<updated>2019-12-10T05:07:19+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2019-11-18T10:24:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=400cf809ed24ffb506fed6edd510643be406e3ea'/>
<id>400cf809ed24ffb506fed6edd510643be406e3ea</id>
<content type='text'>
Problem:
When touch is used to create a file, the ctime is not matching
atime and mtime which ideally should match. There is a difference
in nano seconds.

Cause:
When touch is used modify atime or mtime to current time (UTIME_NOW),
the current time is taken from kernel. The ctime gets updated to current
time when atime or mtime is updated. But the current time to update
ctime is taken from utime xlator. Hence the difference in nano seconds.

Fix:
When utimesat uses UTIME_NOW, use the current time from kernel.

fixes: bz#1773530
Change-Id: I9ccfa47dcd39df23396852b4216f1773c49250ce
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
When touch is used to create a file, the ctime is not matching
atime and mtime which ideally should match. There is a difference
in nano seconds.

Cause:
When touch is used modify atime or mtime to current time (UTIME_NOW),
the current time is taken from kernel. The ctime gets updated to current
time when atime or mtime is updated. But the current time to update
ctime is taken from utime xlator. Hence the difference in nano seconds.

Fix:
When utimesat uses UTIME_NOW, use the current time from kernel.

fixes: bz#1773530
Change-Id: I9ccfa47dcd39df23396852b4216f1773c49250ce
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctime: Fix incorrect realtime passed to frame-&gt;root-&gt;ctime</title>
<updated>2019-08-22T05:35:15+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2019-08-20T10:19:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=d14d0749340d9cb1ef6fc4b35f2fb3015ed0339d'/>
<id>d14d0749340d9cb1ef6fc4b35f2fb3015ed0339d</id>
<content type='text'>
On systems that don't support "timespec_get"(e.g., centos6), it
was using "clock_gettime" with "CLOCK_MONOTONIC" to get unix epoch
time which is incorrect. This patch introduces "timespec_now_realtime"
which uses "clock_gettime" with "CLOCK_REALTIME" which fixes
the issue.

Change-Id: I57be35ce442d7e05319e82112b687eb4f28d7612
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
fixes: bz#1743652
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On systems that don't support "timespec_get"(e.g., centos6), it
was using "clock_gettime" with "CLOCK_MONOTONIC" to get unix epoch
time which is incorrect. This patch introduces "timespec_now_realtime"
which uses "clock_gettime" with "CLOCK_REALTIME" which fixes
the issue.

Change-Id: I57be35ce442d7e05319e82112b687eb4f28d7612
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
fixes: bz#1743652
</pre>
</div>
</content>
</entry>
<entry>
<title>features/utime - fixing a coverity issue</title>
<updated>2019-08-21T14:01:02+00:00</updated>
<author>
<name>Barak Sason</name>
<email>bsasonro@redhat.com</email>
</author>
<published>2019-08-18T08:02:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=5ce3ab86a67f99209dd0c533a9bd2a21bd06ef3d'/>
<id>5ce3ab86a67f99209dd0c533a9bd2a21bd06ef3d</id>
<content type='text'>
-Modified op_errno init value to a non-negative value in order to avoid
using a negative value where it's not allowed.
-In the metod "STACK_UNWIND_STRICT" modified 3rd argument in order to
represnt the correct value to use (changed from -1 to ret).

CID: 1403650
Updates: bz#789278

Change-Id: I608031d5af13832e05e180e746b1b5280b54f559
Signed-off-by: Barak Sason &lt;bsasonro@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
-Modified op_errno init value to a non-negative value in order to avoid
using a negative value where it's not allowed.
-In the metod "STACK_UNWIND_STRICT" modified 3rd argument in order to
represnt the correct value to use (changed from -1 to ret).

CID: 1403650
Updates: bz#789278

Change-Id: I608031d5af13832e05e180e746b1b5280b54f559
Signed-off-by: Barak Sason &lt;bsasonro@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctime: Fix ctime issue with utime family of syscalls</title>
<updated>2019-08-20T16:52:24+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2019-08-08T04:35:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=95f71df31dc73d85df722b0e7d3a7eb1e0237e7f'/>
<id>95f71df31dc73d85df722b0e7d3a7eb1e0237e7f</id>
<content type='text'>
When atime|mtime is updated via utime family of syscalls,
ctime is not updated. This patch fixes the same.

Change-Id: I7f86d8f8a1e06a332c3449b5bbdbf128c9690f25
fixes: bz#1738786
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When atime|mtime is updated via utime family of syscalls,
ctime is not updated. This patch fixes the same.

Change-Id: I7f86d8f8a1e06a332c3449b5bbdbf128c9690f25
fixes: bz#1738786
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/utime: always update ctime at setattr</title>
<updated>2019-08-06T06:05:21+00:00</updated>
<author>
<name>Kinglong Mee</name>
<email>kinglongmee@gmail.com</email>
</author>
<published>2019-08-05T03:08:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=0486821b33b2ece4058a78058f9f3e2f7149d8a7'/>
<id>0486821b33b2ece4058a78058f9f3e2f7149d8a7</id>
<content type='text'>
For the nfs EXCLUSIVE mode create may sets a later time
to mtime (at verifier), it should not set to ctime for
storage.ctime does not allowed set ctime to a earlier time.

 /* Earlier, mdata was updated only if the existing time is less
  * than the time to be updated. This would fail the scenarios
  * where mtime can be set to any time using the syscall. Hence
  * just updating without comparison. But the ctime is not
  * allowed to changed to older date.
  */

According to kernel's setattr, always set ctime at setattr,
and doesnot set ctime from mtime at storage.ctime.

Change-Id: I5cfde6cb7f8939da9617506e3dc80bd840e0d749
fixes: bz#1737288
Signed-off-by: Kinglong Mee &lt;kinglongmee@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For the nfs EXCLUSIVE mode create may sets a later time
to mtime (at verifier), it should not set to ctime for
storage.ctime does not allowed set ctime to a earlier time.

 /* Earlier, mdata was updated only if the existing time is less
  * than the time to be updated. This would fail the scenarios
  * where mtime can be set to any time using the syscall. Hence
  * just updating without comparison. But the ctime is not
  * allowed to changed to older date.
  */

According to kernel's setattr, always set ctime at setattr,
and doesnot set ctime from mtime at storage.ctime.

Change-Id: I5cfde6cb7f8939da9617506e3dc80bd840e0d749
fixes: bz#1737288
Signed-off-by: Kinglong Mee &lt;kinglongmee@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>features/utime: Fix mem_put crash</title>
<updated>2019-07-22T15:29:28+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2019-07-22T15:25:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=8f7112264f76306a12eb29fffc458ef4f657689e'/>
<id>8f7112264f76306a12eb29fffc458ef4f657689e</id>
<content type='text'>
Problem:
When frame-&gt;local is not null FRAME_DESTROY calls mem_put on it.
Since the stub is already destroyed in call_resume(), it leads
to crash

Fix:
Set frame-&gt;local to NULL before calling call_resume()

fixes: bz#1593542
Change-Id: I0f8adf406f4cefdb89d7624ba7a9d9c2eedfb1de
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
When frame-&gt;local is not null FRAME_DESTROY calls mem_put on it.
Since the stub is already destroyed in call_resume(), it leads
to crash

Fix:
Set frame-&gt;local to NULL before calling call_resume()

fixes: bz#1593542
Change-Id: I0f8adf406f4cefdb89d7624ba7a9d9c2eedfb1de
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctime: Set mdata xattr on legacy files</title>
<updated>2019-07-22T06:56:35+00:00</updated>
<author>
<name>Kotresh HR</name>
<email>khiremat@redhat.com</email>
</author>
<published>2019-06-24T07:36:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=06e92a2ee437c1a81c815129b1d188af0b4fa84e'/>
<id>06e92a2ee437c1a81c815129b1d188af0b4fa84e</id>
<content type='text'>
Problem:
The files which were created before ctime enabled would not
have "trusted.glusterfs.mdata"(stores time attributes) xattr.
Upon fops which modifies either ctime or mtime, the xattr
gets created with latest ctime, mtime and atime, which is
incorrect. It should update only the corresponding time
attribute and rest from backend

Solution:
Creating xattr with values from brick is not possible as
each brick of replica set would have different times.
So create the xattr upon successful lookup if the xattr
is not created

Note To Reviewers:
The time attributes used to set xattr is got from successful
lookup. Instead of sending the whole iatt over the wire via
setxattr, a structure called mdata_iatt is sent. The mdata_iatt
contains only time attributes.

Change-Id: I5e535631ddef04195361ae0364336410a2895dd4
fixes: bz#1593542
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
The files which were created before ctime enabled would not
have "trusted.glusterfs.mdata"(stores time attributes) xattr.
Upon fops which modifies either ctime or mtime, the xattr
gets created with latest ctime, mtime and atime, which is
incorrect. It should update only the corresponding time
attribute and rest from backend

Solution:
Creating xattr with values from brick is not possible as
each brick of replica set would have different times.
So create the xattr upon successful lookup if the xattr
is not created

Note To Reviewers:
The time attributes used to set xattr is got from successful
lookup. Instead of sending the whole iatt over the wire via
setxattr, a structure called mdata_iatt is sent. The mdata_iatt
contains only time attributes.

Change-Id: I5e535631ddef04195361ae0364336410a2895dd4
fixes: bz#1593542
Signed-off-by: Kotresh HR &lt;khiremat@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>glusterfs-fops: fix the modularity</title>
<updated>2019-07-02T03:10:19+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amarts@redhat.com</email>
</author>
<published>2019-06-24T13:54:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.gluster.org/cgit/glusterfs.git/commit/?id=cbc234d9ddfb7e2f0089d7ba9d1dd81b0367ba8f'/>
<id>cbc234d9ddfb7e2f0089d7ba9d1dd81b0367ba8f</id>
<content type='text'>
glusterfs-fops.h was moved to rpc/xdr to support compound fops.
(ref: https://review.gluster.org/14032, 2f945b86d3)

This was fine as long as all these header files were in single
include directory after 'install'. With the move to separate out
glusterfs specific header files into another directory inside
/usr/include (ref: https://review.gluster.org/21746, 20ef211cfa),
glusterfs-fops.h file was not in the proper path when an external
.c file tried to include any of glusterfs specific .h file (like
xlator.h).

Now, we have removed compound-fops, with that, none of the enums
declared in glusterfs-fops.h are actually getting used on wire
anymore. Hence, it makes sense to get this to libglusterfs/src
as a single point of definition. With this change, the external
programs can use glusterfs header files.

also remove some enum definitions which are not used in code
anymore.

Updates: bz#1636297
Change-Id: I423c44d3dbe2efc777299c544ece3cb172fc7e44
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
glusterfs-fops.h was moved to rpc/xdr to support compound fops.
(ref: https://review.gluster.org/14032, 2f945b86d3)

This was fine as long as all these header files were in single
include directory after 'install'. With the move to separate out
glusterfs specific header files into another directory inside
/usr/include (ref: https://review.gluster.org/21746, 20ef211cfa),
glusterfs-fops.h file was not in the proper path when an external
.c file tried to include any of glusterfs specific .h file (like
xlator.h).

Now, we have removed compound-fops, with that, none of the enums
declared in glusterfs-fops.h are actually getting used on wire
anymore. Hence, it makes sense to get this to libglusterfs/src
as a single point of definition. With this change, the external
programs can use glusterfs header files.

also remove some enum definitions which are not used in code
anymore.

Updates: bz#1636297
Change-Id: I423c44d3dbe2efc777299c544ece3cb172fc7e44
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
