Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With attr_timeout all files are empty at first read #192

Closed
mitrandir77 opened this issue Jan 29, 2015 · 4 comments
Assignees
Milestone

Comments

@mitrandir77
Copy link

@mitrandir77 mitrandir77 commented Jan 29, 2015

Before first read of the file stat always returns all-zero structure which is resulting in all files having size 0 in the first read. After first read of a file everything works just fine for it.

The problems seems to be a problem with att_timeout . When it's off on stat fuse is making two calls to getattr and stat syscall is returning correct numbers. For example:
$ stat -r file
1291845653 7 0100555 0 0 0 0 37344190 0 0 0 0 65536 72944 4294967295 file

When it's on only one call to getattr is done and stat syscall is returning almost all-zero stuct:
$ stat -r file
1325400088 0 0100000 0 0 0 0 0 0 0 0 0 0 0 0 file

The bug appeared in version of 2.7.3 of the kernel module. Version 2.7.2 works just fine.

@bfleischer

This comment has been minimized.

Copy link
Member

@bfleischer bfleischer commented Jan 29, 2015

Which file system are you observing the issue with? Are you by any chance using mount-time option noubcor nolocalcaches?

@mitrandir77

This comment has been minimized.

Copy link
Author

@mitrandir77 mitrandir77 commented Jan 29, 2015

I'm using proprietary filesystem written in D (it's using dfuse bindings to connect with fuse https://github.com/facebook/dfuse ).

My options are:
allow_other,negative_timeout=99999999,entry_timeout=99999999,attr_timeout=99999999,ac_attr_timeout=99999999,kernel_cache,noappledouble,noapplexattr,nobrowse

@bfleischer bfleischer self-assigned this Jan 29, 2015
@bfleischer bfleischer added this to the 2.7.5 milestone Jan 29, 2015
@bfleischer

This comment has been minimized.

Copy link
Member

@bfleischer bfleischer commented Jan 30, 2015

Thanks! I have fixed a bug that is most likely responsible for the observed getattr issue in osxfuse 2.7.3 and 2.7.4. It would be great if you could test the following osxfuse build and confirm that the issue is indeed gone: http://sourceforge.net/projects/osxfuse/files/osxfuse-2.7.5/osxfuse-2.7.5.dmg/download

@mitrandir77

This comment has been minimized.

Copy link
Author

@mitrandir77 mitrandir77 commented Jan 30, 2015

Everything works as expected. Thank you! :)

bfleischer added a commit to osxfuse/kext that referenced this issue Jan 30, 2015
When creating a vnode its cached attributes are not initialized,
therefore the vnode's attr_valid field should be zero instead of
attr_timout.

Tracked as issue #192: osxfuse/osxfuse#192
bfleischer added a commit to osxfuse/kext that referenced this issue Feb 1, 2015
When creating a vnode its cached attributes are not initialized,
therefore the vnode's attr_valid field should be zero instead of
attr_timeout.

See osxfuse/osxfuse#192 for details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.