Skip to content
This repository was archived by the owner on Jul 8, 2024. It is now read-only.

Commit 95cb9ca

Browse files
authored
Merge pull request #75 from github/xattrs-nonblock-noread
Avoid blocking or failing when attempting to project files
2 parents b1fe577 + 3f46d0e commit 95cb9ca

File tree

8 files changed

+230
-37
lines changed

8 files changed

+230
-37
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/configure
1111
/depcomp
1212
/include/config.h
13-
/include/config.h.in
13+
/include/config.h.in*
1414
/include/stamp-h*
1515
/install-sh
1616
/lib/.dirstamp

docs/design.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,22 @@ instead of in kernel mode.
512512

513513
![Diagram of phase 1 of the Linux implementation](images/phase1.png)
514514

515+
One caveat with the use of a user-space filesystem is the requirement
516+
of user read and write file permissions in order to check and update
517+
the extended attributes which maintain the projection state of a given
518+
file or directory.
519+
520+
Whereas an in-kernel implementation may read and set attributes in
521+
the `trusted.*` namespace, and do so at will, a user-space filesystem
522+
is restricted to the use of the `user.*` extended attribute namespace,
523+
and, further, can only read and change attributes as allowed by the file
524+
permission modes of a given inode. Thus in order to test whether
525+
a given file or directory is a placeholder, the user must have read
526+
permission, so a write-only file mode like `0222` can not be permitted.
527+
And user write permissions must be assigned to any read-only files or
528+
directories, at least temporarily, in order to convert them from the
529+
placeholder state to another (i.e., hydrated or full).
530+
515531
### Phase 2 – Hybrid
516532

517533
The second development phase adds an in-kernel projfs module which, at first,

include/projfs.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@
3131

3232
#include "projfs_notify.h"
3333

34-
// TODO: remove when not needed
35-
#define FUSE_USE_VERSION 32
36-
#include <fuse3/fuse_lowlevel.h>
37-
3834
#ifdef __cplusplus
3935
extern "C" {
4036
#endif

0 commit comments

Comments
 (0)