shell: do not need to lock to see volume -h

This commit is contained in:
Chris Lu
2021-09-13 22:13:34 -07:00
parent 7504be58f9
commit 119d5908dd
23 changed files with 92 additions and 93 deletions

View File

@@ -42,10 +42,6 @@ func (c *commandVolumeCheckDisk) Help() string {
func (c *commandVolumeCheckDisk) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
if err = commandEnv.confirmIsLocked(); err != nil {
return
}
fsckCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError)
slowMode := fsckCommand.Bool("slow", false, "slow mode checks all replicas even file counts are the same")
verbose := fsckCommand.Bool("v", false, "verbose mode")
@@ -55,6 +51,10 @@ func (c *commandVolumeCheckDisk) Do(args []string, commandEnv *CommandEnv, write
return nil
}
if err = commandEnv.confirmIsLocked(); err != nil {
return
}
c.env = commandEnv
// collect topology information