SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
refactor
Chris Lu63c84584bb04
diff --git a/weed/shell/command_remote_mount.go b/weed/shell/command_remote_mount.goindex 8ac30f70d7..6a292e3aa4 100644--- a/weed/shell/command_remote_mount.go+++ b/weed/shell/command_remote_mount.go@@ -79,7 +79,7 @@ func (c *commandRemoteMount) Do(args []string, commandEnv *CommandEnv, writer io}// store a mount configuration in filer- if err = c.saveMountMapping(commandEnv, writer, *dir, remoteStorageLocation); err != nil {+ if err = c.saveMountMapping(commandEnv, *dir, remoteStorageLocation); err != nil {return fmt.Errorf("save mount mapping: %v", err)}@@ -177,11 +177,11 @@ func (c *commandRemoteMount) syncMetadata(commandEnv *CommandEnv, writer io.Writreturn nil}-func (c *commandRemoteMount) saveMountMapping(commandEnv *CommandEnv, writer io.Writer, dir string, remoteStorageLocation *remote_pb.RemoteStorageLocation) (err error) {+func (c *commandRemoteMount) saveMountMapping(filerClient filer_pb.FilerClient, dir string, remoteStorageLocation *remote_pb.RemoteStorageLocation) (err error) {// read current mappingvar oldContent, newContent []byte- err = commandEnv.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {+ err = filerClient.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {oldContent, err = filer.ReadInsideFiler(client, filer.DirectoryEtcRemote, filer.REMOTE_STORAGE_MOUNT_FILE)return err})@@ -198,7 +198,7 @@ func (c *commandRemoteMount) saveMountMapping(commandEnv *CommandEnv, writer io.}// save back- err = commandEnv.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {+ err = filerClient.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {return filer.SaveInsideFiler(client, filer.DirectoryEtcRemote, filer.REMOTE_STORAGE_MOUNT_FILE, newContent)})if err != nil {