* [PATCH] drivers: xen-blkfront: blkif_recover: recheck feature-persistent
@ 2015-05-26 0:11 Bob Liu
2015-06-01 7:50 ` Roger Pau Monné
2015-06-01 7:50 ` Roger Pau Monné
0 siblings, 2 replies; 6+ messages in thread
From: Bob Liu @ 2015-05-26 0:11 UTC (permalink / raw)
To: xen-devel
Cc: david.vrabel, justing, konrad.wilk, roger.pau, paul.durrant,
julien.grall, boris.ostrovsky, linux-kernel, Bob Liu
When migrate from !feature-persistent host to feature-persistent host, domU
still think new host/backend don't support persistent.
Dmesg like:
backed has not unmapped grant: 839
backed has not unmapped grant: 773
backed has not unmapped grant: 773
backed has not unmapped grant: 773
backed has not unmapped grant: 839
We should recheck whether the new backend support feature-persistent during
blkif_recover().
Signed-off-by: Bob Liu <bob.liu@oracle.com>
---
drivers/block/xen-blkfront.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index d3c1a95..cad4d8c 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1504,7 +1504,7 @@ static int blkif_recover(struct blkfront_info *info)
int i;
struct request *req, *n;
struct blk_shadow *copy;
- int rc;
+ int rc, persistent;
struct bio *bio, *cloned_bio;
struct bio_list bio_list, merge_bio;
unsigned int segs, offset;
@@ -1525,6 +1525,14 @@ static int blkif_recover(struct blkfront_info *info)
info->shadow_free = info->ring.req_prod_pvt;
info->shadow[BLK_RING_SIZE(info)-1].req.u.rw.id = 0x0fffffff;
+ /* Should check whether the new backend support feature-persistent */
+ rc = xenbus_gather(XBT_NIL, info->xbdev->otherend,
+ "feature-persistent", "%u", &persistent,
+ NULL);
+ if (rc)
+ info->feature_persistent = 0;
+ else
+ info->feature_persistent = persistent;
rc = blkfront_setup_indirect(info);
if (rc) {
kfree(copy);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers: xen-blkfront: blkif_recover: recheck feature-persistent
2015-05-26 0:11 [PATCH] drivers: xen-blkfront: blkif_recover: recheck feature-persistent Bob Liu
@ 2015-06-01 7:50 ` Roger Pau Monné
2015-06-01 8:30 ` Bob Liu
2015-06-01 8:30 ` Bob Liu
2015-06-01 7:50 ` Roger Pau Monné
1 sibling, 2 replies; 6+ messages in thread
From: Roger Pau Monné @ 2015-06-01 7:50 UTC (permalink / raw)
To: Bob Liu, xen-devel
Cc: david.vrabel, justing, konrad.wilk, paul.durrant, julien.grall,
boris.ostrovsky, linux-kernel
El 26/05/15 a les 2.11, Bob Liu ha escrit:
> When migrate from !feature-persistent host to feature-persistent host, domU
> still think new host/backend don't support persistent.
> Dmesg like:
> backed has not unmapped grant: 839
> backed has not unmapped grant: 773
> backed has not unmapped grant: 773
> backed has not unmapped grant: 773
> backed has not unmapped grant: 839
>
> We should recheck whether the new backend support feature-persistent during
> blkif_recover().
Right, we recheck for indirect-descriptors but not persistent grants.
Do you think it makes sense to split the part of blkfront_connect that
checks for optional features, like persistent grants, indirect
descriptors and flush/barrier features to a separate function and call
it from both blkfront_connect and blkif_recover?
Roger.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers: xen-blkfront: blkif_recover: recheck feature-persistent
2015-05-26 0:11 [PATCH] drivers: xen-blkfront: blkif_recover: recheck feature-persistent Bob Liu
2015-06-01 7:50 ` Roger Pau Monné
@ 2015-06-01 7:50 ` Roger Pau Monné
1 sibling, 0 replies; 6+ messages in thread
From: Roger Pau Monné @ 2015-06-01 7:50 UTC (permalink / raw)
To: Bob Liu, xen-devel
Cc: linux-kernel, julien.grall, justing, paul.durrant, david.vrabel,
boris.ostrovsky
El 26/05/15 a les 2.11, Bob Liu ha escrit:
> When migrate from !feature-persistent host to feature-persistent host, domU
> still think new host/backend don't support persistent.
> Dmesg like:
> backed has not unmapped grant: 839
> backed has not unmapped grant: 773
> backed has not unmapped grant: 773
> backed has not unmapped grant: 773
> backed has not unmapped grant: 839
>
> We should recheck whether the new backend support feature-persistent during
> blkif_recover().
Right, we recheck for indirect-descriptors but not persistent grants.
Do you think it makes sense to split the part of blkfront_connect that
checks for optional features, like persistent grants, indirect
descriptors and flush/barrier features to a separate function and call
it from both blkfront_connect and blkif_recover?
Roger.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers: xen-blkfront: blkif_recover: recheck feature-persistent
2015-06-01 7:50 ` Roger Pau Monné
@ 2015-06-01 8:30 ` Bob Liu
2015-06-01 8:30 ` Bob Liu
1 sibling, 0 replies; 6+ messages in thread
From: Bob Liu @ 2015-06-01 8:30 UTC (permalink / raw)
To: Roger Pau Monné
Cc: xen-devel, david.vrabel, justing, konrad.wilk, paul.durrant,
julien.grall, boris.ostrovsky, linux-kernel
On 06/01/2015 03:50 PM, Roger Pau Monné wrote:
> El 26/05/15 a les 2.11, Bob Liu ha escrit:
>> When migrate from !feature-persistent host to feature-persistent host, domU
>> still think new host/backend don't support persistent.
>> Dmesg like:
>> backed has not unmapped grant: 839
>> backed has not unmapped grant: 773
>> backed has not unmapped grant: 773
>> backed has not unmapped grant: 773
>> backed has not unmapped grant: 839
>>
>> We should recheck whether the new backend support feature-persistent during
>> blkif_recover().
>
> Right, we recheck for indirect-descriptors but not persistent grants.
>
> Do you think it makes sense to split the part of blkfront_connect that
> checks for optional features, like persistent grants, indirect
> descriptors and flush/barrier features to a separate function and call
> it from both blkfront_connect and blkif_recover?
>
Yep, that would be better.
Thanks,
-Bob
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drivers: xen-blkfront: blkif_recover: recheck feature-persistent
2015-06-01 7:50 ` Roger Pau Monné
2015-06-01 8:30 ` Bob Liu
@ 2015-06-01 8:30 ` Bob Liu
1 sibling, 0 replies; 6+ messages in thread
From: Bob Liu @ 2015-06-01 8:30 UTC (permalink / raw)
To: Roger Pau Monné
Cc: linux-kernel, xen-devel, julien.grall, justing, paul.durrant,
david.vrabel, boris.ostrovsky
On 06/01/2015 03:50 PM, Roger Pau Monné wrote:
> El 26/05/15 a les 2.11, Bob Liu ha escrit:
>> When migrate from !feature-persistent host to feature-persistent host, domU
>> still think new host/backend don't support persistent.
>> Dmesg like:
>> backed has not unmapped grant: 839
>> backed has not unmapped grant: 773
>> backed has not unmapped grant: 773
>> backed has not unmapped grant: 773
>> backed has not unmapped grant: 839
>>
>> We should recheck whether the new backend support feature-persistent during
>> blkif_recover().
>
> Right, we recheck for indirect-descriptors but not persistent grants.
>
> Do you think it makes sense to split the part of blkfront_connect that
> checks for optional features, like persistent grants, indirect
> descriptors and flush/barrier features to a separate function and call
> it from both blkfront_connect and blkif_recover?
>
Yep, that would be better.
Thanks,
-Bob
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] drivers: xen-blkfront: blkif_recover: recheck feature-persistent
@ 2015-05-26 0:11 Bob Liu
0 siblings, 0 replies; 6+ messages in thread
From: Bob Liu @ 2015-05-26 0:11 UTC (permalink / raw)
To: xen-devel
Cc: linux-kernel, julien.grall, justing, Bob Liu, paul.durrant,
david.vrabel, boris.ostrovsky, roger.pau
When migrate from !feature-persistent host to feature-persistent host, domU
still think new host/backend don't support persistent.
Dmesg like:
backed has not unmapped grant: 839
backed has not unmapped grant: 773
backed has not unmapped grant: 773
backed has not unmapped grant: 773
backed has not unmapped grant: 839
We should recheck whether the new backend support feature-persistent during
blkif_recover().
Signed-off-by: Bob Liu <bob.liu@oracle.com>
---
drivers/block/xen-blkfront.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index d3c1a95..cad4d8c 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1504,7 +1504,7 @@ static int blkif_recover(struct blkfront_info *info)
int i;
struct request *req, *n;
struct blk_shadow *copy;
- int rc;
+ int rc, persistent;
struct bio *bio, *cloned_bio;
struct bio_list bio_list, merge_bio;
unsigned int segs, offset;
@@ -1525,6 +1525,14 @@ static int blkif_recover(struct blkfront_info *info)
info->shadow_free = info->ring.req_prod_pvt;
info->shadow[BLK_RING_SIZE(info)-1].req.u.rw.id = 0x0fffffff;
+ /* Should check whether the new backend support feature-persistent */
+ rc = xenbus_gather(XBT_NIL, info->xbdev->otherend,
+ "feature-persistent", "%u", &persistent,
+ NULL);
+ if (rc)
+ info->feature_persistent = 0;
+ else
+ info->feature_persistent = persistent;
rc = blkfront_setup_indirect(info);
if (rc) {
kfree(copy);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-06-01 8:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-26 0:11 [PATCH] drivers: xen-blkfront: blkif_recover: recheck feature-persistent Bob Liu
2015-06-01 7:50 ` Roger Pau Monné
2015-06-01 8:30 ` Bob Liu
2015-06-01 8:30 ` Bob Liu
2015-06-01 7:50 ` Roger Pau Monné
2015-05-26 0:11 Bob Liu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.