[Qemu-devel] [PATCH for-2.10 4/9] block: code movement

Jeff Cody posted 9 patches 8 years, 10 months ago
There is a newer version of this series
[Qemu-devel] [PATCH for-2.10 4/9] block: code movement
Posted by Jeff Cody 8 years, 10 months ago
Move bdrv_is_read_only() up with its friends.

Signed-off-by: Jeff Cody <jcody@redhat.com>
---
 block.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/block.c b/block.c
index 4a61ff0..8bfe7f4 100644
--- a/block.c
+++ b/block.c
@@ -192,6 +192,11 @@ void path_combine(char *dest, int dest_size,
     }
 }
 
+bool bdrv_is_read_only(BlockDriverState *bs)
+{
+    return bs->read_only;
+}
+
 int bdrv_set_read_only(BlockDriverState *bs, bool read_only, Error **errp)
 {
     /* Do not set read_only if copy_on_read is enabled */
@@ -3367,11 +3372,6 @@ void bdrv_get_geometry(BlockDriverState *bs, uint64_t *nb_sectors_ptr)
     *nb_sectors_ptr = nb_sectors < 0 ? 0 : nb_sectors;
 }
 
-bool bdrv_is_read_only(BlockDriverState *bs)
-{
-    return bs->read_only;
-}
-
 bool bdrv_is_sg(BlockDriverState *bs)
 {
     return bs->sg;
-- 
2.9.3


Re: [Qemu-devel] [PATCH for-2.10 4/9] block: code movement
Posted by John Snow 8 years, 10 months ago

On 04/05/2017 02:28 PM, Jeff Cody wrote:
> Move bdrv_is_read_only() up with its friends.
> 
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
>  block.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/block.c b/block.c
> index 4a61ff0..8bfe7f4 100644
> --- a/block.c
> +++ b/block.c
> @@ -192,6 +192,11 @@ void path_combine(char *dest, int dest_size,
>      }
>  }
>  
> +bool bdrv_is_read_only(BlockDriverState *bs)
> +{
> +    return bs->read_only;
> +}
> +
>  int bdrv_set_read_only(BlockDriverState *bs, bool read_only, Error **errp)
>  {
>      /* Do not set read_only if copy_on_read is enabled */
> @@ -3367,11 +3372,6 @@ void bdrv_get_geometry(BlockDriverState *bs, uint64_t *nb_sectors_ptr)
>      *nb_sectors_ptr = nb_sectors < 0 ? 0 : nb_sectors;
>  }
>  
> -bool bdrv_is_read_only(BlockDriverState *bs)
> -{
> -    return bs->read_only;
> -}
> -
>  bool bdrv_is_sg(BlockDriverState *bs)
>  {
>      return bs->sg;
> 

http://i.imgur.com/BrkMeS5.jpg

Re: [Qemu-devel] [PATCH for-2.10 4/9] block: code movement
Posted by Stefan Hajnoczi 8 years, 10 months ago
On Wed, Apr 05, 2017 at 02:28:46PM -0400, Jeff Cody wrote:
> Move bdrv_is_read_only() up with its friends.
> 
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
>  block.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>