Project

General

Profile

Actions

Bug #3688

closed

rbd allows image of size 0 to be created

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

Status:
Won't Fix
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.55.1-360-g6356739 (635673928a6b4dae6d4712cacad81cbac6412dc3)

rbd allows images created with zero size. While trying to create images with inappropriate values[like -1], the error message "rbd: size must be >= 0" thrown is misleading. It should be "rbd: size must be > 0".

Same applies to rbd images created with --new-format tag

ubuntu@burnupi15:~$ rbd create image --size 0
ubuntu@burnupi15:~$ rbd info image
rbd image 'image':
size 0 bytes in 0 objects
order 22 (4096 KB objects)
block_name_prefix: rb.0.1276.6b8b4567
format: 1
ubuntu@burnupi15:~$ rbd create image_neg --size -1
rbd: size must be >= 0
ubuntu@burnupi15:~$ rbd create imgg --size 0 --new-format
ubuntu@burnupi15:~$ rbd info imgg
rbd image 'imgg':
size 0 bytes in 0 objects
order 22 (4096 KB objects)
block_name_prefix: rbd_data.12456b8b4567
format: 2
features: layering, striping
stripe unit: 4096 KB
stripe count: 1

Actions #1

Updated by Dan Mick over 11 years ago

  • Subject changed from rbd allows image of size 0 to be created to rbd: size 0 is legal, error message should say so
Actions #2

Updated by Dan Mick over 11 years ago

  • Subject changed from rbd: size 0 is legal, error message should say so to rbd allows image of size 0 to be created
Actions #3

Updated by Dan Mick over 11 years ago

  • Status changed from New to Won't Fix

I claim that zero-sized images are legal, if not particularly useful in that size...but one might well want to create an image and then open it in a subsequent step to resize it to the desired size; there's no reason to disallow this.

Actions

Also available in: Atom PDF