Home
last modified time | relevance | path

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

/block/
Dblk-map.c137 unsigned int len = iter->count; in bio_copy_user_iov() local
152 nr_pages = bio_max_segs(DIV_ROUND_UP(offset + len, PAGE_SIZE)); in bio_copy_user_iov()
164 while (len) { in bio_copy_user_iov()
169 if (bytes > len) in bio_copy_user_iov()
170 bytes = len; in bio_copy_user_iov()
196 len -= bytes; in bio_copy_user_iov()
314 unsigned long i, len = 0; in bio_invalidate_vmalloc_pages() local
317 len += bio->bi_io_vec[i].bv_len; in bio_invalidate_vmalloc_pages()
318 invalidate_kernel_vmap_range(bio->bi_private, len); in bio_invalidate_vmalloc_pages()
340 unsigned int len, gfp_t gfp_mask) in bio_map_kern() argument
[all …]
Dbio.c781 struct page *page, unsigned int len, unsigned int off, in page_is_mergeable() argument
805 struct page *page, unsigned len, in bio_try_merge_hw_seg() argument
811 phys_addr_t addr2 = page_to_phys(page) + offset + len - 1; in bio_try_merge_hw_seg()
815 if (len > queue_max_segment_size(q) - bv->bv_len) in bio_try_merge_hw_seg()
817 return __bio_try_merge_page(bio, page, len, offset, same_page); in bio_try_merge_hw_seg()
834 struct page *page, unsigned int len, unsigned int offset, in bio_add_hw_page() argument
842 if (((bio->bi_iter.bi_size + len) >> 9) > max_sectors) in bio_add_hw_page()
846 if (bio_try_merge_hw_seg(q, bio, page, len, offset, same_page)) in bio_add_hw_page()
847 return len; in bio_add_hw_page()
858 if (bio_full(bio, len)) in bio_add_hw_page()
[all …]
Dbio-integrity.c124 unsigned int len, unsigned int offset) in bio_integrity_add_page() argument
142 iv->bv_len = len; in bio_integrity_add_page()
146 return len; in bio_integrity_add_page()
204 unsigned int len, nr_pages; in bio_integrity_prep() local
234 len = intervals * bi->tuple_size; in bio_integrity_prep()
235 buf = kmalloc(len, GFP_NOIO); in bio_integrity_prep()
242 end = (((unsigned long) buf) + len + PAGE_SIZE - 1) >> PAGE_SHIFT; in bio_integrity_prep()
256 bip->bip_iter.bi_size = len; in bio_integrity_prep()
268 if (len <= 0) in bio_integrity_prep()
271 if (bytes > len) in bio_integrity_prep()
[all …]
Dsed-opal.c54 size_t len; member
537 static bool can_add(int *err, struct opal_dev *cmd, size_t len) in can_add() argument
542 if (remaining_size(cmd) < len) { in can_add()
543 pr_debug("Error adding %zu bytes: end of buffer.\n", len); in can_add()
560 bool has_sign, int len) in add_short_atom_header() argument
568 atom |= len & SHORT_ATOM_LEN_MASK; in add_short_atom_header()
574 bool has_sign, int len) in add_medium_atom_header() argument
581 header0 |= (len >> 8) & MEDIUM_ATOM_LEN_MASK; in add_medium_atom_header()
584 cmd->cmd[cmd->pos++] = len; in add_medium_atom_header()
589 size_t len; in add_token_u64() local
[all …]
Dbadblocks.c447 int len = BB_LEN(p[i]); in ack_all_badblocks() local
449 p[i] = BB_MAKE(start, len, 1); in ack_all_badblocks()
469 size_t len; in badblocks_show() local
480 len = 0; in badblocks_show()
483 while (len < PAGE_SIZE && i < bb->count) { in badblocks_show()
493 len += snprintf(page+len, PAGE_SIZE-len, "%llu %u\n", in badblocks_show()
497 if (unack && len == 0) in badblocks_show()
503 return len; in badblocks_show()
517 ssize_t badblocks_store(struct badblocks *bb, const char *page, size_t len, in badblocks_store() argument
540 return len; in badblocks_store()
Dfops.c366 loff_t pos, unsigned len, unsigned flags, struct page **pagep, in blkdev_write_begin() argument
369 return block_write_begin(mapping, pos, len, flags, pagep, in blkdev_write_begin()
374 loff_t pos, unsigned len, unsigned copied, struct page *page, in blkdev_write_end() argument
378 ret = block_write_end(file, mapping, pos, len, copied, page, fsdata); in blkdev_write_end()
570 loff_t len) in blkdev_fallocate() argument
574 loff_t end = start + len - 1; in blkdev_fallocate()
588 len = isize - start; in blkdev_fallocate()
589 end = start + len - 1; in blkdev_fallocate()
597 if ((start | len) & (bdev_logical_block_size(bdev) - 1)) in blkdev_fallocate()
613 error = blkdev_issue_zeroout(bdev, start >> 9, len >> 9, in blkdev_fallocate()
[all …]
Dblk-zoned.c486 if (zone->len == 0) { in blk_revalidate_zone_cb()
498 if (!is_power_of_2(zone->len) && zone->capacity < zone->len) { in blk_revalidate_zone_cb()
500 disk->disk_name, zone->capacity, zone->len); in blk_revalidate_zone_cb()
504 args->zone_sectors = zone->len; in blk_revalidate_zone_cb()
505 args->nr_zones = div64_u64(capacity + zone->len - 1, zone->len); in blk_revalidate_zone_cb()
507 if (zone->len != args->zone_sectors) { in blk_revalidate_zone_cb()
513 if (zone->len > args->zone_sectors) { in blk_revalidate_zone_cb()
553 args->sector += zone->len; in blk_revalidate_zone_cb()
Dioctl.c117 uint64_t start, len; in blk_ioctl_discard() local
132 len = range[1]; in blk_ioctl_discard()
136 if (len & 511) in blk_ioctl_discard()
139 if (start + len > i_size_read(bdev->bd_inode)) in blk_ioctl_discard()
143 err = truncate_bdev_range(bdev, mode, start, start + len - 1); in blk_ioctl_discard()
147 err = blkdev_issue_discard(bdev, start >> 9, len >> 9, in blk_ioctl_discard()
159 uint64_t start, end, len; in blk_ioctl_zeroout() local
170 len = range[1]; in blk_ioctl_zeroout()
171 end = start + len - 1; in blk_ioctl_zeroout()
175 if (len & 511) in blk_ioctl_zeroout()
[all …]
Delevator.c794 int len = 0; in elv_iosched_show() local
800 len += sprintf(name+len, "[none] "); in elv_iosched_show()
807 len += sprintf(name+len, "[%s] ", elv->elevator_name); in elv_iosched_show()
813 len += sprintf(name+len, "%s ", __e->elevator_name); in elv_iosched_show()
818 len += sprintf(name+len, "none"); in elv_iosched_show()
820 len += sprintf(len+name, "\n"); in elv_iosched_show()
821 return len; in elv_iosched_show()
Dt10-pi.c15 static __be16 t10_pi_crc_fn(void *data, unsigned int len) in t10_pi_crc_fn() argument
17 return cpu_to_be16(crc_t10dif(data, len)); in t10_pi_crc_fn()
20 static __be16 t10_pi_ip_fn(void *data, unsigned int len) in t10_pi_ip_fn() argument
22 return (__force __be16)ip_compute_csum(data, len); in t10_pi_ip_fn()
Dblk-merge.c204 unsigned len = min(bv->bv_len, max_len); in bvec_split_segs() local
208 while (len && *nsegs < max_segs) { in bvec_split_segs()
211 seg_size = min(seg_size, len); in bvec_split_segs()
215 len -= seg_size; in bvec_split_segs()
224 return len > 0 || bv->bv_len > max_len; in bvec_split_segs()
446 unsigned len = min(get_max_segment_size(q, bvec->bv_page, in blk_bvec_map_sg() local
462 sg_set_page(*sg, page, len, offset); in blk_bvec_map_sg()
464 total += len; in blk_bvec_map_sg()
465 nbytes -= len; in blk_bvec_map_sg()
Dbsg-lib.c109 int len = min(hdr->max_response_len, job->reply_len); in bsg_transport_sg_io_fn() local
111 if (copy_to_user(uptr64(hdr->response), job->reply, len)) in bsg_transport_sg_io_fn()
114 hdr->response_len = len; in bsg_transport_sg_io_fn()
Dbfq-iosched.h1085 static inline void bfq_pid_to_str(int pid, char *str, int len) in bfq_pid_to_str() argument
1088 snprintf(str, len, "%d", pid); in bfq_pid_to_str()
1090 snprintf(str, len, "SHARED-"); in bfq_pid_to_str()
Dblk.h403 struct page *page, unsigned int len, unsigned int offset,
Dgenhd.c669 const char *page, size_t len) in disk_badblocks_store() argument
676 return badblocks_store(disk->bb, page, len, 0); in disk_badblocks_store()
Dblk-throttle.c1683 int len; in tg_set_limit() local
1685 if (sscanf(ctx.body, "%26s%n", tok, &len) != 1) in tg_set_limit()
1689 ctx.body += len; in tg_set_limit()
/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()
740 len = r_parent; in ldm_parse_cmp3()
742 if (len < 0) in ldm_parse_cmp3()
745 len += VBLK_SIZE_CMP3; in ldm_parse_cmp3()
746 if (len != get_unaligned_be32(buffer + 0x14)) in ldm_parse_cmp3()
773 int r_objid, r_name, r_diskid, r_id1, r_id2, len; in ldm_parse_dgr3() local
785 len = r_id2; in ldm_parse_dgr3()
789 len = r_diskid; in ldm_parse_dgr3()
791 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.c316 sector_t start, sector_t len, int flags, in add_partition() argument
361 bdev_set_nr_sectors(bdev, len); in add_partition()