Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stop setting propagation xattr on new files #1265

Merged
merged 1 commit into from
Oct 21, 2020
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
5 changes: 5 additions & 0 deletions changelog/unreleased/ocis-remove-unnecessary-xattr-magic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bugfix: stop setting propagation xattr on new files

We no longer set the propagation flag on a file because it is only evaluated for folders anyway.

https://github.com/cs3org/reva/pull/1265
16 changes: 0 additions & 16 deletions pkg/storage/fs/ocis/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import (
"github.com/cs3org/reva/pkg/user"
"github.com/google/uuid"
"github.com/pkg/errors"
"github.com/pkg/xattr"
"github.com/rs/zerolog/log"
tusd "github.com/tus/tusd/pkg/handler"
)
Expand Down Expand Up @@ -146,14 +145,6 @@ func (fs *ocisfs) Upload(ctx context.Context, ref *provider.Reference, r io.Read
}
}

if fs.o.TreeTimeAccounting {
// mark the home node as the end of propagation q
if err = xattr.Set(nodePath, propagationAttr, []byte("1")); err != nil {
appctx.GetLogger(ctx).Error().Err(err).Interface("node", n).Msg("could not mark node to propagate")
return
}
}

return fs.tp.Propagate(ctx, n)
}

Expand Down Expand Up @@ -492,13 +483,6 @@ func (upload *fileUpload) FinishUpload(ctx context.Context) (err error) {
if err != nil {
return
}
if upload.fs.o.TreeTimeAccounting {
// mark the home node as the end of propagation q
if err = xattr.Set(targetPath, propagationAttr, []byte("1")); err != nil {
appctx.GetLogger(ctx).Error().Err(err).Interface("node", n).Msg("could not mark node to propagate")
return
}
}

// link child name to parent if it is new
childNameLink := filepath.Join(upload.fs.lu.toInternalPath(n.ParentID), n.Name)
Expand Down