Bug 802391 - [md-cache] atime doesn't get updated after reads
Summary: [md-cache] atime doesn't get updated after reads
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: GlusterFS
Classification: Community
Component: quick-read
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Raghavendra G
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-12 13:00 UTC by Anush Shetty
Modified: 2012-03-16 05:42 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-16 05:08:55 UTC
Regression: ---
Mount Type: fuse
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Anush Shetty 2012-03-12 13:00:57 UTC
Description of problem: On a fuse client, when a file was read immediately after writing into the file, the atime wasn't updating. This issue wasn't seen when md-cache was turned off. The issues was not seen when a sleep interval between the operations was set.


Version-Release number of selected component (if applicable): 3.3.0qa27


How reproducible: Consistently


Steps to Reproduce:
1. echo 'abc' >> " + /mnt/file
2. for i in `seq 100`; do cat /mnt/file; done
3. stat /mnt/file

Actual results:

STAT OUTPUT AFTER WRITES

  File: `/mnt/hello'
  Size: 8               Blocks: 8          IO Block: 131072 regular file
Device: 14h/20d Inode: 12846742335012350422  Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2012-03-12 03:42:53.282306434 -0400
Modify: 2012-03-12 03:42:53.289177283 -0400
Change: 2012-03-12 03:42:53.289177283 -0400



STAT OUTPUT AFTER READS

  File: `/mnt/hello'
  Size: 8               Blocks: 8          IO Block: 131072 regular file
Device: 14h/20d Inode: 12846742335012350422  Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2012-03-12 03:42:53.282306434 -0400
Modify: 2012-03-12 03:42:53.289177283 -0400
Change: 2012-03-12 03:42:53.289177283 -0400


Expected results:

Stat after read should have the updated atime.

Comment 1 Raghavendra G 2012-03-16 05:08:55 UTC
The culprit is not md-cache, but its quick-read. Since reads are served by quick read, reads wont hit backend resulting in non-updation of atime. If this consistency is really required, we can bring an update-atime kind of option (as present in read-ahead, which will update just atime on backend by doing a zero byte read in background) in quick-read too. Closing this bug as of now. Please re-open if its necessary.

Comment 2 Anush Shetty 2012-03-16 05:42:30 UTC
Hi Raghu, all other performance translators were disabled here. Only md-cache was enabled. But with --direct-io-mode=on, it worked as expected.


Note You need to log in before you can comment on or make changes to this bug.