Modifying BDRVVmdkState
The new state structure looks like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
The difference is that fields in VmdkExtent are moved out from state structure and form a new structure VmdkExtent, which represents one extent in a vmdk disk. BDRVVmdkState.extents points to an array of VmdkExtent, with size of extent_size.
It’s the fundamental change for the support of multiple extents of vmdk. When opening image, descriptor file is parsed and extents lines are read to build an array of extents. I.e. if it’s monolithic, array with one item is created, if 2GB multi extents, array with multiple items is created. Each extent holds the file path and type, according to which proper r/w operations are taken. Not all fields in VmdkExtent are used all the time, e.g. for flat extents the lookup table related fields are just ignored.
Soon I’ll add flat extent support upon these structures and migrate the original mono-sparse support to it.