Home
last modified time | relevance | path

Searched refs:ret (Results 1 – 25 of 50) sorted by relevance

12

/block/
Dioprio.c74 int ret; in SYSCALL_DEFINE3() local
76 ret = ioprio_check_cap(ioprio); in SYSCALL_DEFINE3()
77 if (ret) in SYSCALL_DEFINE3()
78 return ret; in SYSCALL_DEFINE3()
80 ret = -ESRCH; in SYSCALL_DEFINE3()
89 ret = set_task_ioprio(p, ioprio); in SYSCALL_DEFINE3()
99 ret = set_task_ioprio(p, ioprio); in SYSCALL_DEFINE3()
100 if (ret) { in SYSCALL_DEFINE3()
124 ret = set_task_ioprio(p, ioprio); in SYSCALL_DEFINE3()
125 if (ret) in SYSCALL_DEFINE3()
[all …]
Dblk-map.c52 ssize_t ret; in bio_copy_from_iter() local
54 ret = copy_page_from_iter(bvec->bv_page, in bio_copy_from_iter()
62 if (ret < bvec->bv_len) in bio_copy_from_iter()
83 ssize_t ret; in bio_copy_to_iter() local
85 ret = copy_page_to_iter(bvec->bv_page, in bio_copy_to_iter()
93 if (ret < bvec->bv_len) in bio_copy_to_iter()
110 int ret = 0; in bio_uncopy_user() local
119 ret = -EINTR; in bio_uncopy_user()
121 ret = bio_copy_to_iter(bio, bmd->iter); in bio_uncopy_user()
126 return ret; in bio_uncopy_user()
[all …]
Dfops.c62 ssize_t ret; in __blkdev_direct_IO_simple() local
86 ret = bio_iov_iter_get_pages(&bio, iter); in __blkdev_direct_IO_simple()
87 if (unlikely(ret)) in __blkdev_direct_IO_simple()
89 ret = bio.bi_iter.bi_size; in __blkdev_direct_IO_simple()
92 task_io_account_write(ret); in __blkdev_direct_IO_simple()
101 ret = blk_status_to_errno(bio.bi_status); in __blkdev_direct_IO_simple()
109 return ret; in __blkdev_direct_IO_simple()
141 ssize_t ret; in blkdev_bio_end_io() local
146 ret = dio->size; in blkdev_bio_end_io()
147 iocb->ki_pos += ret; in blkdev_bio_end_io()
[all …]
Dholder.c34 int ret; in __link_disk_holder() local
36 ret = add_symlink(disk->slave_dir, bdev_kobj(bdev)); in __link_disk_holder()
37 if (ret) in __link_disk_holder()
38 return ret; in __link_disk_holder()
39 ret = add_symlink(bdev->bd_holder_dir, &disk_to_dev(disk)->kobj); in __link_disk_holder()
40 if (ret) in __link_disk_holder()
42 return ret; in __link_disk_holder()
76 int ret = 0; in bd_link_disk_holder() local
90 ret = -ENOMEM; in bd_link_disk_holder()
98 ret = __link_disk_holder(bdev, disk); in bd_link_disk_holder()
[all …]
Dblk-lib.c102 int ret; in blkdev_issue_discard() local
105 ret = __blkdev_issue_discard(bdev, sector, nr_sects, gfp_mask, &bio); in blkdev_issue_discard()
106 if (!ret && bio) { in blkdev_issue_discard()
107 ret = submit_bio_wait(bio); in blkdev_issue_discard()
108 if (ret == -EOPNOTSUPP) in blkdev_issue_discard()
109 ret = 0; in blkdev_issue_discard()
114 return ret; in blkdev_issue_discard()
222 int ret; in __blkdev_issue_zeroout() local
229 ret = __blkdev_issue_write_zeroes(bdev, sector, nr_sects, gfp_mask, in __blkdev_issue_zeroout()
231 if (ret != -EOPNOTSUPP || (flags & BLKDEV_ZERO_NOFALLBACK)) in __blkdev_issue_zeroout()
[all …]
Dblk-mq-sysfs.c111 int ret = 0, pos = 0; in blk_mq_hw_sysfs_cpus_show() local
115 ret = snprintf(pos + page, size - pos, "%u", i); in blk_mq_hw_sysfs_cpus_show()
117 ret = snprintf(pos + page, size - pos, ", %u", i); in blk_mq_hw_sysfs_cpus_show()
119 if (ret >= size - pos) in blk_mq_hw_sysfs_cpus_show()
123 pos += ret; in blk_mq_hw_sysfs_cpus_show()
126 ret = snprintf(pos + page, size + 1 - pos, "\n"); in blk_mq_hw_sysfs_cpus_show()
127 return pos + ret; in blk_mq_hw_sysfs_cpus_show()
188 int i, j, ret; in blk_mq_register_hctx() local
193 ret = kobject_add(&hctx->kobj, q->mq_kobj, "%u", hctx->queue_num); in blk_mq_register_hctx()
194 if (ret) in blk_mq_register_hctx()
[all …]
Dblk-sysfs.c72 int ret, err; in queue_requests_store() local
77 ret = queue_var_store(&nr, page, count); in queue_requests_store()
78 if (ret < 0) in queue_requests_store()
79 return ret; in queue_requests_store()
88 return ret; in queue_requests_store()
105 ssize_t ret; in queue_ra_store() local
109 ret = queue_var_store(&ra_kb, page, count); in queue_ra_store()
110 if (ret < 0) in queue_ra_store()
111 return ret; in queue_ra_store()
113 return ret; in queue_ra_store()
[all …]
Dbsg.c60 int ret; in bsg_sg_io() local
66 ret = bd->sg_io_fn(bd->queue, &hdr, mode, bsg_timeout(bd, &hdr)); in bsg_sg_io()
67 if (!ret && copy_to_user(uarg, &hdr, sizeof(hdr))) in bsg_sg_io()
69 return ret; in bsg_sg_io()
189 int ret; in bsg_register_queue() local
199 ret = ida_alloc_max(&bsg_minor_ida, BSG_MAX_DEVS - 1, GFP_KERNEL); in bsg_register_queue()
200 if (ret < 0) { in bsg_register_queue()
201 if (ret == -ENOSPC) in bsg_register_queue()
204 return ERR_PTR(ret); in bsg_register_queue()
206 bd->device.devt = MKDEV(bsg_major, ret); in bsg_register_queue()
[all …]
Dblk-mq-sched.c183 int ret; in blk_mq_do_dispatch_sched() local
186 ret = __blk_mq_do_dispatch_sched(hctx); in blk_mq_do_dispatch_sched()
187 if (ret != 1) in blk_mq_do_dispatch_sched()
195 return ret; in blk_mq_do_dispatch_sched()
222 int ret = 0; in blk_mq_do_dispatch_ctx() local
229 ret = -EAGAIN; in blk_mq_do_dispatch_ctx()
269 return ret; in blk_mq_do_dispatch_ctx()
276 int ret = 0; in __blk_mq_sched_dispatch_requests() local
307 ret = blk_mq_do_dispatch_sched(hctx); in __blk_mq_sched_dispatch_requests()
309 ret = blk_mq_do_dispatch_ctx(hctx); in __blk_mq_sched_dispatch_requests()
[all …]
Dbsg-lib.c35 int ret; in bsg_transport_sg_io_fn() local
59 ret = PTR_ERR(job->request); in bsg_transport_sg_io_fn()
66 ret = PTR_ERR(job->bidi_rq); in bsg_transport_sg_io_fn()
70 ret = blk_rq_map_user(rq->q, job->bidi_rq, NULL, in bsg_transport_sg_io_fn()
73 if (ret) in bsg_transport_sg_io_fn()
82 ret = 0; in bsg_transport_sg_io_fn()
84 ret = blk_rq_map_user(rq->q, rq, NULL, uptr64(hdr->dout_xferp), in bsg_transport_sg_io_fn()
87 ret = blk_rq_map_user(rq->q, rq, NULL, uptr64(hdr->din_xferp), in bsg_transport_sg_io_fn()
91 if (ret) in bsg_transport_sg_io_fn()
112 ret = job->result; in bsg_transport_sg_io_fn()
[all …]
Dsed-opal.c370 int ret; in opal_recv_check() local
382 ret = opal_recv_cmd(dev); in opal_recv_check()
383 } while (!ret); in opal_recv_check()
385 return ret; in opal_recv_check()
390 int ret; in opal_send_recv() local
392 ret = opal_send_cmd(dev); in opal_send_recv()
393 if (ret) in opal_send_recv()
394 return ret; in opal_send_recv()
395 ret = opal_recv_cmd(dev); in opal_send_recv()
396 if (ret) in opal_send_recv()
[all …]
Dblk-zoned.c195 int ret; in blkdev_zone_reset_all_emulated() local
201 ret = disk->fops->report_zones(disk, 0, disk->nr_zones, in blkdev_zone_reset_all_emulated()
203 if (ret < 0) in blkdev_zone_reset_all_emulated()
206 ret = 0; in blkdev_zone_reset_all_emulated()
223 ret = submit_bio_wait(bio); in blkdev_zone_reset_all_emulated()
229 return ret; in blkdev_zone_reset_all_emulated()
264 int ret = 0; in blkdev_zone_mgmt() local
307 ret = submit_bio_wait(bio); in blkdev_zone_mgmt()
310 return ret; in blkdev_zone_mgmt()
339 int ret; in blkdev_report_zones_ioctl() local
[all …]
Dioctl.c363 int ret, n; in blkdev_roset() local
371 ret = bdev->bd_disk->fops->set_read_only(bdev, n); in blkdev_roset()
372 if (ret) in blkdev_roset()
373 return ret; in blkdev_roset()
384 int ret; in blkdev_getgeo() local
397 ret = disk->fops->getgeo(bdev, &geo); in blkdev_getgeo()
398 if (ret) in blkdev_getgeo()
399 return ret; in blkdev_getgeo()
418 int ret; in compat_hdio_getgeo() local
431 ret = disk->fops->getgeo(bdev, &geo); in compat_hdio_getgeo()
[all …]
Dbdev.c53 int ret; in bdev_write_inode() local
58 ret = write_inode_now(inode, true); in bdev_write_inode()
59 if (ret) in bdev_write_inode()
62 bdev, ret); in bdev_write_inode()
526 long ret = 0; in nr_blockdev_pages() local
530 ret += inode->i_mapping->nrpages; in nr_blockdev_pages()
533 return ret; in nr_blockdev_pages()
676 int ret; in blkdev_get_whole() local
679 ret = disk->fops->open(bdev, mode); in blkdev_get_whole()
680 if (ret) { in blkdev_get_whole()
[all …]
Dgenhd.c225 int index, ret = 0; in __register_blkdev() local
239 ret = -EBUSY; in __register_blkdev()
243 ret = major; in __register_blkdev()
250 ret = -EINVAL; in __register_blkdev()
256 ret = -ENOMEM; in __register_blkdev()
276 ret = -EBUSY; in __register_blkdev()
279 if (ret < 0) { in __register_blkdev()
286 return ret; in __register_blkdev()
365 int ret = 0; in disk_scan_partitions() local
381 ret = bd_prepare_to_claim(disk->part0, disk_scan_partitions); in disk_scan_partitions()
[all …]
Dblk-cgroup.c275 int i, ret; in blkg_create() local
281 ret = -ENODEV; in blkg_create()
287 ret = -ENODEV; in blkg_create()
295 ret = -ENOMEM; in blkg_create()
305 ret = -ENODEV; in blkg_create()
321 ret = radix_tree_insert(&blkcg->blkg_tree, disk->queue->id, blkg); in blkg_create()
322 if (likely(!ret)) { in blkg_create()
336 if (!ret) in blkg_create()
341 return ERR_PTR(ret); in blkg_create()
347 return ERR_PTR(ret); in blkg_create()
[all …]
Dblk-pm.c63 int ret = 0; in blk_pre_runtime_suspend() local
66 return ret; in blk_pre_runtime_suspend()
81 ret = -EBUSY; in blk_pre_runtime_suspend()
92 ret = 0; in blk_pre_runtime_suspend()
96 if (ret < 0) { in blk_pre_runtime_suspend()
105 return ret; in blk_pre_runtime_suspend()
Dbounce.c37 int ret; in init_bounce_bioset() local
42 ret = bioset_init(&bounce_bio_set, BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS); in init_bounce_bioset()
43 BUG_ON(ret); in init_bounce_bioset()
47 ret = bioset_init(&bounce_bio_split, BIO_POOL_SIZE, 0, 0); in init_bounce_bioset()
48 BUG_ON(ret); in init_bounce_bioset()
54 int ret; in init_emergency_pool() local
61 ret = mempool_init_page_pool(&page_pool, POOL_SIZE, 0); in init_emergency_pool()
62 BUG_ON(ret); in init_emergency_pool()
Dblk-mq.c584 int ret; in blk_mq_alloc_request() local
586 ret = blk_queue_enter(q, flags); in blk_mq_alloc_request()
587 if (ret) in blk_mq_alloc_request()
588 return ERR_PTR(ret); in blk_mq_alloc_request()
617 int ret; in blk_mq_alloc_request_hctx() local
636 ret = blk_queue_enter(q, flags); in blk_mq_alloc_request_hctx()
637 if (ret) in blk_mq_alloc_request_hctx()
638 return ERR_PTR(ret); in blk_mq_alloc_request_hctx()
644 ret = -EXDEV; in blk_mq_alloc_request_hctx()
661 ret = -EWOULDBLOCK; in blk_mq_alloc_request_hctx()
[all …]
Delevator.c327 enum elv_merge ret = blk_try_merge(q->last_merge, bio); in elv_merge() local
329 if (ret != ELEVATOR_NO_MERGE) { in elv_merge()
331 return ret; in elv_merge()
368 bool ret; in elv_attempt_insert_merge() local
384 ret = false; in elv_attempt_insert_merge()
395 ret = true; in elv_attempt_insert_merge()
399 return ret; in elv_attempt_insert_merge()
594 int ret; in elevator_switch_mq() local
603 ret = blk_mq_init_sched(q, new_e); in elevator_switch_mq()
604 if (ret) in elevator_switch_mq()
[all …]
Dblk-mq-cpumap.c26 unsigned int ret; in get_first_sibling() local
28 ret = cpumask_first(topology_sibling_cpumask(cpu)); in get_first_sibling()
29 if (ret < nr_cpu_ids) in get_first_sibling()
30 return ret; in get_first_sibling()
Dblk-ia-ranges.c112 int i, ret; in disk_register_independent_access_ranges() local
125 ret = kobject_init_and_add(&iars->kobj, &blk_ia_ranges_ktype, in disk_register_independent_access_ranges()
127 if (ret) { in disk_register_independent_access_ranges()
130 return ret; in disk_register_independent_access_ranges()
134 ret = kobject_init_and_add(&iars->ia_range[i].kobj, in disk_register_independent_access_ranges()
137 if (ret) { in disk_register_independent_access_ranges()
142 return ret; in disk_register_independent_access_ranges()
Dbfq-cgroup.c21 int ret; in bfq_stat_init() local
23 ret = percpu_counter_init(&stat->cpu_cnt, 0, gfp); in bfq_stat_init()
24 if (ret) in bfq_stat_init()
25 return ret; in bfq_stat_init()
1074 int ret = -ERANGE; in bfq_io_set_weight_legacy() local
1077 return ret; in bfq_io_set_weight_legacy()
1079 ret = 0; in bfq_io_set_weight_legacy()
1090 return ret; in bfq_io_set_weight_legacy()
1097 int ret; in bfq_io_set_device_weight() local
1103 ret = blkg_conf_prep(blkcg, &blkcg_policy_bfq, buf, &ctx); in bfq_io_set_device_weight()
[all …]
/block/partitions/
Dcmdline.c44 int ret = 0; in parse_subpart() local
60 ret = -EINVAL; in parse_subpart()
78 ret = -EINVAL; in parse_subpart()
107 return ret; in parse_subpart()
123 int ret = -EINVAL; in parse_parts() local
159 ret = parse_subpart(next_subpart, buf); in parse_parts()
160 if (ret) in parse_parts()
169 ret = -EINVAL; in parse_parts()
179 return ret; in parse_parts()
197 int ret; in cmdline_parts_parse() local
[all …]
Dcore.c448 int ret; in bdev_add_partition() local
452 ret = -ENXIO; in bdev_add_partition()
457 ret = -EINVAL; in bdev_add_partition()
462 ret = -EBUSY; in bdev_add_partition()
468 ret = PTR_ERR_OR_ZERO(part); in bdev_add_partition()
471 return ret; in bdev_add_partition()
477 int ret = -ENXIO; in bdev_del_partition() local
484 ret = -EBUSY; in bdev_del_partition()
489 ret = 0; in bdev_del_partition()
492 return ret; in bdev_del_partition()
[all …]

12