Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 18 of 18) sorted by relevance

/block/
Dgenhd.c107 const char *bdevname(struct block_device *bdev, char *buf) in bdevname() argument
113 snprintf(buf, BDEVNAME_SIZE, "%s", hd->disk_name); in bdevname()
115 snprintf(buf, BDEVNAME_SIZE, "%sp%d", hd->disk_name, partno); in bdevname()
117 snprintf(buf, BDEVNAME_SIZE, "%s%d", hd->disk_name, partno); in bdevname()
119 return buf; in bdevname()
338 static char *bdevt_str(dev_t devt, char *buf) in bdevt_str() argument
343 snprintf(buf, BDEVT_SIZE, "%-9s", tbuf); in bdevt_str()
345 snprintf(buf, BDEVT_SIZE, "%03x:%05x", MAJOR(devt), MINOR(devt)); in bdevt_str()
347 return buf; in bdevt_str()
862 struct device_attribute *attr, char *buf) in disk_range_show() argument
[all …]
Ddisk-events.c340 static ssize_t __disk_events_show(unsigned int events, char *buf) in __disk_events_show() argument
348 pos += sprintf(buf + pos, "%s%s", in __disk_events_show()
353 pos += sprintf(buf + pos, "\n"); in __disk_events_show()
358 struct device_attribute *attr, char *buf) in disk_events_show() argument
364 return __disk_events_show(disk->events, buf); in disk_events_show()
368 struct device_attribute *attr, char *buf) in disk_events_async_show() argument
375 char *buf) in disk_events_poll_msecs_show() argument
380 return sprintf(buf, "-1\n"); in disk_events_poll_msecs_show()
381 return sprintf(buf, "%ld\n", disk->ev->poll_msecs); in disk_events_poll_msecs_show()
386 const char *buf, size_t count) in disk_events_poll_msecs_store() argument
[all …]
Dbio-integrity.c202 void *buf; in bio_integrity_prep() local
235 buf = kmalloc(len, GFP_NOIO); in bio_integrity_prep()
237 if (unlikely(buf == NULL)) { in bio_integrity_prep()
242 end = (((unsigned long) buf) + len + PAGE_SIZE - 1) >> PAGE_SHIFT; in bio_integrity_prep()
243 start = ((unsigned long) buf) >> PAGE_SHIFT; in bio_integrity_prep()
250 kfree(buf); in bio_integrity_prep()
263 offset = offset_in_page(buf); in bio_integrity_prep()
274 ret = bio_integrity_add_page(bio, virt_to_page(buf), in bio_integrity_prep()
286 buf += bytes; in bio_integrity_prep()
Dblk-timeout.c40 char *buf) in part_timeout_show() argument
45 return sprintf(buf, "%d\n", set != 0); in part_timeout_show()
49 const char *buf, size_t count) in part_timeout_store() argument
56 char *p = (char *) buf; in part_timeout_store()
Dbsg-lib.c205 static int bsg_map_buffer(struct bsg_buffer *buf, struct request *req) in bsg_map_buffer() argument
211 buf->sg_list = kmalloc(sz, GFP_KERNEL); in bsg_map_buffer()
212 if (!buf->sg_list) in bsg_map_buffer()
214 sg_init_table(buf->sg_list, req->nr_phys_segments); in bsg_map_buffer()
215 buf->sg_cnt = blk_rq_map_sg(req->q, req, buf->sg_list); in bsg_map_buffer()
216 buf->payload_len = blk_rq_bytes(req); in bsg_map_buffer()
Dblk-mq-debugfs.c147 static ssize_t queue_state_write(void *data, const char __user *buf, in queue_state_write() argument
166 if (copy_from_user(opbuf, buf, count)) in queue_state_write()
195 static ssize_t queue_write_hint_store(void *data, const char __user *buf, in queue_write_hint_store() argument
542 static ssize_t hctx_io_poll_write(void *data, const char __user *buf, in hctx_io_poll_write() argument
568 static ssize_t hctx_dispatched_write(void *data, const char __user *buf, in hctx_dispatched_write() argument
587 static ssize_t hctx_queued_write(void *data, const char __user *buf, in hctx_queued_write() argument
604 static ssize_t hctx_run_write(void *data, const char __user *buf, size_t count, in hctx_run_write() argument
674 static ssize_t ctx_dispatched_write(void *data, const char __user *buf, in ctx_dispatched_write() argument
691 static ssize_t ctx_merged_write(void *data, const char __user *buf, in ctx_merged_write() argument
708 static ssize_t ctx_completed_write(void *data, const char __user *buf, in ctx_completed_write() argument
[all …]
Dblk.h255 char *buf);
257 char *buf);
259 char *buf);
261 char *buf);
263 const char *buf, size_t count);
Dblk-iocost.c3079 static ssize_t ioc_weight_write(struct kernfs_open_file *of, char *buf, in ioc_weight_write() argument
3090 if (!strchr(buf, ':')) { in ioc_weight_write()
3093 if (!sscanf(buf, "default %u", &v) && !sscanf(buf, "%u", &v)) in ioc_weight_write()
3116 ret = blkg_conf_prep(blkcg, &blkcg_policy_iocost, buf, &ctx); in ioc_weight_write()
3224 char buf[32]; in ioc_qos_write() local
3237 match_strlcpy(buf, &args[0], sizeof(buf)); in ioc_qos_write()
3238 if (!strcmp(buf, "auto")) in ioc_qos_write()
3240 else if (!strcmp(buf, "user")) in ioc_qos_write()
3251 if (match_strlcpy(buf, &args[0], sizeof(buf)) >= in ioc_qos_write()
3252 sizeof(buf)) in ioc_qos_write()
[all …]
Dblk-ioprio.c102 static ssize_t ioprio_set_prio_policy(struct kernfs_open_file *of, char *buf, in ioprio_set_prio_policy() argument
111 ret = sysfs_match_string(policy_name, buf); in ioprio_set_prio_policy()
Dbfq-cgroup.c1089 char *buf, size_t nbytes, in bfq_io_set_device_weight() argument
1098 ret = blkg_conf_prep(blkcg, &blkcg_policy_bfq, buf, &ctx); in bfq_io_set_device_weight()
1127 char *buf, size_t nbytes, in bfq_io_set_weight() argument
1134 buf = strim(buf); in bfq_io_set_weight()
1137 v = simple_strtoull(buf, &endp, 0); in bfq_io_set_weight()
1138 if (*endp == '\0' || sscanf(buf, "default %llu", &v) == 1) { in bfq_io_set_weight()
1143 return bfq_io_set_device_weight(of, buf, nbytes, off); in bfq_io_set_weight()
Dblk-throttle.c1466 char *buf, size_t nbytes, loff_t off, bool is_u64) in tg_set_conf() argument
1474 ret = blkg_conf_prep(blkcg, &blkcg_policy_throtl, buf, &ctx); in tg_set_conf()
1499 char *buf, size_t nbytes, loff_t off) in tg_set_conf_u64() argument
1501 return tg_set_conf(of, buf, nbytes, off, true); in tg_set_conf_u64()
1505 char *buf, size_t nbytes, loff_t off) in tg_set_conf_uint() argument
1507 return tg_set_conf(of, buf, nbytes, off, false); in tg_set_conf_uint()
1655 char *buf, size_t nbytes, loff_t off) in tg_set_limit() argument
1666 ret = blkg_conf_prep(blkcg, &blkcg_policy_throtl, buf, &ctx); in tg_set_limit()
Dblk-iolatency.c834 static ssize_t iolatency_set_limit(struct kernfs_open_file *of, char *buf, in iolatency_set_limit() argument
846 ret = blkg_conf_prep(blkcg, &blkcg_policy_iolatency, buf, &ctx); in iolatency_set_limit()
Dsed-opal.c848 static int response_parse(const u8 *buf, size_t length, in response_parse() argument
859 if (!buf) in response_parse()
865 hdr = (struct opal_header *)buf; in response_parse()
866 pos = buf; in response_parse()
883 if (pos > buf + length) in response_parse()
Dbio.c774 const char *bio_devname(struct bio *bio, char *buf) in bio_devname() argument
776 return bdevname(bio->bi_bdev, buf); in bio_devname()
/block/partitions/
Dcmdline.c128 char buf[BDEVNAME_SIZE + 32 + 4]; in parse_parts() local
153 length = (!next) ? (sizeof(buf) - 1) : in parse_parts()
154 min_t(int, next - bdevdef, sizeof(buf) - 1); in parse_parts()
156 strncpy(buf, bdevdef, length); in parse_parts()
157 buf[length] = '\0'; in parse_parts()
159 ret = parse_subpart(next_subpart, buf); in parse_parts()
198 char *buf; in cmdline_parts_parse() local
205 next = pbuf = buf = kstrdup(cmdline, GFP_KERNEL); in cmdline_parts_parse()
206 if (!buf) in cmdline_parts_parse()
234 kfree(buf); in cmdline_parts_parse()
Dcore.c184 struct device_attribute *attr, char *buf) in part_partition_show() argument
186 return sprintf(buf, "%d\n", dev_to_bdev(dev)->bd_partno); in part_partition_show()
190 struct device_attribute *attr, char *buf) in part_start_show() argument
192 return sprintf(buf, "%llu\n", dev_to_bdev(dev)->bd_start_sect); in part_start_show()
196 struct device_attribute *attr, char *buf) in part_ro_show() argument
198 return sprintf(buf, "%d\n", bdev_read_only(dev_to_bdev(dev))); in part_ro_show()
202 struct device_attribute *attr, char *buf) in part_alignment_offset_show() argument
206 return sprintf(buf, "%u\n", in part_alignment_offset_show()
212 struct device_attribute *attr, char *buf) in part_discard_alignment_show() argument
216 return sprintf(buf, "%u\n", in part_discard_alignment_show()
[all …]
Dldm.c817 char buf[64]; in ldm_parse_dgr4() local
841 ldm_get_vstr (buffer + 0x18 + r_objid, buf, sizeof (buf)); in ldm_parse_dgr4()
1113 static bool ldm_parse_vblk (const u8 *buf, int len, struct vblk *vb) in ldm_parse_vblk() argument
1118 BUG_ON (!buf || !vb); in ldm_parse_vblk()
1120 r_objid = ldm_relative (buf, len, 0x18, 0); in ldm_parse_vblk()
1126 vb->flags = buf[0x12]; in ldm_parse_vblk()
1127 vb->type = buf[0x13]; in ldm_parse_vblk()
1128 vb->obj_id = ldm_get_vnum (buf + 0x18); in ldm_parse_vblk()
1129 ldm_get_vstr (buf+0x18+r_objid, vb->name, sizeof (vb->name)); in ldm_parse_vblk()
1132 case VBLK_CMP3: result = ldm_parse_cmp3 (buf, len, vb); break; in ldm_parse_vblk()
[all …]
Defi.c120 efi_crc32(const void *buf, unsigned long len) in efi_crc32() argument
122 return (crc32(~0L, buf, len) ^ ~0L); in efi_crc32()