diff options
Diffstat (limited to 'weed/shell/command_volume_mark.go')
| -rw-r--r-- | weed/shell/command_volume_mark.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/shell/command_volume_mark.go b/weed/shell/command_volume_mark.go index 5531f4e3d..7734ea9ce 100644 --- a/weed/shell/command_volume_mark.go +++ b/weed/shell/command_volume_mark.go @@ -29,10 +29,6 @@ func (c *commandVolumeMark) Help() string { func (c *commandVolumeMark) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) { - if err = commandEnv.confirmIsLocked(); err != nil { - return - } - volMarkCommand := flag.NewFlagSet(c.Name(), flag.ContinueOnError) volumeIdInt := volMarkCommand.Int("volumeId", 0, "the volume id") nodeStr := volMarkCommand.String("node", "", "the volume server <host>:<port>") @@ -48,6 +44,10 @@ func (c *commandVolumeMark) Do(args []string, commandEnv *CommandEnv, writer io. markWritable = true } + if err = commandEnv.confirmIsLocked(); err != nil { + return + } + sourceVolumeServer := pb.ServerAddress(*nodeStr) volumeId := needle.VolumeId(*volumeIdInt) |
