@@ -1070,8 +1070,7 @@ static char *encode_disk_name(char *ptr, unsigned int n)
10701070}
10711071
10721072static int xlvbd_alloc_gendisk (blkif_sector_t capacity ,
1073- struct blkfront_info * info , u16 sector_size ,
1074- unsigned int physical_sector_size )
1073+ struct blkfront_info * info )
10751074{
10761075 struct queue_limits lim = {};
10771076 struct gendisk * gd ;
@@ -1165,8 +1164,6 @@ static int xlvbd_alloc_gendisk(blkif_sector_t capacity,
11651164
11661165 info -> rq = gd -> queue ;
11671166 info -> gd = gd ;
1168- info -> sector_size = sector_size ;
1169- info -> physical_sector_size = physical_sector_size ;
11701167
11711168 xlvbd_flush (info );
11721169
@@ -2320,8 +2317,6 @@ static void blkfront_gather_backend_features(struct blkfront_info *info)
23202317static void blkfront_connect (struct blkfront_info * info )
23212318{
23222319 unsigned long long sectors ;
2323- unsigned long sector_size ;
2324- unsigned int physical_sector_size ;
23252320 int err , i ;
23262321 struct blkfront_ring_info * rinfo ;
23272322
@@ -2360,7 +2355,7 @@ static void blkfront_connect(struct blkfront_info *info)
23602355 err = xenbus_gather (XBT_NIL , info -> xbdev -> otherend ,
23612356 "sectors" , "%llu" , & sectors ,
23622357 "info" , "%u" , & info -> vdisk_info ,
2363- "sector-size" , "%lu" , & sector_size ,
2358+ "sector-size" , "%lu" , & info -> sector_size ,
23642359 NULL );
23652360 if (err ) {
23662361 xenbus_dev_fatal (info -> xbdev , err ,
@@ -2374,9 +2369,9 @@ static void blkfront_connect(struct blkfront_info *info)
23742369 * provide this. Assume physical sector size to be the same as
23752370 * sector_size in that case.
23762371 */
2377- physical_sector_size = xenbus_read_unsigned (info -> xbdev -> otherend ,
2372+ info -> physical_sector_size = xenbus_read_unsigned (info -> xbdev -> otherend ,
23782373 "physical-sector-size" ,
2379- sector_size );
2374+ info -> sector_size );
23802375 blkfront_gather_backend_features (info );
23812376 for_each_rinfo (info , rinfo , i ) {
23822377 err = blkfront_setup_indirect (rinfo );
@@ -2388,8 +2383,7 @@ static void blkfront_connect(struct blkfront_info *info)
23882383 }
23892384 }
23902385
2391- err = xlvbd_alloc_gendisk (sectors , info , sector_size ,
2392- physical_sector_size );
2386+ err = xlvbd_alloc_gendisk (sectors , info );
23932387 if (err ) {
23942388 xenbus_dev_fatal (info -> xbdev , err , "xlvbd_add at %s" ,
23952389 info -> xbdev -> otherend );
0 commit comments