Home
last modified time | relevance | path

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

/block/
Dpartition-generic.c35 char *disk_name(struct gendisk *hd, int partno, char *buf) in disk_name() argument
38 snprintf(buf, BDEVNAME_SIZE, "%s", hd->disk_name); in disk_name()
40 snprintf(buf, BDEVNAME_SIZE, "%sp%d", hd->disk_name, partno); in disk_name()
42 snprintf(buf, BDEVNAME_SIZE, "%s%d", hd->disk_name, partno); in disk_name()
44 return buf; in disk_name()
47 const char *bdevname(struct block_device *bdev, char *buf) in bdevname() argument
49 return disk_name(bdev->bd_disk, bdev->bd_part->partno, buf); in bdevname()
54 const char *bio_devname(struct bio *bio, char *buf) in bio_devname() argument
56 return disk_name(bio->bi_disk, bio->bi_partno, buf); in bio_devname()
75 struct device_attribute *attr, char *buf) in part_partition_show() argument
[all …]
Dcmdline-parser.c97 char buf[BDEVNAME_SIZE + 32 + 4]; in parse_parts() local
122 length = (!next) ? (sizeof(buf) - 1) : in parse_parts()
123 min_t(int, next - bdevdef, sizeof(buf) - 1); in parse_parts()
125 strncpy(buf, bdevdef, length); in parse_parts()
126 buf[length] = '\0'; in parse_parts()
128 ret = parse_subpart(next_subpart, buf); in parse_parts()
167 char *buf; in cmdline_parts_parse() local
174 next = pbuf = buf = kstrdup(cmdline, GFP_KERNEL); in cmdline_parts_parse()
175 if (!buf) in cmdline_parts_parse()
203 kfree(buf); in cmdline_parts_parse()
Dgenhd.c518 static char *bdevt_str(dev_t devt, char *buf) in bdevt_str() argument
523 snprintf(buf, BDEVT_SIZE, "%-9s", tbuf); in bdevt_str()
525 snprintf(buf, BDEVT_SIZE, "%03x:%05x", MAJOR(devt), MINOR(devt)); in bdevt_str()
527 return buf; in bdevt_str()
947 char buf[BDEVNAME_SIZE]; in show_partition() local
962 disk_name(sgp, part->partno, buf)); in show_partition()
1019 struct device_attribute *attr, char *buf) in disk_range_show() argument
1023 return sprintf(buf, "%d\n", disk->minors); in disk_range_show()
1027 struct device_attribute *attr, char *buf) in disk_ext_range_show() argument
1031 return sprintf(buf, "%d\n", disk_max_parts(disk)); in disk_ext_range_show()
[all …]
Dbio-integrity.c241 void *buf; in bio_integrity_prep() local
274 buf = kmalloc(len, GFP_NOIO | q->bounce_gfp); in bio_integrity_prep()
276 if (unlikely(buf == NULL)) { in bio_integrity_prep()
281 end = (((unsigned long) buf) + len + PAGE_SIZE - 1) >> PAGE_SHIFT; in bio_integrity_prep()
282 start = ((unsigned long) buf) >> PAGE_SHIFT; in bio_integrity_prep()
289 kfree(buf); in bio_integrity_prep()
302 offset = offset_in_page(buf); in bio_integrity_prep()
313 ret = bio_integrity_add_page(bio, virt_to_page(buf), in bio_integrity_prep()
318 kfree(buf); in bio_integrity_prep()
326 buf += bytes; in bio_integrity_prep()
Dbsg-lib.c107 static int bsg_map_buffer(struct bsg_buffer *buf, struct request *req) in bsg_map_buffer() argument
113 buf->sg_list = kzalloc(sz, GFP_KERNEL); in bsg_map_buffer()
114 if (!buf->sg_list) in bsg_map_buffer()
116 sg_init_table(buf->sg_list, req->nr_phys_segments); in bsg_map_buffer()
118 buf->sg_cnt = blk_rq_map_sg(req->q, req, buf->sg_list); in bsg_map_buffer()
119 buf->payload_len = blk_rq_bytes(req); in bsg_map_buffer()
Dblk-timeout.c41 char *buf) in part_timeout_show() argument
46 return sprintf(buf, "%d\n", set != 0); in part_timeout_show()
50 const char *buf, size_t count) in part_timeout_store() argument
57 char *p = (char *) buf; in part_timeout_store()
Dblk-mq-debugfs.c91 static ssize_t queue_state_write(void *data, const char __user *buf, in queue_state_write() argument
110 if (copy_from_user(opbuf, buf, count)) in queue_state_write()
149 static ssize_t queue_write_hint_store(void *data, const char __user *buf, in queue_write_hint_store() argument
532 static ssize_t hctx_io_poll_write(void *data, const char __user *buf, in hctx_io_poll_write() argument
558 static ssize_t hctx_dispatched_write(void *data, const char __user *buf, in hctx_dispatched_write() argument
577 static ssize_t hctx_queued_write(void *data, const char __user *buf, in hctx_queued_write() argument
594 static ssize_t hctx_run_write(void *data, const char __user *buf, size_t count, in hctx_run_write() argument
649 static ssize_t ctx_dispatched_write(void *data, const char __user *buf, in ctx_dispatched_write() argument
666 static ssize_t ctx_merged_write(void *data, const char __user *buf, in ctx_merged_write() argument
683 static ssize_t ctx_completed_write(void *data, const char __user *buf, in ctx_completed_write() argument
[all …]
Dbsg.c507 __bsg_read(char __user *buf, size_t count, struct bsg_device *bd, in __bsg_read() argument
533 if (copy_to_user(buf, &bc->hdr, sizeof(bc->hdr))) in __bsg_read()
541 buf += sizeof(struct sg_io_v4); in __bsg_read()
569 bsg_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) in bsg_read() argument
580 ret = __bsg_read(buf, count, bd, NULL, &bytes_read); in bsg_read()
589 static int __bsg_write(struct bsg_device *bd, const char __user *buf, in __bsg_write() argument
614 if (copy_from_user(&bc->hdr, buf, sizeof(bc->hdr))) { in __bsg_write()
633 buf += sizeof(struct sg_io_v4); in __bsg_write()
644 bsg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) in bsg_write() argument
658 ret = __bsg_write(bd, buf, count, &bytes_written, in bsg_write()
[all …]
Dcompat_ioctl.c103 compat_caddr_t buf; member
135 if (get_user(data, &cdread_audio32->buf)) in compat_cdrom_read_audio()
138 if (put_user(datap, &cdread_audio->buf)) in compat_cdrom_read_audio()
Dblk-throttle.c1440 char *buf, size_t nbytes, loff_t off, bool is_u64) in tg_set_conf() argument
1448 ret = blkg_conf_prep(blkcg, &blkcg_policy_throtl, buf, &ctx); in tg_set_conf()
1473 char *buf, size_t nbytes, loff_t off) in tg_set_conf_u64() argument
1475 return tg_set_conf(of, buf, nbytes, off, true); in tg_set_conf_u64()
1479 char *buf, size_t nbytes, loff_t off) in tg_set_conf_uint() argument
1481 return tg_set_conf(of, buf, nbytes, off, false); in tg_set_conf_uint()
1593 char *buf, size_t nbytes, loff_t off) in tg_set_limit() argument
1604 ret = blkg_conf_prep(blkcg, &blkcg_policy_throtl, buf, &ctx); in tg_set_limit()
Dcfq-iosched.c1786 char *buf, size_t nbytes, loff_t off, in __cfqg_set_weight_device() argument
1798 ret = blkg_conf_prep(blkcg, &blkcg_policy_cfq, buf, &ctx); in __cfqg_set_weight_device()
1834 char *buf, size_t nbytes, loff_t off) in cfqg_set_weight_device() argument
1836 return __cfqg_set_weight_device(of, buf, nbytes, off, false, false); in cfqg_set_weight_device()
1840 char *buf, size_t nbytes, loff_t off) in cfqg_set_leaf_weight_device() argument
1842 return __cfqg_set_weight_device(of, buf, nbytes, off, false, true); in cfqg_set_leaf_weight_device()
2215 char *buf, size_t nbytes, loff_t off) in cfq_set_weight_on_dfl() argument
2221 buf = strim(buf); in cfq_set_weight_on_dfl()
2224 v = simple_strtoull(buf, &endp, 0); in cfq_set_weight_on_dfl()
2225 if (*endp == '\0' || sscanf(buf, "default %llu", &v) == 1) { in cfq_set_weight_on_dfl()
[all …]
Dblk-settings.c779 void *buf, unsigned int size) in blk_queue_dma_drain() argument
786 q->dma_drain_buffer = buf; in blk_queue_dma_drain()
Dsed-opal.c800 static int response_parse(const u8 *buf, size_t length, in response_parse() argument
811 if (!buf) in response_parse()
817 hdr = (struct opal_header *)buf; in response_parse()
818 pos = buf; in response_parse()
835 if (pos > buf + length) in response_parse()
Dbfq-cgroup.c881 char *buf, size_t nbytes, in bfq_io_set_weight() argument
886 int ret = kstrtoull(strim(buf), 0, &weight); in bfq_io_set_weight()
/block/partitions/
Dldm.c831 char buf[64]; in ldm_parse_dgr4() local
858 ldm_get_vstr (buffer + 0x18 + r_objid, buf, sizeof (buf)); in ldm_parse_dgr4()
1130 static bool ldm_parse_vblk (const u8 *buf, int len, struct vblk *vb) in ldm_parse_vblk() argument
1135 BUG_ON (!buf || !vb); in ldm_parse_vblk()
1137 r_objid = ldm_relative (buf, len, 0x18, 0); in ldm_parse_vblk()
1143 vb->flags = buf[0x12]; in ldm_parse_vblk()
1144 vb->type = buf[0x13]; in ldm_parse_vblk()
1145 vb->obj_id = ldm_get_vnum (buf + 0x18); in ldm_parse_vblk()
1146 ldm_get_vstr (buf+0x18+r_objid, vb->name, sizeof (vb->name)); in ldm_parse_vblk()
1149 case VBLK_CMP3: result = ldm_parse_cmp3 (buf, len, vb); break; in ldm_parse_vblk()
[all …]
Defi.c134 efi_crc32(const void *buf, unsigned long len) in efi_crc32() argument
136 return (crc32(~0L, buf, len) ^ ~0L); in efi_crc32()