bdev, gpt: Add partition_index in gpt_partition_disk
The purpose is to store which partition is used from the original bdev, and it can be used to read the further partition entry info. Change-Id: Idbc4452846e88b486ff281c288704af80938788a Signed-off-by: Ziye Yang <optimistyzy@gmail.com> Reviewed-on: https://review.gerrithub.io/368486 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
e6d053125b
commit
6adaf829c3
@ -63,6 +63,7 @@ struct spdk_gpt_bdev {
|
||||
struct gpt_partition_disk {
|
||||
struct spdk_bdev disk;
|
||||
struct spdk_bdev *base_bdev;
|
||||
uint32_t partition_index;
|
||||
struct spdk_gpt_bdev *gpt_base;
|
||||
uint64_t offset_blocks;
|
||||
uint64_t offset_bytes;
|
||||
@ -358,6 +359,7 @@ vbdev_gpt_create_bdevs(struct spdk_gpt_bdev *gpt_bdev)
|
||||
return -1;
|
||||
}
|
||||
|
||||
d->partition_index = i;
|
||||
d->disk.product_name = "GPT Disk";
|
||||
d->base_bdev = base_bdev;
|
||||
d->offset_bytes = lba_start * gpt->sector_size;
|
||||
|
Loading…
Reference in New Issue
Block a user