WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] blktap: What meaning ? "Sector request greaterthan size"

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] blktap: What meaning ? "Sector request greaterthan size"
From: Tomonari Horikoshi <t.horikoshi@xxxxxxxxxxxxxx>
Date: Wed, 01 Aug 2007 15:54:36 +0900
Delivery-date: Tue, 31 Jul 2007 23:52:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi all.

The following messages appear by DomU using blktap.

-----
blk_tap: BLKTAP: Sector request greaterthan size
blk_tap: BLKTAP: READ request sector[10485760,20480], Total [10485760]
blk_tap: BLKTAP: Sector request greaterthan size
-----

Why is Sector request counted up by using ((PAGE_SIZE / 512) * i) ?
I think that it is necessary to count up Sector request
whith first sector and last sector like a tapdisk.c.
How do you feel about that?


  1293  static void dispatch_rw_block_io(blkif_t *blkif,

  1360                  sector = req->sector_number + ((PAGE_SIZE / 512) * i);
  1361                  if( (blkif->sectors > 0) && (sector >= blkif->sectors) 
) {
  1362                          WPRINTK("BLKTAP: Sector request greater"
  1363                                 "than size\n");
  1364                          WPRINTK("BLKTAP: %s request sector"
  1365                                 "[%llu,%llu], Total [%llu]\n",
  1366                                 (req->operation ==
  1367                                  BLKIF_OP_WRITE ? "WRITE" : "READ"),
  1368                                  (long long unsigned) sector,
  1369                                  (long long unsigned) sector>>9,
  1370                                  (long long unsigned) blkif->sectors);
  1371                  }


Best regards,
Horikoshi



-------------------------------------------------------------
diff -r 88a17da7f336 drivers/xen/blktap/blktap.c
--- a/drivers/xen/blktap/blktap.c       Thu Jul 26 16:36:52 2007 +0100
+++ b/drivers/xen/blktap/blktap.c       Wed Aug 01 14:41:43 2007 +0900
@@ -1348,6 +1348,7 @@ static void dispatch_rw_block_io(blkif_t
        pending_req->status    = BLKIF_RSP_OKAY;
        pending_req->nr_pages  = nseg;
        op = 0;
+       sector = req->sector_number;
        for (i = 0; i < nseg; i++) {
                unsigned long uvaddr;
                unsigned long kvaddr;
@@ -1357,7 +1358,6 @@ static void dispatch_rw_block_io(blkif_t
                uvaddr = MMAP_VADDR(info->user_vstart, usr_idx, i);
                kvaddr = idx_to_kaddr(mmap_idx, pending_idx, i);
 
-               sector = req->sector_number + ((PAGE_SIZE / 512) * i);
                if( (blkif->sectors > 0) && (sector >= blkif->sectors) ) {
                        WPRINTK("BLKTAP: Sector request greater" 
                               "than size\n");
@@ -1369,6 +1369,8 @@ static void dispatch_rw_block_io(blkif_t
                                (long long unsigned) sector>>9,
                                (long long unsigned) blkif->sectors);
                }
+               sector += (req->seg[i].last_sect -
+                          req->seg[i].first_sect + 1);
 
                flags = GNTMAP_host_map;
                if (operation == WRITE)




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] blktap: What meaning ? "Sector request greaterthan size", Tomonari Horikoshi <=