Skip to contentSkip to conversation

block: Remove unused s->hd in various drivers

PATCH In review Kevin Wolf 3 participants 3 messages Nov 16, 2010 Block layer

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

PATCH 1/1 block: Remove unused s->hd in various drivers

All drivers use bs->file instead of s->hd fpr quite a while now, so it's time to remove s->hd.

---
 block/qcow.c  |    1 -
 block/qcow2.h |    1 -
 block/vdi.c   |    1 -
 block/vmdk.c  |    1 -
 block/vpc.c   |    2 --
 5 files changed, 0 insertions(+), 6 deletions(-)
block/qcow.c +0 -1
index 9cd547d..f67d3d3 100644
@@ -54,7 +54,6 @@ typedef struct QCowHeader {
 #define L2_CACHE_SIZE 16
 
 typedef struct BDRVQcowState {
-    BlockDriverState *hd;
     int cluster_bits;
     int cluster_size;
     int cluster_sectors;
block/qcow2.h +0 -1
index 2d22e5e..5217bea 100644
@@ -79,7 +79,6 @@ typedef struct QCowSnapshot {
 } QCowSnapshot;
 
 typedef struct BDRVQcowState {
-    BlockDriverState *hd;
     int cluster_bits;
     int cluster_size;
     int cluster_sectors;
block/vdi.c +0 -1
index 3b51e53..ab8f70f 100644
@@ -186,7 +186,6 @@ typedef struct {
 } VdiHeader;
 
 typedef struct {
-    BlockDriverState *hd;
     /* The block map entries are little endian (even in memory). */
     uint32_t *bmap;
     /* Size of block (bytes). */
block/vmdk.c +0 -1
index f505303..2298a75 100644
@@ -61,7 +61,6 @@ typedef struct {
 #define L2_CACHE_SIZE 16
 
 typedef struct BDRVVmdkState {
-    BlockDriverState *hd;
     int64_t l1_table_offset;
     int64_t l1_backup_table_offset;
     uint32_t *l1_table;
block/vpc.c +0 -2
index 416f489..21e2a68 100644
@@ -110,8 +110,6 @@ struct vhd_dyndisk_header {
 };
 
 typedef struct BDRVVPCState {
-    BlockDriverState *hd;
-
     uint8_t footer_buf[HEADER_SIZE];
     uint64_t free_data_block_offset;
     int max_table_entries;
Signature · 1 line
1.7.2.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Kevin Wolf

All drivers use bs->file instead of s->hd fpr quite a while now, so it's time to remove s->hd.

---
 block/qcow.c  |    1 -
 block/qcow2.h |    1 -

 block/vdi.c   |    1 -
 block/vmdk.c  |    1 -
 block/vpc.c   |    2 --
 5 files changed, 0 insertions(+), 6 deletions(-)