Home
last modified time | relevance | path

Searched refs:len (Results 1 – 22 of 22) sorted by relevance

/block/partitions/
Dldm.c722 int r_objid, r_name, r_vstate, r_child, r_parent, r_stripe, r_cols, len; in ldm_parse_cmp3() local
736 len = r_cols; in ldm_parse_cmp3()
739 len = r_parent; in ldm_parse_cmp3()
741 if (len < 0) in ldm_parse_cmp3()
744 len += VBLK_SIZE_CMP3; in ldm_parse_cmp3()
745 if (len != get_unaligned_be32(buffer + 0x14)) in ldm_parse_cmp3()
772 int r_objid, r_name, r_diskid, r_id1, r_id2, len; in ldm_parse_dgr3() local
784 len = r_id2; in ldm_parse_dgr3()
786 len = r_diskid; in ldm_parse_dgr3()
787 if (len < 0) in ldm_parse_dgr3()
[all …]
Dmac.c23 static inline void mac_fix_string(char *stg, int len) in mac_fix_string() argument
27 for (i = len - 1; i >= 0 && stg[i] == ' '; i--) in mac_fix_string()
Defi.c120 efi_crc32(const void *buf, unsigned long len) in efi_crc32() argument
122 return (crc32(~0L, buf, len) ^ ~0L); in efi_crc32()
Dcore.c300 sector_t start, sector_t len, int flags, in add_partition() argument
345 bdev_set_nr_sectors(bdev, len); in add_partition()
/block/
Dblk-map.c139 unsigned int len = iter->count; in bio_copy_user_iov() local
154 nr_pages = bio_max_segs(DIV_ROUND_UP(offset + len, PAGE_SIZE)); in bio_copy_user_iov()
166 while (len) { in bio_copy_user_iov()
171 if (bytes > len) in bio_copy_user_iov()
172 bytes = len; in bio_copy_user_iov()
198 len -= bytes; in bio_copy_user_iov()
363 unsigned long i, len = 0; in bio_invalidate_vmalloc_pages() local
366 len += bio->bi_io_vec[i].bv_len; in bio_invalidate_vmalloc_pages()
367 invalidate_kernel_vmap_range(bio->bi_private, len); in bio_invalidate_vmalloc_pages()
390 unsigned int len, gfp_t gfp_mask) in bio_map_kern() argument
[all …]
Dbio.c902 static inline bool bio_full(struct bio *bio, unsigned len) in bio_full() argument
906 if (bio->bi_iter.bi_size > UINT_MAX - len) in bio_full()
912 unsigned int len, unsigned int off, bool *same_page) in bvec_try_merge_page() argument
933 bv->bv_len += len; in bvec_try_merge_page()
943 struct page *page, unsigned len, unsigned offset, in bvec_try_merge_hw_page() argument
948 phys_addr_t addr2 = page_to_phys(page) + offset + len - 1; in bvec_try_merge_hw_page()
952 if (len > queue_max_segment_size(q) - bv->bv_len) in bvec_try_merge_hw_page()
954 return bvec_try_merge_page(bv, page, len, offset, same_page); in bvec_try_merge_hw_page()
971 struct page *page, unsigned int len, unsigned int offset, in bio_add_hw_page() argument
977 if (((bio->bi_iter.bi_size + len) >> SECTOR_SHIFT) > max_sectors) in bio_add_hw_page()
[all …]
Dbio-integrity.c124 unsigned int len, unsigned int offset) in bio_integrity_add_page() argument
129 if (((bip->bip_iter.bi_size + len) >> SECTOR_SHIFT) > in bio_integrity_add_page()
137 if (bvec_try_merge_hw_page(q, bv, page, len, offset, in bio_integrity_add_page()
139 bip->bip_iter.bi_size += len; in bio_integrity_add_page()
140 return len; in bio_integrity_add_page()
155 bvec_set_page(&bip->bip_vec[bip->bip_vcnt], page, len, offset); in bio_integrity_add_page()
157 bip->bip_iter.bi_size += len; in bio_integrity_add_page()
159 return len; in bio_integrity_add_page()
218 unsigned int len, nr_pages; in bio_integrity_prep() local
254 len = bio_integrity_bytes(bi, bio_sectors(bio)); in bio_integrity_prep()
[all …]
Dioctl.c92 uint64_t start, len, end; in blk_ioctl_discard() local
106 len = range[1]; in blk_ioctl_discard()
110 if (len & 511) in blk_ioctl_discard()
113 if (check_add_overflow(start, len, &end) || in blk_ioctl_discard()
118 err = truncate_bdev_range(bdev, mode, start, start + len - 1); in blk_ioctl_discard()
121 err = blkdev_issue_discard(bdev, start >> 9, len >> 9, GFP_KERNEL); in blk_ioctl_discard()
130 uint64_t start, len; in blk_ioctl_secure_erase() local
142 len = range[1]; in blk_ioctl_secure_erase()
143 if ((start & 511) || (len & 511)) in blk_ioctl_secure_erase()
145 if (start + len > bdev_nr_bytes(bdev)) in blk_ioctl_secure_erase()
[all …]
Dbadblocks.c445 int len = BB_LEN(p[i]); in ack_all_badblocks() local
447 p[i] = BB_MAKE(start, len, 1); in ack_all_badblocks()
467 size_t len; in badblocks_show() local
478 len = 0; in badblocks_show()
481 while (len < PAGE_SIZE && i < bb->count) { in badblocks_show()
491 len += snprintf(page+len, PAGE_SIZE-len, "%llu %u\n", in badblocks_show()
495 if (unack && len == 0) in badblocks_show()
501 return len; in badblocks_show()
515 ssize_t badblocks_store(struct badblocks *bb, const char *page, size_t len, in badblocks_store() argument
538 return len; in badblocks_store()
Dblk-zoned.c473 if (zone->start >= capacity || !zone->len) { in blk_revalidate_zone_cb()
475 disk->disk_name, zone->start, zone->len); in blk_revalidate_zone_cb()
484 if (zone->len == 0) { in blk_revalidate_zone_cb()
496 if (!is_power_of_2(zone->len) && zone->capacity < zone->len) { in blk_revalidate_zone_cb()
498 disk->disk_name, zone->capacity, zone->len); in blk_revalidate_zone_cb()
502 args->zone_sectors = zone->len; in blk_revalidate_zone_cb()
503 args->nr_zones = div64_u64(capacity + zone->len - 1, zone->len); in blk_revalidate_zone_cb()
505 if (zone->len != args->zone_sectors) { in blk_revalidate_zone_cb()
510 } else if (zone->len > zone_sectors) { in blk_revalidate_zone_cb()
542 args->sector += zone->len; in blk_revalidate_zone_cb()
Dsed-opal.c59 size_t len; member
697 static bool can_add(int *err, struct opal_dev *cmd, size_t len) in can_add() argument
702 if (remaining_size(cmd) < len) { in can_add()
703 pr_debug("Error adding %zu bytes: end of buffer.\n", len); in can_add()
720 bool has_sign, int len) in add_short_atom_header() argument
728 atom |= len & SHORT_ATOM_LEN_MASK; in add_short_atom_header()
734 bool has_sign, int len) in add_medium_atom_header() argument
741 header0 |= (len >> 8) & MEDIUM_ATOM_LEN_MASK; in add_medium_atom_header()
744 cmd->cmd[cmd->pos++] = len; in add_medium_atom_header()
749 size_t len; in add_token_u64() local
[all …]
Delevator.c768 int len = 0; in elv_iosched_show() local
774 len += sprintf(name+len, "[none] "); in elv_iosched_show()
776 len += sprintf(name+len, "none "); in elv_iosched_show()
783 len += sprintf(name+len, "[%s] ", e->elevator_name); in elv_iosched_show()
785 len += sprintf(name+len, "%s ", e->elevator_name); in elv_iosched_show()
789 len += sprintf(name+len, "\n"); in elv_iosched_show()
790 return len; in elv_iosched_show()
Dearly-lookup.c11 int len; member
27 strncasecmp(cmp->uuid, bdev->bd_meta_info->uuid, cmp->len)) in match_dev_by_uuid()
63 cmp.len = slash - uuid_str; in devt_from_partuuid()
65 cmp.len = strlen(uuid_str); in devt_from_partuuid()
68 if (!cmp.len) in devt_from_partuuid()
Dfops.c432 loff_t pos, unsigned len, struct page **pagep, void **fsdata) in blkdev_write_begin() argument
434 return block_write_begin(mapping, pos, len, pagep, blkdev_get_block); in blkdev_write_begin()
438 loff_t pos, unsigned len, unsigned copied, struct page *page, in blkdev_write_end() argument
442 ret = block_write_end(file, mapping, pos, len, copied, page, fsdata); in blkdev_write_end()
746 loff_t len) in blkdev_fallocate() argument
750 loff_t end = start + len - 1; in blkdev_fallocate()
764 len = isize - start; in blkdev_fallocate()
765 end = start + len - 1; in blkdev_fallocate()
773 if ((start | len) & (bdev_logical_block_size(bdev) - 1)) in blkdev_fallocate()
790 len >> SECTOR_SHIFT, GFP_KERNEL, in blkdev_fallocate()
[all …]
Dt10-pi.c17 static __be16 t10_pi_crc_fn(void *data, unsigned int len) in t10_pi_crc_fn() argument
19 return cpu_to_be16(crc_t10dif(data, len)); in t10_pi_crc_fn()
22 static __be16 t10_pi_ip_fn(void *data, unsigned int len) in t10_pi_ip_fn() argument
24 return (__force __be16)ip_compute_csum(data, len); in t10_pi_ip_fn()
283 static __be64 ext_pi_crc64(void *data, unsigned int len) in ext_pi_crc64() argument
285 return cpu_to_be64(crc64_rocksoft(data, len)); in ext_pi_crc64()
Dblk-lib.c326 unsigned int len = min_t(sector_t, nr_sects, max_sectors); in blkdev_issue_secure_erase() local
330 bio->bi_iter.bi_size = len << SECTOR_SHIFT; in blkdev_issue_secure_erase()
332 sector += len; in blkdev_issue_secure_erase()
333 nr_sects -= len; in blkdev_issue_secure_erase()
Dblk-merge.c236 unsigned len = min(bv->bv_len, max_len); in bvec_split_segs() local
240 while (len && *nsegs < max_segs) { in bvec_split_segs()
243 seg_size = min(seg_size, len); in bvec_split_segs()
247 len -= seg_size; in bvec_split_segs()
256 return len > 0 || bv->bv_len > max_len; in bvec_split_segs()
472 unsigned len = min(get_max_segment_size(&q->limits, in blk_bvec_map_sg() local
488 sg_set_page(*sg, page, len, offset); in blk_bvec_map_sg()
490 total += len; in blk_bvec_map_sg()
491 nbytes -= len; in blk_bvec_map_sg()
Dbsg-lib.c116 int len = min(hdr->max_response_len, job->reply_len); in bsg_transport_sg_io_fn() local
118 if (copy_to_user(uptr64(hdr->response), job->reply, len)) in bsg_transport_sg_io_fn()
121 hdr->response_len = len; in bsg_transport_sg_io_fn()
Dbfq-iosched.h1166 static inline void bfq_bfqq_name(struct bfq_queue *bfqq, char *str, int len) in bfq_bfqq_name() argument
1171 snprintf(str, len, "bfq%d%c", bfqq->pid, type); in bfq_bfqq_name()
1173 snprintf(str, len, "bfqSHARED-%c", type); in bfq_bfqq_name()
Dblk.h107 struct page *page, unsigned len, unsigned offset,
467 struct page *page, unsigned int len, unsigned int offset,
Dgenhd.c758 const char *page, size_t len) in disk_badblocks_store() argument
765 return badblocks_store(disk->bb, page, len, 0); in disk_badblocks_store()
Dblk-throttle.c1594 int len; in tg_set_limit() local
1596 if (sscanf(ctx.body, "%26s%n", tok, &len) != 1) in tg_set_limit()
1600 ctx.body += len; in tg_set_limit()