Skip to content

Commit

Permalink
stop setting propagation xattr on new files (#1265)
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic authored Oct 21, 2020
1 parent dc400f8 commit 8fb9093
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
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

0 comments on commit 8fb9093

Please sign in to comment.