]> xenbits.xensource.com Git - pvdrivers/win/xenvbd.git/commitdiff
Add 'feature-large-sector-size'
authorPaul Durrant <paul.durrant@citrix.com>
Fri, 5 Apr 2019 15:51:08 +0000 (16:51 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Fri, 5 Apr 2019 15:51:08 +0000 (16:51 +0100)
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@citrix.com>
src/xencrsh/frontend.c
src/xenvbd/frontend.c

index 78c90d9fea8c2b885c951791c1007272cb9dbfe3..b46c05323bd6e0540976d61bbe09c8667cc2eac9 100644 (file)
@@ -666,6 +666,11 @@ __WriteRing(
         if (!NT_SUCCESS(Status))
             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))
index 12c929669f53543d632a1e0d8d4dc4c06ddb54ba..3310287f9182b33f02c809f9f3c88cb52f3b9b1c 100644 (file)
@@ -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,