Skip to content
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-nbd: don't map an image with size 0. #14084

Closed
wants to merge 1 commit into from
Closed

rbd-nbd: don't map an image with size 0. #14084

wants to merge 1 commit into from

Conversation

liupan1111
Copy link
Contributor

Fixes: http://tracker.ceph.com/issues/19347
Signed-off-by: Pan Liu <liupan1111@gmail.com>
@liupan1111
Copy link
Contributor Author

@trociny a new bug fix.

@trociny
Copy link
Contributor

trociny commented Mar 22, 2017

@liupan1111 I am not sure that just because lsblk skips 0 size devices we should disallow mapping for 0 size images.

Note, later you may do rbd resize and then lsblk will be happy.

Or vice versa, you can successfully map a non-zero image and then shrink it to zero. (BTW, that is why I was not very happy with size check we added recently -- we can check the size on start, but we can't do anything from preventing a user to insanely change the size later).

@dillaman what do you think?

@dillaman
Copy link

@trociny @liupan1111 Honestly -- if it doesn't crash, I really would prefer to not worry about cases like this. We support creating zero byte images for the fact that we need to provide a limit and "how small is too small?".

@liupan1111
Copy link
Contributor Author

@trociny @dillaman I agree, I will close this pr, thanks.

@liupan1111 liupan1111 closed this Mar 23, 2017
@liupan1111 liupan1111 deleted the wip-fix-zero-image branch March 23, 2017 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants