Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Changelog for NeoFS Node

### Added
- Online FSTree layout reshaping via the `blobstor.allow_depth_change` configuration option (#4149, #4179)
- SN now serves `ReplicateV2` API (#4168, #4164)
- SN now serves `ReplicateV2` API (#4168, #4164, #4201)
- Container SN now uses `ReplicateV2` API in PUT handler when available (#4168, #4196)
- `neofs-adm fschain netmap` command to fetch current and historical network maps (#4181)
- Container revisions support (#4183, #4195, #4197)
Expand Down
11 changes: 7 additions & 4 deletions pkg/local_object_storage/blobstor/fstree/fstree_write_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ func (x *linuxFileWriteStream) Close() error {
}
fd := x.fd
x.fd = -1
if err := unix.Fdatasync(fd); err != nil {
return convertLinuxError(err)
}
err := linuxLinkatAndClose(fd, x.targetPath)
return convertLinuxError(err)
}
Expand All @@ -238,7 +241,7 @@ func (x *linuxFileWriteStream) abort() {
}

func (w *linuxWriter) initWriteData(filePath string) (io.WriteCloser, func(), error) {
fd, err := w.openFile()
fd, err := w.openFile(w.bFlags)
if err != nil {
return nil, nil, convertLinuxError(err)
}
Expand Down Expand Up @@ -299,7 +302,7 @@ func (w *linuxWriter) writeCombinedFile(id oid.ID, p string, data []byte) error
}

func (w *linuxWriter) writeFile(p string, data []byte) error {
fd, err := w.openFile()
fd, err := w.openFile(w.flags)
if err != nil {
return err
}
Expand All @@ -310,8 +313,8 @@ func (w *linuxWriter) writeFile(p string, data []byte) error {
return linuxLinkatAndClose(fd, p)
}

func (w *linuxWriter) openFile() (int, error) {
fd, err := unix.Open(w.root, w.flags, w.perm)
func (w *linuxWriter) openFile(mode int) (int, error) {
fd, err := unix.Open(w.root, mode, w.perm)
if err != nil {
return 0, fmt.Errorf("unix open: %w", err)
}
Expand Down
Loading