Home
last modified time | relevance | path

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

/block/
Dgenhd.c329 static char *bdevt_str(dev_t devt, char *buf) in bdevt_str() argument
334 snprintf(buf, BDEVT_SIZE, "%-9s", tbuf); in bdevt_str()
336 snprintf(buf, BDEVT_SIZE, "%03x:%05x", MAJOR(devt), MINOR(devt)); in bdevt_str()
338 return buf; in bdevt_str()
932 struct device_attribute *attr, char *buf) in disk_range_show() argument
936 return sprintf(buf, "%d\n", disk->minors); in disk_range_show()
940 struct device_attribute *attr, char *buf) in disk_ext_range_show() argument
944 return sprintf(buf, "%d\n", in disk_ext_range_show()
949 struct device_attribute *attr, char *buf) in disk_removable_show() argument
953 return sprintf(buf, "%d\n", in disk_removable_show()
[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 …]
Dblk-ia-ranges.c16 char *buf) in blk_ia_range_sector_show() argument
18 return sprintf(buf, "%llu\n", iar->sector); in blk_ia_range_sector_show()
23 char *buf) in blk_ia_range_nr_sectors_show() argument
25 return sprintf(buf, "%llu\n", iar->nr_sectors); in blk_ia_range_nr_sectors_show()
30 ssize_t (*show)(struct blk_independent_access_range *iar, char *buf);
51 struct attribute *attr, char *buf) in blk_ia_range_sysfs_show() argument
58 return entry->show(iar, buf); in blk_ia_range_sysfs_show()
Dbio-integrity.c198 void *buf; in bio_integrity_prep() local
231 buf = kmalloc(len, GFP_NOIO); in bio_integrity_prep()
233 if (unlikely(buf == NULL)) { in bio_integrity_prep()
238 end = (((unsigned long) buf) + len + PAGE_SIZE - 1) >> PAGE_SHIFT; in bio_integrity_prep()
239 start = ((unsigned long) buf) >> PAGE_SHIFT; in bio_integrity_prep()
246 kfree(buf); in bio_integrity_prep()
259 offset = offset_in_page(buf); in bio_integrity_prep()
270 ret = bio_integrity_add_page(bio, virt_to_page(buf), in bio_integrity_prep()
282 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.c212 static int bsg_map_buffer(struct bsg_buffer *buf, struct request *req) in bsg_map_buffer() argument
218 buf->sg_list = kmalloc(sz, GFP_KERNEL); in bsg_map_buffer()
219 if (!buf->sg_list) in bsg_map_buffer()
221 sg_init_table(buf->sg_list, req->nr_phys_segments); in bsg_map_buffer()
222 buf->sg_cnt = blk_rq_map_sg(req->q, req, buf->sg_list); in bsg_map_buffer()
223 buf->payload_len = blk_rq_bytes(req); in bsg_map_buffer()
Dblk-iocost.c3068 static ssize_t ioc_weight_write(struct kernfs_open_file *of, char *buf, in ioc_weight_write() argument
3079 if (!strchr(buf, ':')) { in ioc_weight_write()
3082 if (!sscanf(buf, "default %u", &v) && !sscanf(buf, "%u", &v)) in ioc_weight_write()
3105 ret = blkg_conf_prep(blkcg, &blkcg_policy_iocost, buf, &ctx); in ioc_weight_write()
3215 char buf[32]; in ioc_qos_write() local
3228 match_strlcpy(buf, &args[0], sizeof(buf)); in ioc_qos_write()
3229 if (!strcmp(buf, "auto")) in ioc_qos_write()
3231 else if (!strcmp(buf, "user")) in ioc_qos_write()
3242 if (match_strlcpy(buf, &args[0], sizeof(buf)) >= in ioc_qos_write()
3243 sizeof(buf)) in ioc_qos_write()
[all …]
Dblk.h314 char *buf);
316 char *buf);
318 char *buf);
320 char *buf);
322 const char *buf, size_t count);
Dblk-ioprio.c105 static ssize_t ioprio_set_prio_policy(struct kernfs_open_file *of, char *buf, in ioprio_set_prio_policy() argument
114 ret = sysfs_match_string(policy_name, buf); in ioprio_set_prio_policy()
Dbfq-cgroup.c1094 char *buf, size_t nbytes, in bfq_io_set_device_weight() argument
1103 ret = blkg_conf_prep(blkcg, &blkcg_policy_bfq, buf, &ctx); in bfq_io_set_device_weight()
1132 char *buf, size_t nbytes, in bfq_io_set_weight() argument
1139 buf = strim(buf); in bfq_io_set_weight()
1142 v = simple_strtoull(buf, &endp, 0); in bfq_io_set_weight()
1143 if (*endp == '\0' || sscanf(buf, "default %llu", &v) == 1) { in bfq_io_set_weight()
1148 return bfq_io_set_device_weight(of, buf, nbytes, off); in bfq_io_set_weight()
Dblk-mq-debugfs.c146 static ssize_t queue_state_write(void *data, const char __user *buf, in queue_state_write() argument
164 if (copy_from_user(opbuf, buf, count)) in queue_state_write()
517 static ssize_t hctx_run_write(void *data, const char __user *buf, size_t count, in hctx_run_write() argument
587 static ssize_t blk_mq_debugfs_write(struct file *file, const char __user *buf, in blk_mq_debugfs_write() argument
601 return attr->write(data, buf, count, ppos); in blk_mq_debugfs_write()
Dblk-cgroup.h299 static inline int blkg_path(struct blkcg_gq *blkg, char *buf, int buflen) in blkg_path() argument
301 return cgroup_path(blkg->blkcg->css.cgroup, buf, buflen); in blkg_path()
Dblk-throttle.c1384 char *buf, size_t nbytes, loff_t off, bool is_u64) in tg_set_conf() argument
1392 ret = blkg_conf_prep(blkcg, &blkcg_policy_throtl, buf, &ctx); in tg_set_conf()
1418 char *buf, size_t nbytes, loff_t off) in tg_set_conf_u64() argument
1420 return tg_set_conf(of, buf, nbytes, off, true); in tg_set_conf_u64()
1424 char *buf, size_t nbytes, loff_t off) in tg_set_conf_uint() argument
1426 return tg_set_conf(of, buf, nbytes, off, false); in tg_set_conf_uint()
1574 char *buf, size_t nbytes, loff_t off) in tg_set_limit() argument
1585 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.c888 static int response_parse(const u8 *buf, size_t length, in response_parse() argument
899 if (!buf) in response_parse()
905 hdr = (struct opal_header *)buf; in response_parse()
906 pos = buf; in response_parse()
923 if (pos > buf + length) in response_parse()
/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.c182 struct device_attribute *attr, char *buf) in part_partition_show() argument
184 return sprintf(buf, "%d\n", dev_to_bdev(dev)->bd_partno); in part_partition_show()
188 struct device_attribute *attr, char *buf) in part_start_show() argument
190 return sprintf(buf, "%llu\n", dev_to_bdev(dev)->bd_start_sect); in part_start_show()
194 struct device_attribute *attr, char *buf) in part_ro_show() argument
196 return sprintf(buf, "%d\n", bdev_read_only(dev_to_bdev(dev))); in part_ro_show()
200 struct device_attribute *attr, char *buf) in part_alignment_offset_show() argument
202 return sprintf(buf, "%u\n", bdev_alignment_offset(dev_to_bdev(dev))); in part_alignment_offset_show()
206 struct device_attribute *attr, char *buf) in part_discard_alignment_show() argument
208 return sprintf(buf, "%u\n", bdev_discard_alignment(dev_to_bdev(dev))); in part_discard_alignment_show()
[all …]
Dldm.c813 char buf[64]; in ldm_parse_dgr4() local
834 ldm_get_vstr (buffer + 0x18 + r_objid, buf, sizeof (buf)); in ldm_parse_dgr4()
1104 static bool ldm_parse_vblk (const u8 *buf, int len, struct vblk *vb) in ldm_parse_vblk() argument
1109 BUG_ON (!buf || !vb); in ldm_parse_vblk()
1111 r_objid = ldm_relative (buf, len, 0x18, 0); in ldm_parse_vblk()
1117 vb->flags = buf[0x12]; in ldm_parse_vblk()
1118 vb->type = buf[0x13]; in ldm_parse_vblk()
1119 vb->obj_id = ldm_get_vnum (buf + 0x18); in ldm_parse_vblk()
1120 ldm_get_vstr (buf+0x18+r_objid, vb->name, sizeof (vb->name)); in ldm_parse_vblk()
1123 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()