Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 848259 Details for
Bug 1051226
Wrong atime updates on a file during write() while using vfs glusterfs CIFS interface
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch, with the idea from comment #12
0001-vfs-glusterfs-in-case-atime-is-not-passed-set-it-to-.patch (text/plain), 1.71 KB, created by
Niels de Vos
on 2014-01-10 15:38:39 UTC
(
hide
)
Description:
Proposed patch, with the idea from comment #12
Filename:
MIME Type:
Creator:
Niels de Vos
Created:
2014-01-10 15:38:39 UTC
Size:
1.71 KB
patch
obsolete
>From 2cb32aafa22d814874cae851a582770ae346a3bb Mon Sep 17 00:00:00 2001 >From: Niels de Vos <ndevos@redhat.com> >Date: Fri, 10 Jan 2014 16:26:18 +0100 >Subject: [PATCH] vfs/glusterfs: in case atime is not passed, set it to the mtime > >The Linux CIFS client does not pass an updated atime when a write() is >done. This causes the vfs/glusterfs module to set the atime to -1 on the >Gluster backend, resulting in an atime far in the future (year 2106). > >It is very unfortunate that libgfapi does not have a function that can >be used to only set the mtime (or atime for that matter). > >On the other hand, there is little sense in updating the mtime without >modifying the atime too. The practical solution is to use the mtime for >the atime as well, but only in the case the atime->tv_sec is set to -1. > >Signed-off-by: Niels de Vos <ndevos@redhat.com> >--- > source3/modules/vfs_glusterfs.c | 12 ++++++++++-- > 1 files changed, 10 insertions(+), 2 deletions(-) > >diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c >index 3262f11..3cb7e1d 100644 >--- a/source3/modules/vfs_glusterfs.c >+++ b/source3/modules/vfs_glusterfs.c >@@ -734,8 +734,16 @@ static int vfs_gluster_ntimes(struct vfs_handle_struct *handle, > { > struct timespec times[2]; > >- times[0].tv_sec = ft->atime.tv_sec; >- times[0].tv_nsec = ft->atime.tv_nsec; >+ if (ft->atime.tv_sec != -1) { >+ times[0].tv_sec = ft->atime.tv_sec; >+ times[0].tv_nsec = ft->atime.tv_nsec; >+ } else { >+ /* actually atime should not get set, but there is no glfs_* >+ function that can be used to only set the mtime */ >+ times[0].tv_sec = ft->mtime.tv_sec; >+ times[0].tv_nsec = ft->mtime.tv_nsec; >+ } >+ > times[1].tv_sec = ft->mtime.tv_sec; > times[1].tv_nsec = ft->mtime.tv_nsec; > >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1051226
: 848259