diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-09-13 22:13:34 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-09-13 22:13:34 -0700 |
| commit | 119d5908dd52b159c275bad10007daaf62188df0 (patch) | |
| tree | 3467183cb6cc5c832fedd1519fe3dcb377aa5f25 /weed/shell/command_volume_fsck.go | |
| parent | 7504be58f9fc7683869e164bc710b3e83da12e2f (diff) | |
| download | seaweedfs-119d5908dd52b159c275bad10007daaf62188df0.tar.xz seaweedfs-119d5908dd52b159c275bad10007daaf62188df0.zip | |
shell: do not need to lock to see volume -h
Diffstat (limited to 'weed/shell/command_volume_fsck.go')
| -rw-r--r-- | weed/shell/command_volume_fsck.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/shell/command_volume_fsck.go b/weed/shell/command_volume_fsck.go index a2c3e9fd6..ce5ea66bf 100644 --- a/weed/shell/command_volume_fsck.go +++ b/weed/shell/command_volume_fsck.go @@ -58,10 +58,6 @@ func (c *commandVolumeFsck) Help() string { func (c *commandVolumeFsck) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) { - if err = commandEnv.confirmIsLocked(); err != nil { - return - } - fsckCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError) verbose := fsckCommand.Bool("v", false, "verbose mode") findMissingChunksInFiler := fsckCommand.Bool("findMissingChunksInFiler", false, "see \"help volume.fsck\"") @@ -71,6 +67,10 @@ func (c *commandVolumeFsck) Do(args []string, commandEnv *CommandEnv, writer io. return nil } + if err = commandEnv.confirmIsLocked(); err != nil { + return + } + c.env = commandEnv // create a temp folder |
