Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Cleaner append mode handling
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Lucas <xavier.lucas@corp.ovh.com>
  • Loading branch information
Xavier Lucas committed Feb 17, 2016
1 parent cab2e8a commit 2c8e231
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ As the development goes, features are added one after another. For the moment th
* SVFS structure and node attributes are cached as you access them and eviction only occurs on write or remove operations.
* SVFS does not handle kernel cache invalidation, thus file attributes may appear stale if file content changed.
* SVFS container creation and removal is not supported.
* SVFS does not support opening a file in append mode.
* SVFS does not support uploading SLO/DLO objects and may show erroneous file size of 0 (manifest file).

SVFS limitations and particularities of using Openstack Swift as a POSIX filesystem are discussed in the [docs](docs).
Expand Down
5 changes: 4 additions & 1 deletion svfs/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ func (o *Object) open(mode fuse.OpenFlags) (oh *ObjectHandle, err error) {
t: o,
}

// Modes
// Append mode is not supported
if mode&fuse.OpenAppend == fuse.OpenAppend {
return nil, fuse.ENOTSUP
}
if mode.IsReadOnly() {
oh.r, _, err = o.s.ObjectOpen(o.c.Name, o.so.Name, false, nil)
return oh, err
Expand Down

0 comments on commit 2c8e231

Please sign in to comment.