Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1277734 > unrolled thread
| Started by | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> |
|---|---|
| First post | 2015-11-25 20:40 +0100 |
| Last post | 2015-11-25 20:40 +0100 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH RFC] Various fixes to xen block drivers on top of Bob's multi-queue patches. Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2015-11-25 20:40 +0100
[PATCH RFC 2/2] xen/blkback: Free resources if connect_ring failed. Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2015-11-25 20:40 +0100
| From | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> |
|---|---|
| Date | 2015-11-25 20:40 +0100 |
| Subject | [PATCH RFC] Various fixes to xen block drivers on top of Bob's multi-queue patches. |
| Message-ID | <qyO54-266-9@gated-at.bofh.it> |
Hey,
As I was reviewing Bob's backend patches I spotted a couple of
oddities that I thought should be fixed.
Please review at your leisure.
drivers/block/xen-blkback/xenbus.c | 10 ++++++++--
drivers/block/xen-blkfront.c | 4 ++--
2 files changed, 10 insertions(+), 4 deletions(-)
Konrad Rzeszutek Wilk (2):
xen/blocks: Return -EXX instead of -1
xen/blkback: Free resources if connect_ring failed.
--
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]
| From | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> |
|---|---|
| Date | 2015-11-25 20:40 +0100 |
| Subject | [PATCH RFC 2/2] xen/blkback: Free resources if connect_ring failed. |
| Message-ID | <qyO55-266-43@gated-at.bofh.it> |
| In reply to | #1277734 |
With the multi-queue support we could fail at setting up
some of the rings and fail the connection. That meant that
all resources tied to rings[0..n-1] (where n is the ring
that failed to be setup). Eventually the frontend will switch
to the states and we will call xen_blkif_disconnect.
However we do not want to be at the mercy of the frontend
deciding when to change states. This allows us to do the
cleanup right away and freeing resources.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
drivers/block/xen-blkback/xenbus.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c
index ca3a414..c92b358 100644
--- a/drivers/block/xen-blkback/xenbus.c
+++ b/drivers/block/xen-blkback/xenbus.c
@@ -749,8 +749,14 @@ static void frontend_changed(struct xenbus_device *dev,
}
err = connect_ring(be);
- if (err)
+ if (err) {
+ /*
+ * Clean up so that memory resources can be used by
+ * other devices. connect_ring reported already error.
+ */
+ xen_blkif_disconnect(be->blkif);
break;
+ }
xen_update_blkif_status(be->blkif);
break;
--
2.5.0
--
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