Lines Matching refs:d
43 bl_free_deviceid_node(struct nfs4_deviceid_node *d) in bl_free_deviceid_node() argument
46 container_of(d, struct pnfs_block_dev, node); in bl_free_deviceid_node()
230 bl_parse_deviceid(struct nfs_server *server, struct pnfs_block_dev *d,
235 bl_parse_simple(struct nfs_server *server, struct pnfs_block_dev *d, in bl_parse_simple() argument
252 d->bdev = bdev; in bl_parse_simple()
255 d->len = i_size_read(d->bdev->bd_inode); in bl_parse_simple()
256 d->map = bl_map_simple; in bl_parse_simple()
259 d->bdev->bd_disk->disk_name); in bl_parse_simple()
352 bl_parse_scsi(struct nfs_server *server, struct pnfs_block_dev *d, in bl_parse_scsi() argument
368 d->bdev = bdev; in bl_parse_scsi()
370 d->len = i_size_read(d->bdev->bd_inode); in bl_parse_scsi()
371 d->map = bl_map_simple; in bl_parse_scsi()
372 d->pr_key = v->scsi.pr_key; in bl_parse_scsi()
375 d->bdev->bd_disk->disk_name, d->pr_key); in bl_parse_scsi()
377 ops = d->bdev->bd_disk->fops->pr_ops; in bl_parse_scsi()
380 d->bdev->bd_disk->disk_name); in bl_parse_scsi()
385 error = ops->pr_register(d->bdev, 0, d->pr_key, true); in bl_parse_scsi()
388 d->bdev->bd_disk->disk_name); in bl_parse_scsi()
392 d->pr_registered = true; in bl_parse_scsi()
396 blkdev_put(d->bdev, FMODE_READ | FMODE_WRITE); in bl_parse_scsi()
401 bl_parse_slice(struct nfs_server *server, struct pnfs_block_dev *d, in bl_parse_slice() argument
407 ret = bl_parse_deviceid(server, d, volumes, v->slice.volume, gfp_mask); in bl_parse_slice()
411 d->disk_offset = v->slice.start; in bl_parse_slice()
412 d->len = v->slice.len; in bl_parse_slice()
417 bl_parse_concat(struct nfs_server *server, struct pnfs_block_dev *d, in bl_parse_concat() argument
424 d->children = kcalloc(v->concat.volumes_count, in bl_parse_concat()
426 if (!d->children) in bl_parse_concat()
430 ret = bl_parse_deviceid(server, &d->children[i], in bl_parse_concat()
435 d->nr_children++; in bl_parse_concat()
436 d->children[i].start += len; in bl_parse_concat()
437 len += d->children[i].len; in bl_parse_concat()
440 d->len = len; in bl_parse_concat()
441 d->map = bl_map_concat; in bl_parse_concat()
446 bl_parse_stripe(struct nfs_server *server, struct pnfs_block_dev *d, in bl_parse_stripe() argument
453 d->children = kcalloc(v->stripe.volumes_count, in bl_parse_stripe()
455 if (!d->children) in bl_parse_stripe()
459 ret = bl_parse_deviceid(server, &d->children[i], in bl_parse_stripe()
464 d->nr_children++; in bl_parse_stripe()
465 len += d->children[i].len; in bl_parse_stripe()
468 d->len = len; in bl_parse_stripe()
469 d->chunk_size = v->stripe.chunk_size; in bl_parse_stripe()
470 d->map = bl_map_stripe; in bl_parse_stripe()
475 bl_parse_deviceid(struct nfs_server *server, struct pnfs_block_dev *d, in bl_parse_deviceid() argument
480 return bl_parse_simple(server, d, volumes, idx, gfp_mask); in bl_parse_deviceid()
482 return bl_parse_slice(server, d, volumes, idx, gfp_mask); in bl_parse_deviceid()
484 return bl_parse_concat(server, d, volumes, idx, gfp_mask); in bl_parse_deviceid()
486 return bl_parse_stripe(server, d, volumes, idx, gfp_mask); in bl_parse_deviceid()
488 return bl_parse_scsi(server, d, volumes, idx, gfp_mask); in bl_parse_deviceid()