Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1277165 > unrolled thread

[RFC 1/1] xen: block: correct setting for xen_blkif_max_ring_order

Started byPeng Fan <van.freenix@gmail.com>
First post2015-11-25 11:30 +0100
Last post2015-11-25 18:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [RFC 1/1] xen: block: correct setting for xen_blkif_max_ring_order Peng Fan <van.freenix@gmail.com> - 2015-11-25 11:30 +0100
    Re: [RFC 1/1] xen: block: correct setting for  xen_blkif_max_ring_order Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2015-11-25 18:00 +0100

#1277165 — [RFC 1/1] xen: block: correct setting for xen_blkif_max_ring_order

FromPeng Fan <van.freenix@gmail.com>
Date2015-11-25 11:30 +0100
Subject[RFC 1/1] xen: block: correct setting for xen_blkif_max_ring_order
Message-ID<qyFuO-4Xh-25@gated-at.bofh.it>
According to this piece code:
"
     pr_info("Invalid max_ring_order (%d), will use default max: %d.\n",
              xen_blkif_max_ring_order, XENBUS_MAX_RING_GRANT_ORDER);
"
if xen_blkif_max_ring_order is bigger that XENBUS_MAX_RING_GRANT_ORDER,
need to set xen_blkif_max_ring_order using XENBUS_MAX_RING_GRANT_ORDER,
but not 0.

Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>
---

Hi,

I am new to xen and reading related soure code, not sure whether
this is correct. Please comments.

Thanks

 drivers/block/xen-blkfront.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 0823a96..883b9fa 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -2126,7 +2126,7 @@ static int __init xlblk_init(void)
 	if (xen_blkif_max_ring_order > XENBUS_MAX_RING_PAGE_ORDER) {
 		pr_info("Invalid max_ring_order (%d), will use default max: %d.\n",
 			xen_blkif_max_ring_order, XENBUS_MAX_RING_PAGE_ORDER);
-		xen_blkif_max_ring_order = 0;
+		xen_blkif_max_ring_order = XENBUS_MAX_RING_PAGE_ORDER;
 	}
 
 	if (!xen_has_pv_disk_devices())
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1277610 — Re: [RFC 1/1] xen: block: correct setting for xen_blkif_max_ring_order

FromKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date2015-11-25 18:00 +0100
SubjectRe: [RFC 1/1] xen: block: correct setting for xen_blkif_max_ring_order
Message-ID<qyLAf-qU-19@gated-at.bofh.it>
In reply to#1277165
On Wed, Nov 25, 2015 at 06:26:01PM +0800, Peng Fan wrote:
> According to this piece code:
> "
>      pr_info("Invalid max_ring_order (%d), will use default max: %d.\n",
>               xen_blkif_max_ring_order, XENBUS_MAX_RING_GRANT_ORDER);
> "
> if xen_blkif_max_ring_order is bigger that XENBUS_MAX_RING_GRANT_ORDER,
> need to set xen_blkif_max_ring_order using XENBUS_MAX_RING_GRANT_ORDER,
> but not 0.
> 
> Signed-off-by: Peng Fan <van.freenix@gmail.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Cc: David Vrabel <david.vrabel@citrix.com>
> Cc: "Roger Pau Monné" <roger.pau@citrix.com>
> ---
> 
> Hi,
> 
> I am new to xen and reading related soure code, not sure whether
> this is correct. Please comments.

Applied to 'devel/for-jens-4.5'.

Thanks!
> 
> Thanks
> 
>  drivers/block/xen-blkfront.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
> index 0823a96..883b9fa 100644
> --- a/drivers/block/xen-blkfront.c
> +++ b/drivers/block/xen-blkfront.c
> @@ -2126,7 +2126,7 @@ static int __init xlblk_init(void)
>  	if (xen_blkif_max_ring_order > XENBUS_MAX_RING_PAGE_ORDER) {
>  		pr_info("Invalid max_ring_order (%d), will use default max: %d.\n",
>  			xen_blkif_max_ring_order, XENBUS_MAX_RING_PAGE_ORDER);
> -		xen_blkif_max_ring_order = 0;
> +		xen_blkif_max_ring_order = XENBUS_MAX_RING_PAGE_ORDER;
>  	}
>  
>  	if (!xen_has_pv_disk_devices())
> -- 
> 2.6.2
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web