Project

General

Profile

Actions

Bug #3765

closed

rbd cp of a zero sized image succeeds with error

Added by Tamilarasi muthamizhan over 11 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Q/A
Tags:
Backport:
Regression:
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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

Actions #1

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".

Actions #2

Updated by Ian Colle over 11 years ago

  • Assignee set to Dan Mick
Actions #3

Updated by Dan Mick over 11 years ago

  • Status changed from New to 12
Actions #4

Updated by Dan Mick over 11 years ago

Fixed, test added, in master:

commit:00898c1860e8ae95b5219257d1635b15ccdce5c1

Actions #5

Updated by Dan Mick over 11 years ago

  • Status changed from 12 to Resolved
Actions

Also available in: Atom PDF