Bug #3765
closedrbd cp of a zero sized image succeeds with error
0%
Description
ceph version 0.56-131-gd283abd (d283abdf50b1e4429b775680bfae1bb20c75306b)
while am still surprised about why we need a rbd image of size zero, it allows me to copy the image but throws an inappropriate message "rbd: copy failed: (22) Invalid argument".
Please find below the CLI screenshot,
ubuntu@burnupi24:/var/log/ceph$ rbd create tam --size 0
ubuntu@burnupi24:/var/log/ceph$ rbd ls
tam
ubuntu@burnupi24:/var/log/ceph$ rbd cp tam tamm
Image copy: 100% complete...done.
rbd: copy failed: (22) Invalid argument
ubuntu@burnupi24:/var/log/ceph$ rbd ls
tam
tamm
Updated by Dan Mick over 11 years ago
I looked into this; it happens because clip_io() (called from read_iterate()) tries to validate
that writing at offset 0 is not beyond the image size of 0. Doh. I suppose we could
special-case "len == 0".
Updated by Dan Mick over 11 years ago
Fixed, test added, in master:
commit:00898c1860e8ae95b5219257d1635b15ccdce5c1