[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] [PATCH xenvbd] Add 'feature-large-sector-size'



As explained in Xen commit 67e1c050 "public/io/blkif.h: try to fix the
semantics of sector based quantities" [1], frontends that always
supply and interpret sector based quantities in terms of the 'sector-size'
of the backend should declare 'feature-large-sector-size'.

[1] 
http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=67e1c050e36b2c9900cca83618e56189effbad98

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
 src/xencrsh/frontend.c |  5 +++++
 src/xenvbd/frontend.c  | 10 ++++++++++
 2 files changed, 15 insertions(+)

diff --git a/src/xencrsh/frontend.c b/src/xencrsh/frontend.c
index 78c90d9..b46c053 100644
--- a/src/xencrsh/frontend.c
+++ b/src/xencrsh/frontend.c
@@ -667,6 +667,11 @@ __WriteRing(
             goto abort;
 
         Status = StoreWrite(Transaction, Frontend->FrontendPath,
+                        "feature-large-sector-size", "1");
+        if (!NT_SUCCESS(Status))
+            goto abort;
+
+        Status = StoreWrite(Transaction, Frontend->FrontendPath,
                         "multi-queue-num-queues", "1");
         if (!NT_SUCCESS(Status))
             goto abort;
diff --git a/src/xenvbd/frontend.c b/src/xenvbd/frontend.c
index 12c9296..3310287 100644
--- a/src/xenvbd/frontend.c
+++ b/src/xenvbd/frontend.c
@@ -1276,6 +1276,16 @@ FrontendConnect(
         if (!NT_SUCCESS(Status))
             goto abort;
 
+        Status = XENBUS_STORE(Printf,
+                              &Frontend->StoreInterface,
+                              Transaction,
+                              Frontend->FrontendPath,
+                              "feature-large-sector-size",
+                              "%u",
+                              1);
+        if (!NT_SUCCESS(Status))
+            goto abort;
+
         Status = XENBUS_STORE(TransactionEnd,
                               &Frontend->StoreInterface,
                               Transaction,
-- 
2.5.3


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.