Home
last modified time | relevance | path

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

12

/block/
Dioprio.c107 int ret; in SYSCALL_DEFINE3() local
109 ret = ioprio_check_cap(ioprio); in SYSCALL_DEFINE3()
110 if (ret) in SYSCALL_DEFINE3()
111 return ret; in SYSCALL_DEFINE3()
113 ret = -ESRCH; in SYSCALL_DEFINE3()
122 ret = set_task_ioprio(p, ioprio); in SYSCALL_DEFINE3()
130 ret = set_task_ioprio(p, ioprio); in SYSCALL_DEFINE3()
131 if (ret) in SYSCALL_DEFINE3()
151 ret = set_task_ioprio(p, ioprio); in SYSCALL_DEFINE3()
152 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()
127 return ret; in bio_uncopy_user()
[all …]
Dblk-sysfs.c70 int ret, err; in queue_requests_store() local
75 ret = queue_var_store(&nr, page, count); in queue_requests_store()
76 if (ret < 0) in queue_requests_store()
77 return ret; in queue_requests_store()
86 return ret; in queue_requests_store()
101 ssize_t ret = queue_var_store(&ra_kb, page, count); in queue_ra_store() local
103 if (ret < 0) in queue_ra_store()
104 return ret; in queue_ra_store()
108 return ret; in queue_ra_store()
186 ssize_t ret = queue_var_store(&max_discard, page, count); in queue_discard_max_store() local
[all …]
Dblk-lib.c136 int ret; in blkdev_issue_discard() local
139 ret = __blkdev_issue_discard(bdev, sector, nr_sects, gfp_mask, flags, in blkdev_issue_discard()
141 if (!ret && bio) { in blkdev_issue_discard()
142 ret = submit_bio_wait(bio); in blkdev_issue_discard()
143 if (ret == -EOPNOTSUPP) in blkdev_issue_discard()
144 ret = 0; in blkdev_issue_discard()
149 return ret; in blkdev_issue_discard()
232 int ret; in blkdev_issue_write_same() local
235 ret = __blkdev_issue_write_same(bdev, sector, nr_sects, gfp_mask, page, in blkdev_issue_write_same()
237 if (ret == 0 && bio) { in blkdev_issue_write_same()
[all …]
Dblk-mq-sysfs.c161 int ret = 0, pos = 0; in blk_mq_hw_sysfs_cpus_show() local
165 ret = snprintf(pos + page, size - pos, "%u", i); in blk_mq_hw_sysfs_cpus_show()
167 ret = snprintf(pos + page, size - pos, ", %u", i); in blk_mq_hw_sysfs_cpus_show()
169 if (ret >= size - pos) in blk_mq_hw_sysfs_cpus_show()
173 pos += ret; in blk_mq_hw_sysfs_cpus_show()
176 ret = snprintf(pos + page, size + 1 - pos, "\n"); in blk_mq_hw_sysfs_cpus_show()
177 return pos + ret; in blk_mq_hw_sysfs_cpus_show()
245 int i, j, ret; in blk_mq_register_hctx() local
250 ret = kobject_add(&hctx->kobj, q->mq_kobj, "%u", hctx->queue_num); in blk_mq_register_hctx()
251 if (ret) in blk_mq_register_hctx()
[all …]
Dbsg.c93 int ret = 0; in bsg_scsi_complete_rq() local
111 ret = -EFAULT; in bsg_scsi_complete_rq()
121 return ret; in bsg_scsi_complete_rq()
141 int ret; in bsg_sg_io() local
151 ret = q->bsg_dev.ops->check_proto(&hdr); in bsg_sg_io()
152 if (ret) in bsg_sg_io()
153 return ret; in bsg_sg_io()
160 ret = q->bsg_dev.ops->fill_hdr(rq, &hdr, mode); in bsg_sg_io()
161 if (ret) { in bsg_sg_io()
163 return ret; in bsg_sg_io()
[all …]
Dioctl.c371 static inline int is_unrecognized_ioctl(int ret) in is_unrecognized_ioctl() argument
373 return ret == -EINVAL || in is_unrecognized_ioctl()
374 ret == -ENOTTY || in is_unrecognized_ioctl()
375 ret == -ENOIOCTLCMD; in is_unrecognized_ioctl()
381 int ret; in blkdev_flushbuf() local
386 ret = __blkdev_driver_ioctl(bdev, mode, cmd, arg); in blkdev_flushbuf()
387 if (!is_unrecognized_ioctl(ret)) in blkdev_flushbuf()
388 return ret; in blkdev_flushbuf()
398 int ret, n; in blkdev_roset() local
403 ret = __blkdev_driver_ioctl(bdev, mode, cmd, arg); in blkdev_roset()
[all …]
Dblk-mq-sched.c196 int ret; in blk_mq_do_dispatch_sched() local
199 ret = __blk_mq_do_dispatch_sched(hctx); in blk_mq_do_dispatch_sched()
200 if (ret != 1) in blk_mq_do_dispatch_sched()
208 return ret; in blk_mq_do_dispatch_sched()
235 int ret = 0; in blk_mq_do_dispatch_ctx() local
240 ret = -EAGAIN; in blk_mq_do_dispatch_ctx()
277 return ret; in blk_mq_do_dispatch_ctx()
285 int ret = 0; in __blk_mq_sched_dispatch_requests() local
316 ret = blk_mq_do_dispatch_sched(hctx); in __blk_mq_sched_dispatch_requests()
318 ret = blk_mq_do_dispatch_ctx(hctx); in __blk_mq_sched_dispatch_requests()
[all …]
Dbsg-lib.c40 int ret; in bsg_transport_fill_hdr() local
50 ret = PTR_ERR(job->bidi_rq); in bsg_transport_fill_hdr()
54 ret = blk_rq_map_user(rq->q, job->bidi_rq, NULL, in bsg_transport_fill_hdr()
57 if (ret) in bsg_transport_fill_hdr()
73 return ret; in bsg_transport_fill_hdr()
79 int ret = 0; in bsg_transport_complete_rq() local
96 ret = job->result; in bsg_transport_complete_rq()
103 ret = -EFAULT; in bsg_transport_complete_rq()
122 return ret; in bsg_transport_complete_rq()
227 int ret; in bsg_prepare_job() local
[all …]
Dsed-opal.c339 int ret; in opal_recv_check() local
351 ret = opal_recv_cmd(dev); in opal_recv_check()
352 } while (!ret); in opal_recv_check()
354 return ret; in opal_recv_check()
359 int ret; in opal_send_recv() local
361 ret = opal_send_cmd(dev); in opal_send_recv()
362 if (ret) in opal_send_recv()
363 return ret; in opal_send_recv()
364 ret = opal_recv_cmd(dev); in opal_send_recv()
365 if (ret) in opal_send_recv()
[all …]
Dcmdline-parser.c13 int ret = 0; in parse_subpart() local
29 ret = -EINVAL; in parse_subpart()
47 ret = -EINVAL; in parse_subpart()
76 return ret; in parse_subpart()
92 int ret = -EINVAL; in parse_parts() local
128 ret = parse_subpart(next_subpart, buf); in parse_parts()
129 if (ret) in parse_parts()
138 ret = -EINVAL; in parse_parts()
148 return ret; in parse_parts()
166 int ret; in cmdline_parts_parse() local
[all …]
Dblk-zoned.c211 int ret; in blkdev_zone_mgmt() local
255 ret = submit_bio_wait(bio); in blkdev_zone_mgmt()
258 return ret; in blkdev_zone_mgmt()
287 int ret; in blkdev_report_zones_ioctl() local
306 ret = blkdev_report_zones(bdev, rep.sector, rep.nr_zones, in blkdev_report_zones_ioctl()
308 if (ret < 0) in blkdev_report_zones_ioctl()
309 return ret; in blkdev_report_zones_ioctl()
311 rep.nr_zones = ret; in blkdev_report_zones_ioctl()
345 int ret; in blkdev_zone_mgmt_ioctl() local
368 ret = blkdev_truncate_zone_range(bdev, mode, &zrange); in blkdev_zone_mgmt_ioctl()
[all …]
Dblk-ioprio.c106 int ret; in ioprio_set_prio_policy() local
111 ret = sysfs_match_string(policy_name, buf); in ioprio_set_prio_policy()
112 if (ret < 0) in ioprio_set_prio_policy()
113 return ret; in ioprio_set_prio_policy()
114 blkcg->prio_policy = ret; in ioprio_set_prio_policy()
224 int ret; in blk_ioprio_init() local
230 ret = blkcg_activate_policy(q, &ioprio_policy); in blk_ioprio_init()
231 if (ret) { in blk_ioprio_init()
233 return ret; in blk_ioprio_init()
Dblk-cgroup.c237 int i, ret; in blkg_create() local
244 ret = -ENODEV; in blkg_create()
250 ret = -ENODEV; in blkg_create()
258 ret = -ENOMEM; in blkg_create()
268 ret = -ENODEV; in blkg_create()
284 ret = radix_tree_insert(&blkcg->blkg_tree, q->id, blkg); in blkg_create()
285 if (likely(!ret)) { in blkg_create()
299 if (!ret) in blkg_create()
304 return ERR_PTR(ret); in blkg_create()
310 return ERR_PTR(ret); in blkg_create()
[all …]
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()
55 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()
108 int ret; in init_emergency_isa_pool() local
117 ret = mempool_init(&isa_page_pool, ISA_POOL_SIZE, mempool_alloc_pages_isa, in init_emergency_isa_pool()
[all …]
Dblk-mq.c415 int ret; in blk_mq_alloc_request() local
417 ret = blk_queue_enter(q, flags); in blk_mq_alloc_request()
418 if (ret) in blk_mq_alloc_request()
419 return ERR_PTR(ret); in blk_mq_alloc_request()
445 int ret; in blk_mq_alloc_request_hctx() local
464 ret = blk_queue_enter(q, flags); in blk_mq_alloc_request_hctx()
465 if (ret) in blk_mq_alloc_request_hctx()
466 return ERR_PTR(ret); in blk_mq_alloc_request_hctx()
472 ret = -EXDEV; in blk_mq_alloc_request_hctx()
484 ret = -EWOULDBLOCK; in blk_mq_alloc_request_hctx()
[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()
Delevator.c322 enum elv_merge ret = blk_try_merge(q->last_merge, bio); in elv_merge() local
324 if (ret != ELEVATOR_NO_MERGE) { in elv_merge()
326 return ret; in elv_merge()
361 bool ret; in elv_attempt_insert_merge() local
375 ret = false; in elv_attempt_insert_merge()
385 ret = true; in elv_attempt_insert_merge()
389 return ret; in elv_attempt_insert_merge()
578 int ret; in elevator_switch_mq() local
590 ret = blk_mq_init_sched(q, new_e); in elevator_switch_mq()
591 if (ret) in elevator_switch_mq()
[all …]
Dscsi_ioctl.c250 int r, ret = 0; in blk_complete_sghdr_rq() local
272 ret = -EFAULT; in blk_complete_sghdr_rq()
276 if (!ret) in blk_complete_sghdr_rq()
277 ret = r; in blk_complete_sghdr_rq()
279 return ret; in blk_complete_sghdr_rq()
286 ssize_t ret = 0; in sg_io() local
313 ret = -ENOMEM; in sg_io()
325 ret = blk_fill_sghdr_rq(q, rq, hdr, mode); in sg_io()
326 if (ret < 0) in sg_io()
329 ret = 0; in sg_io()
[all …]
Dblk-core.c487 int ret; in bio_queue_enter() local
489 ret = blk_queue_enter(q, nowait ? BLK_MQ_REQ_NOWAIT : 0); in bio_queue_enter()
490 if (unlikely(ret)) { in bio_queue_enter()
497 return ret; in bio_queue_enter()
527 int ret; in blk_alloc_queue() local
541 ret = bioset_init(&q->bio_split, BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS); in blk_alloc_queue()
542 if (ret) in blk_alloc_queue()
756 int ret = -EIO; in blk_partition_remap() local
775 ret = 0; in blk_partition_remap()
778 return ret; in blk_partition_remap()
[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()
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()
1059 int ret = -ERANGE; in bfq_io_set_weight_legacy() local
1062 return ret; in bfq_io_set_weight_legacy()
1064 ret = 0; in bfq_io_set_weight_legacy()
1075 return ret; in bfq_io_set_weight_legacy()
1082 int ret; in bfq_io_set_device_weight() local
1088 ret = blkg_conf_prep(blkcg, &blkcg_policy_bfq, buf, &ctx); in bfq_io_set_device_weight()
[all …]
Dblk-throttle.c303 uint64_t ret; in tg_bps_limit() local
309 ret = tg->bps[rw][td->limit_index]; in tg_bps_limit()
310 if (ret == 0 && td->limit_index == LIMIT_LOW) { in tg_bps_limit()
324 ret = min(tg->bps[rw][LIMIT_MAX], adjusted); in tg_bps_limit()
326 return ret; in tg_bps_limit()
333 unsigned int ret; in tg_iops_limit() local
339 ret = tg->iops[rw][td->limit_index]; in tg_iops_limit()
340 if (ret == 0 && tg->td->limit_index == LIMIT_LOW) { in tg_iops_limit()
356 ret = min_t(unsigned int, tg->iops[rw][LIMIT_MAX], adjusted); in tg_iops_limit()
358 return ret; in tg_iops_limit()
[all …]
Dbio-integrity.c170 blk_status_t ret = BLK_STS_OK; in bio_integrity_process() local
185 ret = proc_fn(&iter); in bio_integrity_process()
186 if (ret) { in bio_integrity_process()
188 return ret; in bio_integrity_process()
193 return ret; in bio_integrity_process()
276 int ret; in bio_integrity_prep() local
285 ret = bio_integrity_add_page(bio, virt_to_page(buf), in bio_integrity_prep()
288 if (ret == 0) { in bio_integrity_prep()
294 if (ret < bytes) in bio_integrity_prep()
/block/partitions/
Dcore.c546 int ret; in bdev_del_partition() local
555 ret = -ENXIO; in bdev_del_partition()
560 ret = -EBUSY; in bdev_del_partition()
568 ret = 0; in bdev_del_partition()
575 return ret; in bdev_del_partition()
583 int ret = 0; in bdev_resize_partition() local
589 ret = -ENOMEM; in bdev_resize_partition()
597 ret = -EINVAL; in bdev_resize_partition()
601 ret = -EBUSY; in bdev_resize_partition()
608 ret = 0; in bdev_resize_partition()
[all …]

12