rbd.c (d3c810803576d867265277df8e94eee386351c9d) | rbd.c (2d7c86a8f9cdce1408c4f3c69d94d007eff2f179) |
---|---|
1 2/* 3 rbd.c -- Export ceph rados objects as a Linux block device 4 5 6 based on drivers/block/osdblk.c: 7 8 Copyright 2009 Red Hat, Inc. --- 4910 unchanged lines hidden (view full) --- 4919 goto out_tag_set; 4920 } 4921 q = disk->queue; 4922 4923 snprintf(disk->disk_name, sizeof(disk->disk_name), RBD_DRV_NAME "%d", 4924 rbd_dev->dev_id); 4925 disk->major = rbd_dev->major; 4926 disk->first_minor = rbd_dev->minor; | 1 2/* 3 rbd.c -- Export ceph rados objects as a Linux block device 4 5 6 based on drivers/block/osdblk.c: 7 8 Copyright 2009 Red Hat, Inc. --- 4910 unchanged lines hidden (view full) --- 4919 goto out_tag_set; 4920 } 4921 q = disk->queue; 4922 4923 snprintf(disk->disk_name, sizeof(disk->disk_name), RBD_DRV_NAME "%d", 4924 rbd_dev->dev_id); 4925 disk->major = rbd_dev->major; 4926 disk->first_minor = rbd_dev->minor; |
4927 if (single_major) | 4927 if (single_major) { |
4928 disk->minors = (1 << RBD_SINGLE_MAJOR_PART_SHIFT); | 4928 disk->minors = (1 << RBD_SINGLE_MAJOR_PART_SHIFT); |
4929 else | 4929 disk->flags |= GENHD_FL_EXT_DEVT; 4930 } else { |
4930 disk->minors = RBD_MINORS_PER_MAJOR; | 4931 disk->minors = RBD_MINORS_PER_MAJOR; |
4932 } |
|
4931 disk->fops = &rbd_bd_ops; 4932 disk->private_data = rbd_dev; 4933 4934 blk_queue_flag_set(QUEUE_FLAG_NONROT, q); 4935 /* QUEUE_FLAG_ADD_RANDOM is off by default for blk-mq */ 4936 4937 blk_queue_max_hw_sectors(q, objset_bytes >> SECTOR_SHIFT); 4938 q->limits.max_sectors = queue_max_hw_sectors(q); --- 1551 unchanged lines hidden (view full) --- 6490 pctx.opts->read_only = RBD_READ_ONLY_DEFAULT; 6491 pctx.opts->queue_depth = RBD_QUEUE_DEPTH_DEFAULT; 6492 pctx.opts->alloc_size = RBD_ALLOC_SIZE_DEFAULT; 6493 pctx.opts->lock_timeout = RBD_LOCK_TIMEOUT_DEFAULT; 6494 pctx.opts->lock_on_read = RBD_LOCK_ON_READ_DEFAULT; 6495 pctx.opts->exclusive = RBD_EXCLUSIVE_DEFAULT; 6496 pctx.opts->trim = RBD_TRIM_DEFAULT; 6497 | 4933 disk->fops = &rbd_bd_ops; 4934 disk->private_data = rbd_dev; 4935 4936 blk_queue_flag_set(QUEUE_FLAG_NONROT, q); 4937 /* QUEUE_FLAG_ADD_RANDOM is off by default for blk-mq */ 4938 4939 blk_queue_max_hw_sectors(q, objset_bytes >> SECTOR_SHIFT); 4940 q->limits.max_sectors = queue_max_hw_sectors(q); --- 1551 unchanged lines hidden (view full) --- 6492 pctx.opts->read_only = RBD_READ_ONLY_DEFAULT; 6493 pctx.opts->queue_depth = RBD_QUEUE_DEPTH_DEFAULT; 6494 pctx.opts->alloc_size = RBD_ALLOC_SIZE_DEFAULT; 6495 pctx.opts->lock_timeout = RBD_LOCK_TIMEOUT_DEFAULT; 6496 pctx.opts->lock_on_read = RBD_LOCK_ON_READ_DEFAULT; 6497 pctx.opts->exclusive = RBD_EXCLUSIVE_DEFAULT; 6498 pctx.opts->trim = RBD_TRIM_DEFAULT; 6499 |
6498 ret = ceph_parse_mon_ips(mon_addrs, mon_addrs_size, pctx.copts, NULL); | 6500 ret = ceph_parse_mon_ips(mon_addrs, mon_addrs_size, pctx.copts, NULL, 6501 ','); |
6499 if (ret) 6500 goto out_err; 6501 6502 ret = rbd_parse_options(options, &pctx); 6503 if (ret) 6504 goto out_err; 6505 6506 *ceph_opts = pctx.copts; --- 839 unchanged lines hidden --- | 6502 if (ret) 6503 goto out_err; 6504 6505 ret = rbd_parse_options(options, &pctx); 6506 if (ret) 6507 goto out_err; 6508 6509 *ceph_opts = pctx.copts; --- 839 unchanged lines hidden --- |