Comments (6)
I have a (mostly untested) implementation in the at
branch, would you mind testing it a bit on your end ?
from rewritefs.
hi sloonz, I also developed this feature a while ago - sorry i have not uploaded it earlier. see my branch @development/overmount. I and my family is using this version for 3 months to accelerate web browser (Vivaldi), ~/.config/vivaldi
is overmounted on itself and sqlite journal files are redirected to memory fs. I have not noticed any glitch: no mem-leak, no hanging syscalls.
There are more changes on my branch, but the one in this scope is commit 12c12c3.
My approach operates not with openat()
family functions, but (1) chdir to orig_fs
and (2) access files by relative path. Because the programm does not chdir elsewhere, the cwd serves like orig_fd
in your code. I'm not sure which is the better. Yours is more explicite. Mine saves a few calls in rewrite_opendir
, rewrite_truncate
, rewrite_statfs
(poorly we dont have opendirat()
in std lib).
I also removed the constraint which prohibits config file to be under orig_fs
(recursion loop is avoided by the relative-path feature).
from rewritefs.
rewrite_chown()
:
fchownat()
with flags=0 dereferences synlinks, howerver the replaced lchown()
does not.
I suggest AT_SYMLINK_NOFOLLOW
.
the same for rewrite_setxattr()
and rewrite_getxattr()
and rewrite_listxattr()
and rewrite_removexattr()
:
suggest openat(..., O_RDONLY | O_NOFOLLOW)
to operate on symlinks like lsetxattr()
(and lgetxattr()
and llistxattr()
and lremovexattr()
) did.
from rewritefs.
Good catch on chown/chmod
For *xattr unfortunately there's no way to do that AFAIK. O_NOFOLLOW on openat does not do what you think, it just returns an error if the target is a symlink.
Your chdir approach can't work with FUSE 3 : libfuse chdir into / at the end of the initialization process.
Iām going to merge autocreate/at*/abmalloc into develop, do some more polishing today, and let it run on my machine for a few days (maybe weeks) before merging into master again.
from rewritefs.
hi @sloonz
-
afaik
chmod
is not affected as there is nolchmod
-
regarding to
*xattr
, IMO it should be disallowed on symlinks in order to preserve semantics. (eg. let's doO_NOFOLLOW
and return error if it fails) -
chdir-approach
-
what do you think, does it worth to workaround fuse3 limitation, so do chdir on the first actual call to rewritefs instead to before libfuse initialization? rece condition may be avoided by saving cwd before libfuse and
fchdir
into it later. -
my chdir-approach indeed works only in foreground mode
-
-
note, auto_mkdir feature (239d802) is not thought through well by me; i committed it to the overmount branch only by lazyness; I'm not fully sure is it a good idea or is it implemented well.
thanks for consideration
from rewritefs.
Merged in master
from rewritefs.
Related Issues (12)
- rewritefs does not work [with default configs]. HOT 3
- New files are created owned by root HOT 1
- Stuck on .ICEauthority HOT 2
- SIGSEGV HOT 27
- Documentation: a small problem HOT 1
- Documentation: add performance overhead estimates HOT 2
- memory management HOT 1
- /g flag HOT 4
- ulockmgr not available in fuse3 HOT 1
- Issue regarding OFD locking HOT 2
- [FEATURE REQUEST] Multiple rewritten paths per rule HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rewritefs.