New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rbd-fuse: implement mv operation #6938
Conversation
implement mv operation for rbd-fuse to rename image. Signed-off-by: Xiangwei Wu wuxiangwei@h3c.com
@wuxiangwei Can you add some validation for the destination image name? It shouldn't be blank and shouldn't contain "/" nor "@" characters. |
add validation for destination image name to avoid image name contains invalid characters, such as "/" and "@". Signed-off-by: Xiangwei Wu wuxiangwei@h3c.com
@dillaman i have add validation for destination image name, please take a look. thank you. |
int rbdfs_rename(const char *path, const char *destname) | ||
{ | ||
const char *srcname = NULL; | ||
const char *extra[] = {" ", "@", "/"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is any restriction for spaces in the image name -- at least the rbd CLI doesn't restrict it.
discard space restriction for destination image name of the mv operation. Signed-off-by: Xiangwei Wu wuxiangwei@h3c.com
@dillaman hi, i have remove the restriction for spaces in the image name , please check again, thank you . |
rbd-fuse: implement mv operation Reviewed-by: Jason Dillaman <dillaman@redhat.com>
implement mv operation for rbd-fuse to rename image.
Signed-off-by: Xiangwei Wu wuxiangwei@h3c.com