[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gluster-devel] [PATCH] vfs/glusterfs: in case atime is not passed, set
From: |
Niels de Vos |
Subject: |
[Gluster-devel] [PATCH] vfs/glusterfs: in case atime is not passed, set it to the mtime |
Date: |
Mon, 13 Jan 2014 11:26:42 +0100 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
Hello,
we were informed that when using Samba+vfs_glusterfs a normal 'write' to
a file does not correctly set the 'atime'. In fact, the 'atime' is set
to "2106-02-07 11:58:15.000000000 +0530" according to 'stat'.
Tracing the network and checking the SMB/SET_FILE_INFO shows that the
Linux CIFS client sends the following date:
- May 28, 60056 07:36:10.955161500 CEST
This date, in fact, shows as 0xffffffff (32-bit -1) in the packet
capture. The Linux CIFS client sets NO_CHANGE_64 (0xffffffffffffffff,
64-bit -1) when it intends to not modify the 'atime' (fs/cifs/inode.c).
Debugging the Samba/vfs_glusterfs module with systemtap, showed that the
'write' that triggers the unexpected 'atime', indeed gets forwarded to
the GlusterFS volume as -1. Obviously, Samba passes a -1 for the 'atime'
when it should not get modified. Unfortunately the gfapi library does
not expose a function to set the 'mtime' only, it is always needed to
set the 'atime' as well (like 'utimes()').
The attached patch fixes setting the 'atime' to a value way in the
future. It resolves to setting the 'atime' to the same value as the
'mtime', whenever the 'atime' is set to -1.
Downstream bug report and detailed results of the debugging:
- https://bugzilla.redhat.com/1051226
Thanks,
Niels
vfs-glusterfs-in-case-atime-is-not-passed-set-it-to-mtime.patch
Description: Text document
- [Gluster-devel] [PATCH] vfs/glusterfs: in case atime is not passed, set it to the mtime,
Niels de Vos <=