@@ -1070,8 +1070,7 @@ static char *encode_disk_name(char *ptr, unsigned int n)
1070
1070
}
1071
1071
1072
1072
static 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 )
1075
1074
{
1076
1075
struct queue_limits lim = {};
1077
1076
struct gendisk * gd ;
@@ -1165,8 +1164,6 @@ static int xlvbd_alloc_gendisk(blkif_sector_t capacity,
1165
1164
1166
1165
info -> rq = gd -> queue ;
1167
1166
info -> gd = gd ;
1168
- info -> sector_size = sector_size ;
1169
- info -> physical_sector_size = physical_sector_size ;
1170
1167
1171
1168
xlvbd_flush (info );
1172
1169
@@ -2320,8 +2317,6 @@ static void blkfront_gather_backend_features(struct blkfront_info *info)
2320
2317
static void blkfront_connect (struct blkfront_info * info )
2321
2318
{
2322
2319
unsigned long long sectors ;
2323
- unsigned long sector_size ;
2324
- unsigned int physical_sector_size ;
2325
2320
int err , i ;
2326
2321
struct blkfront_ring_info * rinfo ;
2327
2322
@@ -2360,7 +2355,7 @@ static void blkfront_connect(struct blkfront_info *info)
2360
2355
err = xenbus_gather (XBT_NIL , info -> xbdev -> otherend ,
2361
2356
"sectors" , "%llu" , & sectors ,
2362
2357
"info" , "%u" , & info -> vdisk_info ,
2363
- "sector-size" , "%lu" , & sector_size ,
2358
+ "sector-size" , "%lu" , & info -> sector_size ,
2364
2359
NULL );
2365
2360
if (err ) {
2366
2361
xenbus_dev_fatal (info -> xbdev , err ,
@@ -2374,9 +2369,9 @@ static void blkfront_connect(struct blkfront_info *info)
2374
2369
* provide this. Assume physical sector size to be the same as
2375
2370
* sector_size in that case.
2376
2371
*/
2377
- physical_sector_size = xenbus_read_unsigned (info -> xbdev -> otherend ,
2372
+ info -> physical_sector_size = xenbus_read_unsigned (info -> xbdev -> otherend ,
2378
2373
"physical-sector-size" ,
2379
- sector_size );
2374
+ info -> sector_size );
2380
2375
blkfront_gather_backend_features (info );
2381
2376
for_each_rinfo (info , rinfo , i ) {
2382
2377
err = blkfront_setup_indirect (rinfo );
@@ -2388,8 +2383,7 @@ static void blkfront_connect(struct blkfront_info *info)
2388
2383
}
2389
2384
}
2390
2385
2391
- err = xlvbd_alloc_gendisk (sectors , info , sector_size ,
2392
- physical_sector_size );
2386
+ err = xlvbd_alloc_gendisk (sectors , info );
2393
2387
if (err ) {
2394
2388
xenbus_dev_fatal (info -> xbdev , err , "xlvbd_add at %s" ,
2395
2389
info -> xbdev -> otherend );
0 commit comments