make fuse support writing #743
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#743
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A lot of people want to be able to write to their Tahoe filesystem through FUSE. We currently have [three FUSE interfaces]source:contrib/fuse which (if I understand correctly) are all read-only.
See also #36 (FUSE integration), which I guess is a superset of this ticket.
Note that sshfs does support writing, and [the SFTP frontend]source:src/allmydata/frontends/sftpd.py has partial write support. So we effectively have four FUSE interfaces :-)
I say "partial write support" because it looks as though sftpd.py [will only support opening a file for writing]source:src/allmydata/frontends/sftpd.py?rev=4119#L162 when the flags include both
O_CREAT
andO_TRUNC
(actually the SFTP equivalents,FXF_CREAT | FXF_TRUNC
, but looking at line 2168 here, sshfs does a one-to-one mapping of the POSIX flags to the SFTP ones). It also does not support opening a file read/write (POSIXO_RDWR
).The first restriction could fairly easily be relaxed: if the file does not already exist, then it's unnecessary to require
O_CREAT | O_TRUNC
, because just uploading the whole file as the current code does will do the right thing.If the file does already exist, or to support
O_RDWR
, then we need to download the current contents, and also probably extend the [WriteFile class]source:src/allmydata/frontends/sftpd.py?rev=4119#L38 to implement a more complete read/write abstraction with a seekable file pointer. That's more work, but I don't see any fundamental obstacles.Note that POSIX specifies that a call to the stdio
fopen
function with mode"wb"
or"w"
will open the file as if by a call toopen
with flagsO_WRONLY | O_CREAT | O_TRUNC
. So this is quite a common combination of flags for real-world programs to use.So, should we concentrate on getting write access to work via sshfs and SFTP, or via the blackmatch FUSE implementation? We could do both, but I think that would involve redundant effort, and that the SFTP approach is probably more useful. I don't immediately see any way in which our own FUSE plugin could provide a more successful mapping than via sshfs and SFTP (given that the SFTP protocol is designed to correspond fairly directly to POSIX filesystem APIs).
The improvements to SFTP mentioned in comment:71777 were made as part of the work on #1037. SFTP now has full read/write support which works via sshfs.
Leaving this ticket open for the direct FUSE implementations.
The other FUSE implementations have been removed (#1409).