Antonio SJ Musumeci
2017-05-03 17:18:33 UTC
I've a union filesystem and I'm looking at providing a bit of a hack in
order to (optionally) improve read speeds given Nikhilesh Reddy's
passthrough patch seems unlikely to get merged.
The idea is that getattr will lstat the underlying file and if it meets
some requirement (not a directory, readonly, etc.) then it modifies st_mode
to indicate its a symlink rather than it's original type and then on
readlink it can return the path to the original file.
The problem appears to be that if I change the type while the file is being
used it will cause the vfs to error out.
Is there any way, with the high level API, to work around this outside
keeping track of which files are currently in use? Any ideas on improving
performance otherwise?
order to (optionally) improve read speeds given Nikhilesh Reddy's
passthrough patch seems unlikely to get merged.
The idea is that getattr will lstat the underlying file and if it meets
some requirement (not a directory, readonly, etc.) then it modifies st_mode
to indicate its a symlink rather than it's original type and then on
readlink it can return the path to the original file.
The problem appears to be that if I change the type while the file is being
used it will cause the vfs to error out.
Is there any way, with the high level API, to work around this outside
keeping track of which files are currently in use? Any ideas on improving
performance otherwise?