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

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



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


 


Rackspace

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