blktap: What meaning ? "Sector request greaterthan size"
Hi all.
The following messages appear by DomU using blktap.
-----blk_tap: BLKTAP: Sector request greaterthan sizeblk_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
-------------------------------------------------------------
drivers/xen/blktap/blktap.c +3 -1
@@ -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 )
Quoted 4 lines · Tomonari Horikoshi
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 atapdisk.c.
How do you feel about that?
Your patch looks good to me. I'll double check and then apply.
-- Keir