xiongxu / s3fs

Automatically exported from code.google.com/p/s3fs
GNU General Public License v2.0
0 stars 0 forks source link

Changing file permissions should invalidate local stat cache #154

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
After adding another test case for file permissions I noticed a bug in the 
local stat cache. If file permissions are changed, the cache is not invalidated:

$ touch foo
$ stat foo
  File: `foo'
  Size: 0               Blocks: 1          IO Block: 4096   regular empty file
Device: 13h/19d Inode: 3           Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 1969-12-31 17:00:00.000000000 -0700
Modify: 2011-02-10 09:21:35.000000000 -0700
Change: 1969-12-31 17:00:00.000000000 -0700

$ chmod 777 foo
$ stat foo
  File: `foo'
  Size: 0               Blocks: 1          IO Block: 4096   regular empty file
Device: 13h/19d Inode: 3           Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 1969-12-31 17:00:00.000000000 -0700
Modify: 2011-02-10 09:21:35.000000000 -0700
Change: 1969-12-31 17:00:00.000000000 -0700

When updating the file permissions s3fs should invalidate the associated entry 
in the stat cache.

Attached is a patch against r310 which fixes the issue and adds another "make 
check" test.

Original issue reported on code.google.com by ben.lema...@gmail.com on 10 Feb 2011 at 4:33

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r311.

Original comment by dmoore4...@gmail.com on 11 Feb 2011 at 3:30