mirror of
https://github.com/versity/versitygw.git
synced 2026-09-07 08:36:54 +00:00
feat: add noarchive to scoutfs part files
The part files for multipart uploads are considered temporary files and should not be archived by default. This adds the noarchive attribute to the part files to prevent scoutam from trying to archive these. There is a new parameter, disablenoarchive, that will prevent adding the noarchive attribute to these files for the case where there is a desire to archive these temp files.
This commit is contained in:
@@ -24,7 +24,8 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
glacier bool
|
||||
glacier bool
|
||||
disableNoArchive bool
|
||||
)
|
||||
|
||||
func scoutfsCommand() *cli.Command {
|
||||
@@ -79,6 +80,12 @@ move interfaces as well as support for tiered filesystems.`,
|
||||
DefaultText: "0755",
|
||||
Value: 0755,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "disable-noarchive",
|
||||
Usage: "disable setting noarchive for multipart part uploads",
|
||||
EnvVars: []string{"VGW_DISABLE_NOARCHIVE"},
|
||||
Destination: &disableNoArchive,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -98,6 +105,7 @@ func runScoutfs(ctx *cli.Context) error {
|
||||
opts.ChownGID = chowngid
|
||||
opts.BucketLinks = bucketlinks
|
||||
opts.NewDirPerm = fs.FileMode(dirPerms)
|
||||
opts.DisableNoArchive = disableNoArchive
|
||||
|
||||
be, err := scoutfs.New(ctx.Args().Get(0), opts)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user