Compare commits
	
		
			5 Commits
		
	
	
		
			v7.1.0-rc2
			...
			rm-protoco
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 6321d78dc5 | ||
|  | a0974f99aa | ||
|  | 42883c01bf | ||
|  | 7966c2b312 | ||
|  | 5888011244 | 
| @@ -129,10 +129,9 @@ static int coroutine_fn blkreplay_co_flush(BlockDriverState *bs) | |||||||
|  |  | ||||||
| static BlockDriver bdrv_blkreplay = { | static BlockDriver bdrv_blkreplay = { | ||||||
|     .format_name            = "blkreplay", |     .format_name            = "blkreplay", | ||||||
|     .protocol_name          = "blkreplay", |  | ||||||
|     .instance_size          = 0, |     .instance_size          = 0, | ||||||
|  |  | ||||||
|     .bdrv_file_open         = blkreplay_open, |     .bdrv_open              = blkreplay_open, | ||||||
|     .bdrv_close             = blkreplay_close, |     .bdrv_close             = blkreplay_close, | ||||||
|     .bdrv_child_perm        = bdrv_filter_default_perms, |     .bdrv_child_perm        = bdrv_filter_default_perms, | ||||||
|     .bdrv_getlength         = blkreplay_getlength, |     .bdrv_getlength         = blkreplay_getlength, | ||||||
|   | |||||||
| @@ -1098,11 +1098,10 @@ static void quorum_refresh_filename(BlockDriverState *bs, QDict *options) | |||||||
|  |  | ||||||
| static BlockDriver bdrv_quorum = { | static BlockDriver bdrv_quorum = { | ||||||
|     .format_name                        = "quorum", |     .format_name                        = "quorum", | ||||||
|     .protocol_name                      = "quorum", |  | ||||||
|  |  | ||||||
|     .instance_size                      = sizeof(BDRVQuorumState), |     .instance_size                      = sizeof(BDRVQuorumState), | ||||||
|  |  | ||||||
|     .bdrv_file_open                     = quorum_open, |     .bdrv_open                          = quorum_open, | ||||||
|     .bdrv_close                         = quorum_close, |     .bdrv_close                         = quorum_close, | ||||||
|     .bdrv_refresh_filename              = quorum_refresh_filename, |     .bdrv_refresh_filename              = quorum_refresh_filename, | ||||||
|  |  | ||||||
|   | |||||||
| @@ -703,7 +703,6 @@ static void replication_stop(ReplicationState *rs, bool failover, Error **errp) | |||||||
|  |  | ||||||
| BlockDriver bdrv_replication = { | BlockDriver bdrv_replication = { | ||||||
|     .format_name                = "replication", |     .format_name                = "replication", | ||||||
|     .protocol_name              = "replication", |  | ||||||
|     .instance_size              = sizeof(BDRVReplicationState), |     .instance_size              = sizeof(BDRVReplicationState), | ||||||
|  |  | ||||||
|     .bdrv_open                  = replication_open, |     .bdrv_open                  = replication_open, | ||||||
|   | |||||||
| @@ -215,10 +215,9 @@ static void coroutine_fn throttle_co_drain_end(BlockDriverState *bs) | |||||||
|  |  | ||||||
| static BlockDriver bdrv_throttle = { | static BlockDriver bdrv_throttle = { | ||||||
|     .format_name                        =   "throttle", |     .format_name                        =   "throttle", | ||||||
|     .protocol_name                      =   "throttle", |  | ||||||
|     .instance_size                      =   sizeof(ThrottleGroupMember), |     .instance_size                      =   sizeof(ThrottleGroupMember), | ||||||
|  |  | ||||||
|     .bdrv_file_open                     =   throttle_open, |     .bdrv_open                          =   throttle_open, | ||||||
|     .bdrv_close                         =   throttle_close, |     .bdrv_close                         =   throttle_close, | ||||||
|     .bdrv_co_flush                      =   throttle_co_flush, |     .bdrv_co_flush                      =   throttle_co_flush, | ||||||
|  |  | ||||||
|   | |||||||
| @@ -126,6 +126,8 @@ struct BlockDriver { | |||||||
|  |  | ||||||
|     int (*bdrv_open)(BlockDriverState *bs, QDict *options, int flags, |     int (*bdrv_open)(BlockDriverState *bs, QDict *options, int flags, | ||||||
|                      Error **errp); |                      Error **errp); | ||||||
|  |  | ||||||
|  |     /* Protocol drivers should implement this instead of bdrv_open */ | ||||||
|     int (*bdrv_file_open)(BlockDriverState *bs, QDict *options, int flags, |     int (*bdrv_file_open)(BlockDriverState *bs, QDict *options, int flags, | ||||||
|                           Error **errp); |                           Error **errp); | ||||||
|     void (*bdrv_close)(BlockDriverState *bs); |     void (*bdrv_close)(BlockDriverState *bs); | ||||||
| @@ -251,6 +253,12 @@ struct BlockDriver { | |||||||
|      */ |      */ | ||||||
|     int coroutine_fn (*bdrv_co_flush_to_os)(BlockDriverState *bs); |     int coroutine_fn (*bdrv_co_flush_to_os)(BlockDriverState *bs); | ||||||
|  |  | ||||||
|  |     /* | ||||||
|  |      * Drivers setting this field must be able to work with just a plain | ||||||
|  |      * filename with '<protocol_name>:' as a prefix, and no other options. | ||||||
|  |      * Options may be extracted from the filename by implementing | ||||||
|  |      * bdrv_parse_filename. | ||||||
|  |      */ | ||||||
|     const char *protocol_name; |     const char *protocol_name; | ||||||
|     int (*bdrv_truncate)(BlockDriverState *bs, int64_t offset, |     int (*bdrv_truncate)(BlockDriverState *bs, int64_t offset, | ||||||
|                          PreallocMode prealloc, Error **errp); |                          PreallocMode prealloc, Error **errp); | ||||||
|   | |||||||
| @@ -67,7 +67,6 @@ typedef struct ReplicationState ReplicationState; | |||||||
|  * |  * | ||||||
|  * BlockDriver bdrv_replication = { |  * BlockDriver bdrv_replication = { | ||||||
|  *     .format_name                = "replication", |  *     .format_name                = "replication", | ||||||
|  *     .protocol_name              = "replication", |  | ||||||
|  *     .instance_size              = sizeof(BDRVReplicationState), |  *     .instance_size              = sizeof(BDRVReplicationState), | ||||||
|  * |  * | ||||||
|  *     .bdrv_open                  = replication_open, |  *     .bdrv_open                  = replication_open, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user