Bug #15248
Flag is showing "flags: object map invalid", after enabling object map on an exclusive lock enabled Image
0%
Description
1. Create a Image
sudo rbd create Tanay-RBD/new4 --size 10240G --image-format 2 --image-feature exclusive-lock
2. sudo rbd -p Tanay-RBD --image new4 info
rbd image 'new4':
size 10240 GB in 2621440 objects
order 22 (4096 kB objects)
block_name_prefix: rbd_data.13df238e1f29
format: 2
features: exclusive-lock
flags:
3. sudo rbd feature enable Tanay-RBD/new4 object-map
4. sudo rbd -p Tanay-RBD --image new4 info
rbd image 'new4':
size 10240 GB in 2621440 objects
order 22 (4096 kB objects)
block_name_prefix: rbd_data.13df238e1f29
format: 2
features: exclusive-lock, object-map
flags: object map invalid
sudo ceph -v
ceph version 10.0.5-2705-g294b7b7 (294b7b7b1475080cf776b5b3202423cf1c76cd46)
History
#1 Updated by Jason Dillaman almost 7 years ago
- Status changed from New to Rejected
This is expected behavior -- when you enable object map on a pre-existing image, the object map is in fact invalid. You need to rebuild the object map after you dynamically enable it.
#2 Updated by Rohith Radhakrishnan almost 7 years ago
Jason Dillaman wrote:
This is expected behavior -- when you enable object map on a pre-existing image, the object map is in fact invalid. You need to rebuild the object map after you dynamically enable it.
@Jason
Does this explanation hold good for the fast-diff feature too? Because I am noticing the same behavior of flags becoming invalid on re-enabling fast-diff
#3 Updated by Jason Dillaman almost 7 years ago
@Rohith: yes, fast-diff follows the same rationale. The fast-diff feature is an extension to the object-map that uses spare bits in the map to encode that the object exists but is the same as the previous snapshot (i.e. no copy-on-write). In a perfect world the the features would be combined into a single feature, but since they were introduced in different releases, it will take a little time to safely phase in.