Home
last modified time | relevance | path

Searched refs:blksz (Results 1 – 25 of 86) sorted by relevance

1234

/external/ltp/testcases/kernel/syscalls/pwritev/
Dpwritev03.c43 static ssize_t blksz; variable
55 {1, &zero_off, &blksz},
56 {2, &zero_off, &blksz},
57 {1, &blk_off, &blksz},
65 SAFE_PWRITE(1, fd, initbuf, blksz * 2, 0); in verify_direct_pwritev()
84 memset(preadbuf, 0x00, blksz); in verify_direct_pwritev()
115 blksz = ret; in setup()
120 initbuf = SAFE_MEMALIGN(blksz, blksz * 2); in setup()
121 memset(initbuf, 0x00, blksz * 2); in setup()
123 preadbuf = SAFE_MEMALIGN(blksz, blksz); in setup()
[all …]
/external/u-boot/fs/ext4/
Dext4_write.c82 put_ext4(b_bitmap_blk * fs->blksz, in ext4fs_update()
83 fs->blk_bmaps[i], fs->blksz); in ext4fs_update()
90 put_ext4(i_bitmap_blk * fs->blksz, in ext4fs_update()
91 fs->inode_bmaps[i], fs->blksz); in ext4fs_update()
95 put_ext4((uint64_t)((uint64_t)fs->gdtable_blkno * (uint64_t)fs->blksz), in ext4fs_update()
97 (fs->blksz * fs->no_blk_pergdt)); in ext4fs_update()
109 int gdsize_total = ROUND(fs->no_blkgrp * fs->gdsize, fs->blksz); in ext4fs_get_bgdtable()
110 fs->no_blk_pergdt = gdsize_total / fs->blksz; in ext4fs_get_bgdtable()
118 0, fs->blksz * fs->no_blk_pergdt, fs->gdtable); in ext4fs_get_bgdtable()
145 char *journal_buffer = zalloc(fs->blksz); in delete_single_indirect_block()
[all …]
Dext4_common.c201 ALLOC_CACHE_ALIGN_BUFFER(unsigned char, sec_buf, fs->dev_desc->blksz); in put_ext4()
205 remainder = off & (uint64_t)(fs->dev_desc->blksz - 1); in put_ext4()
254 for (j = 0; j < fs->blksz; j++) { in _get_new_inode_no()
285 if (count == (fs->blksz * 8)) in _get_new_blk_no()
289 if (fs->blksz == 1024) in _get_new_blk_no()
494 zero_buffer = zalloc(fs->blksz); in ext4fs_update_parent_dentry()
499 root_first_block_buffer = zalloc(fs->blksz); in ext4fs_update_parent_dentry()
520 0, fs->blksz, root_first_block_buffer); in ext4fs_update_parent_dentry()
534 if (fs->blksz - totalbytes == le16_to_cpu(dir->direntlen)) { in ext4fs_update_parent_dentry()
563 put_ext4((uint64_t)new_blk_no * fs->blksz, zero_buffer, fs->blksz); in ext4fs_update_parent_dentry()
[all …]
Dext4_journal.c59 if (fs->blksz == 4096) { in ext4fs_init_journal()
60 temp = zalloc(fs->blksz); in ext4fs_init_journal()
63 journal_ptr[gindex]->buf = zalloc(fs->blksz); in ext4fs_init_journal()
66 ext4fs_devread(0, 0, fs->blksz, temp); in ext4fs_init_journal()
68 memcpy(journal_ptr[gindex]->buf, temp, fs->blksz); in ext4fs_init_journal()
72 journal_ptr[gindex]->buf = zalloc(fs->blksz); in ext4fs_init_journal()
99 (uint64_t)fs->blksz), dirty_block_ptr[i]->buf, in ext4fs_dump_metadata()
100 fs->blksz); in ext4fs_dump_metadata()
138 journal_ptr[gindex]->buf = zalloc(fs->blksz); in ext4fs_log_gdt()
141 memcpy(journal_ptr[gindex]->buf, gd_table, fs->blksz); in ext4fs_log_gdt()
[all …]
Ddev.c40 assert(rbdd->blksz == (1 << rbdd->log2blksz)); in ext4fs_set_blk_dev()
45 get_fs()->total_sect = ((uint64_t)info->size * info->blksz) >> in ext4fs_set_blk_dev()
60 int off = SUPERBLOCK_START % fs->dev_desc->blksz; in ext4_read_superblock()
/external/ltp/testcases/kernel/syscalls/preadv/
Dpreadv03.c41 static ssize_t blksz; variable
55 {1, &zero_off, &blksz, 0x61},
56 {2, &zero_off, &blksz, 0x61},
57 {1, &blk_off, &blksz, 0x62},
67 memset(vec, 0x00, blksz); in verify_direct_preadv()
116 blksz = ret; in setup()
121 pop_buf = SAFE_MEMALIGN(blksz, blksz); in setup()
122 memset(pop_buf, 0x61, blksz); in setup()
123 SAFE_WRITE(1, fd, pop_buf, blksz); in setup()
125 memset(pop_buf, 0x62, blksz); in setup()
[all …]
/external/u-boot/drivers/block/
Dblkcache.c20 unsigned long blksz; member
33 unsigned long blksz) in cache_find() argument
40 (node->blksz == blksz) && in cache_find()
55 unsigned long blksz, void *buffer) in blkcache_read() argument
58 blkcnt, blksz); in blkcache_read()
60 const char *src = node->cache + (start - node->start) * blksz; in blkcache_read()
61 memcpy(buffer, src, blksz * blkcnt); in blkcache_read()
76 unsigned long blksz, void const *buffer) in blkcache_fill() argument
88 bytes = blksz * blkcnt; in blkcache_fill()
96 if (node->blkcnt * node->blksz < bytes) { in blkcache_fill()
[all …]
Dsandbox.c51 if (os_lseek(host_dev->fd, start * block_dev->blksz, OS_SEEK_SET) ==
56 ssize_t len = os_read(host_dev->fd, buffer, blkcnt * block_dev->blksz);
58 return len / block_dev->blksz;
78 if (os_lseek(host_dev->fd, start * block_dev->blksz, OS_SEEK_SET) ==
83 ssize_t len = os_write(host_dev->fd, buffer, blkcnt * block_dev->blksz);
85 return len / block_dev->blksz;
182 blk_dev->blksz = 512;
183 blk_dev->lba = os_lseek(host_dev->fd, 0, OS_SEEK_END) / blk_dev->blksz;
/external/u-boot/common/
Davb_verify.c285 if (sectors > buf_size / part->info.blksz) in mmc_read_and_flush()
286 sectors = buf_size / part->info.blksz; in mmc_read_and_flush()
294 flush_cache((ulong)tmp_buf, sectors * part->info.blksz); in mmc_read_and_flush()
297 memcpy(buffer, tmp_buf, sectors * part->info.blksz); in mmc_read_and_flush()
322 if (sectors > buf_size / part->info.blksz) in mmc_write()
323 sectors = buf_size / part->info.blksz; in mmc_write()
325 memcpy(tmp_buf, buffer, sectors * part->info.blksz); in mmc_write()
403 start_sector = start_offset / part->info.blksz; in mmc_byte_io()
404 sectors = num_bytes / part->info.blksz; in mmc_byte_io()
406 if (start_offset % part->info.blksz || in mmc_byte_io()
[all …]
Dandroid_ab.c70 if (abc_offset % part_info->blksz) { in android_boot_control_create_from_disk()
74 abc_offset /= part_info->blksz; in android_boot_control_create_from_disk()
77 part_info->blksz); in android_boot_control_create_from_disk()
84 buf = malloc(abc_blocks * part_info->blksz); in android_boot_control_create_from_disk()
115 slot_suffix) / part_info->blksz; in android_boot_control_store()
117 part_info->blksz); in android_boot_control_store()
/external/u-boot/fs/
Dfs_internal.c18 ALLOC_CACHE_ALIGN_BUFFER(char, sec_buf, (blk ? blk->blksz : 0)); in fs_devread()
35 byte_offset &= blk->blksz - 1; in fs_devread()
47 readlen = min((int)blk->blksz - byte_offset, in fs_devread()
59 block_len = byte_len & ~(blk->blksz - 1); in fs_devread()
62 ALLOC_CACHE_ALIGN_BUFFER(u8, p, blk->blksz); in fs_devread()
64 block_len = blk->blksz; in fs_devread()
77 block_len = byte_len & ~(blk->blksz - 1); in fs_devread()
80 sector += block_len / blk->blksz; in fs_devread()
/external/u-boot/env/
Dsata.c37 blk_start = ALIGN(offset, sata->blksz) / sata->blksz; in write_env()
38 blk_cnt = ALIGN(size, sata->blksz) / sata->blksz; in write_env()
83 blk_start = ALIGN(offset, sata->blksz) / sata->blksz; in read_env()
84 blk_cnt = ALIGN(size, sata->blksz) / sata->blksz; in read_env()
/external/u-boot/lib/
Dgunzip.c134 (szwritebuf % dev->blksz) || in gzwrite()
135 (szwritebuf < dev->blksz)) { in gzwrite()
137 __func__, szwritebuf, dev->blksz); in gzwrite()
141 if (startoffs & (dev->blksz-1)) { in gzwrite()
143 __func__, startoffs, dev->blksz); in gzwrite()
147 blksperbuf = szwritebuf / dev->blksz; in gzwrite()
148 outblock = lldiv(startoffs, dev->blksz); in gzwrite()
186 if (lldiv(szexpected, dev->blksz) > (dev->lba - outblock)) { in gzwrite()
233 writeblocks = (numfilled+dev->blksz-1) in gzwrite()
234 / dev->blksz; in gzwrite()
[all …]
Dimage-sparse.c68 fill_buf_num_blks = CONFIG_IMAGE_SPARSE_FILLBUF_SIZE / info->blksz; in write_sparse_image()
99 div_u64_rem(sparse_header->blk_sz, info->blksz, &offset); in write_sparse_image()
133 blkcnt = chunk_data_sz / info->blksz; in write_sparse_image()
162 bytes_written += blkcnt * info->blksz; in write_sparse_image()
177 info->blksz * fill_buf_num_blks, in write_sparse_image()
189 i < (info->blksz * fill_buf_num_blks / in write_sparse_image()
222 bytes_written += blkcnt * info->blksz; in write_sparse_image()
/external/u-boot/include/
Dblk.h77 unsigned long blksz; /* block size */ member
110 #define BLOCK_CNT(size, blk_desc) (PAD_COUNT(size, blk_desc->blksz))
112 (PAD_SIZE(size, blk_desc->blksz))
129 unsigned long blksz, void *buffer);
145 unsigned long blksz, void const *buffer);
186 unsigned long blksz, void *buffer) in blkcache_read() argument
193 unsigned long blksz, void const *buffer) {} in blkcache_fill() argument
339 const char *name, int if_type, int devnum, int blksz,
356 const char *name, int if_type, int devnum, int blksz,
422 start, blkcnt, block_dev->blksz, buffer)) in blk_dread()
[all …]
/external/u-boot/disk/
Dpart_iso.c33 if (block_dev->blksz == 512) { in iso_dread()
41 if (block_dev->blksz == 512) in iso_dread()
60 if ((dev_desc->blksz != CD_SECTSIZE) && (dev_desc->blksz != 512)) in part_get_info_iso_verb()
81 info->blksz = be16_to_cpu(ppr->secsize_BE); in part_get_info_iso_verb()
191 if (dev_desc->blksz == 512) { in part_get_info_iso_verb()
194 info->blksz = 512; in part_get_info_iso_verb()
221 i, info.start, info.size, info.blksz, info.type); in part_print_iso()
Dpart_efi.c191 ALLOC_CACHE_ALIGN_BUFFER_PAD(gpt_header, gpt_head, 1, dev_desc->blksz); in get_disk_guid()
218 ALLOC_CACHE_ALIGN_BUFFER_PAD(gpt_header, gpt_head, 1, dev_desc->blksz); in part_print_efi()
276 ALLOC_CACHE_ALIGN_BUFFER_PAD(gpt_header, gpt_head, 1, dev_desc->blksz); in part_get_info_efi()
313 info->blksz = dev_desc->blksz; in part_get_info_efi()
338 ALLOC_CACHE_ALIGN_BUFFER_PAD(legacy_mbr, legacymbr, 1, dev_desc->blksz); in part_test_efi()
357 ALLOC_CACHE_ALIGN_BUFFER_PAD(legacy_mbr, p_mbr, 1, dev_desc->blksz); in set_protective_mbr()
460 dev_desc->blksz; in gpt_fill_pte()
574 offset_blks = offset_bytes / dev_desc->blksz; in partition_entries_offset()
588 offset_blks = offset_bytes / dev_desc->blksz; in partition_entries_offset()
795 dev_desc->blksz); in is_valid_gpt_buf()
[all …]
Dpart.c184 if (dev_desc->lba > 0L && dev_desc->blksz > 0L) { in dev_print()
190 lba512 = (lba * (dev_desc->blksz/512)); in dev_print()
210 dev_desc->blksz); in dev_print()
216 dev_desc->blksz); in dev_print()
350 info->blksz = dev_desc->blksz; in part_get_info_whole_disk()
448 info->blksz = 0; in blk_get_device_part_str()
554 (*dev_desc)->log2blksz = LOG2((*dev_desc)->blksz); in blk_get_device_part_str()
631 (*dev_desc)->log2blksz = LOG2((*dev_desc)->blksz); in blk_get_device_part_str()
Dpart_dos.c106 ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz); in part_test_dos()
125 ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz); in print_partition_extended()
189 ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz); in part_get_info_extended()
223 info->blksz = DOS_PART_DEFAULT_SECTOR; in part_get_info_extended()
265 info->blksz = DOS_PART_DEFAULT_SECTOR; in part_get_info_extended()
/external/u-boot/drivers/fastboot/
Dfb_mmc.c72 buffer + (i * block_dev->blksz)); in fb_mmc_blk_write()
107 blkcnt = ((download_bytes + (info->blksz - 1)) & ~(info->blksz - 1)); in write_raw_image()
108 blkcnt = lldiv(blkcnt, info->blksz); in write_raw_image()
126 printf("........ wrote " LBAFU " bytes to '%s'\n", blkcnt * info->blksz, in write_raw_image()
151 sector_size = info->blksz; in fb_mmc_get_boot_header()
236 sectors_per_page = hdr->page_size / info.blksz; in fb_mmc_update_zimage()
244 ramdisk_buffer = (u8 *)hdr + (hdr_sectors * info.blksz); in fb_mmc_update_zimage()
410 sparse.blksz = info.blksz; in fastboot_mmc_flash_write()
486 blks_size * info.blksz, cmd); in fastboot_mmc_erase()
Dfb_nand.c113 blk * info->blksz, in fb_nand_sparse_write()
114 blkcnt * info->blksz, &written); in fb_nand_sparse_write()
126 return written / info->blksz; in fb_nand_sparse_write()
196 sparse.blksz = mtd->writesize; in fastboot_nand_flash_write()
197 sparse.start = part->offset / sparse.blksz; in fastboot_nand_flash_write()
198 sparse.size = part->size / sparse.blksz; in fastboot_nand_flash_write()
/external/u-boot/cmd/
Ddisk.c55 info.start, info.size, info.blksz); in common_diskboot()
97 cnt += info.blksz - 1; in common_diskboot()
98 cnt /= info.blksz; in common_diskboot()
102 (ulong *)(addr + info.blksz)) != cnt) { in common_diskboot()
123 flush_cache(addr, (cnt+1)*info.blksz); in common_diskboot()
Dgpt.c198 newpart->gpt_part_info.blksz = info->blksz; in allocate_disk_part()
237 curr->gpt_part_info.blksz); in print_gpt_info()
239 curr->gpt_part_info.blksz); in print_gpt_info()
243 printf("Block size %lu, name %s\n", curr->gpt_part_info.blksz, in print_gpt_info()
286 curr->gpt_part_info.blksz); in create_gpt_partitions_list()
291 curr->gpt_part_info.blksz); in create_gpt_partitions_list()
517 parts[i].size = lldiv(size_ll, dev_desc->blksz); in set_gpt_info()
528 parts[i].start = lldiv(start_ll, dev_desc->blksz); in set_gpt_info()
583 blk_dev_desc->blksz); in gpt_verify()
/external/u-boot/drivers/scsi/
Dscsi.c178 pccb->datalen = block_dev->blksz * blocks; in scsi_read()
185 pccb->datalen = block_dev->blksz * in scsi_read()
192 pccb->datalen = block_dev->blksz * blks; in scsi_read()
250 pccb->datalen = (block_dev->blksz * in scsi_write()
257 pccb->datalen = block_dev->blksz * blks; in scsi_write()
361 lbaint_t *capacity, unsigned long *blksz) in scsi_read_capacity() argument
382 *blksz = ((unsigned long)pccb->pdata[4] << 24) | in scsi_read_capacity()
409 *blksz = ((uint64_t)pccb->pdata[8] << 56) | in scsi_read_capacity()
469 dev_desc->blksz = 0; in scsi_init_dev_desc()
495 unsigned long blksz; in scsi_detect_dev() local
[all …]
/external/u-boot/lib/efi_loader/
Defi_disk.c59 int blksz; in efi_disk_rw_blocks() local
65 blksz = desc->blksz; in efi_disk_rw_blocks()
66 blocks = buffer_size / blksz; in efi_disk_rw_blocks()
70 __LINE__, blocks, lba, blksz, direction); in efi_disk_rw_blocks()
73 if (buffer_size & (blksz - 1)) in efi_disk_rw_blocks()
288 diskobj->media.block_size = desc->blksz; in efi_disk_add_dev()
289 diskobj->media.io_align = desc->blksz; in efi_disk_add_dev()

1234