Home
last modified time | relevance | path

Searched refs:blocksize (Results 1 – 25 of 203) sorted by relevance

123456789

/freebsd/tests/sys/file/
H A Dfspacectl_test.c50 blksize_t blocksize; in fill() local
54 blocksize = statbuf.st_blksize; in fill()
56 buf = malloc(blocksize); in fill()
61 blen = len < (off_t)blocksize ? len : blocksize; in fill()
93 blksize_t blocksize; in check_content_dealloc() local
95 blocksize = fd_get_blksize(); in check_content_dealloc()
96 if (blocksize == -1) in check_content_dealloc()
99 buf = malloc(blocksize * 2); in check_content_dealloc()
102 sblk = buf + blocksize; in check_content_dealloc()
104 memset(sblk, 0, blocksize); in check_content_dealloc()
[all …]
/freebsd/crypto/heimdal/lib/krb5/
H A Dcrypto-evp.c101 size_t i, blocksize; in _krb5_evp_encrypt_cts() local
109 blocksize = EVP_CIPHER_CTX_block_size(c); in _krb5_evp_encrypt_cts()
111 if (len < blocksize) { in _krb5_evp_encrypt_cts()
115 } else if (len == blocksize) { in _krb5_evp_encrypt_cts()
129 i = ((len - 1) / blocksize) * blocksize; in _krb5_evp_encrypt_cts()
131 p += i - blocksize; in _krb5_evp_encrypt_cts()
133 memcpy(ivec2, p, blocksize); in _krb5_evp_encrypt_cts()
136 tmp[i] = p[i + blocksize] ^ ivec2[i]; in _krb5_evp_encrypt_cts()
137 for (; i < blocksize; i++) in _krb5_evp_encrypt_cts()
141 EVP_Cipher(c, p, tmp, blocksize); in _krb5_evp_encrypt_cts()
[all …]
/freebsd/crypto/openssl/providers/implementations/ciphers/
H A Dciphercommon_block.c57 size_t blocksize, in ossl_cipher_fillblock() argument
60 size_t blockmask = ~(blocksize - 1); in ossl_cipher_fillblock()
61 size_t bufremain = blocksize - *buflen; in ossl_cipher_fillblock()
63 assert(*buflen <= blocksize); in ossl_cipher_fillblock()
64 assert(blocksize > 0 && (blocksize & (blocksize - 1)) == 0); in ossl_cipher_fillblock()
80 int ossl_cipher_trailingdata(unsigned char *buf, size_t *buflen, size_t blocksize, in ossl_cipher_trailingdata() argument
86 if (*buflen + *inlen > blocksize) { in ossl_cipher_trailingdata()
99 void ossl_cipher_padblock(unsigned char *buf, size_t *buflen, size_t blocksize) in ossl_cipher_padblock() argument
102 unsigned char pad = (unsigned char)(blocksize - *buflen); in ossl_cipher_padblock()
104 for (i = *buflen; i < blocksize; i++) in ossl_cipher_padblock()
[all …]
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/
H A Dmanipulate_user_buffer.c43 static int blocksize = 131072; /* 128K */ variable
111 blocksize = atoi(optarg); in parse_options()
157 if (blocksize < 512 || filename == NULL || numblocks <= 0 || in parse_options()
172 int total_data = blocksize * numblocks; in write_thread()
178 wrote = pwrite(fd, buf, blocksize, offset); in write_thread()
179 if (wrote != blocksize) { in write_thread()
186 offset = ((offset + blocksize) % total_data); in write_thread()
187 left -= blocksize; in write_thread()
203 int total_data = blocksize * numblocks; in read_thread()
209 read = pread(fd, buf, blocksize, offset); in read_thread()
[all …]
/freebsd/contrib/libarchive/libarchive/test/
H A Dtest_write_format_tar.c36 size_t blocksize; in DEFINE_TEST()
39 for (blocksize = 1; blocksize < 100000; blocksize += blocksize + 3) { in DEFINE_TEST()
47 archive_write_set_bytes_per_block(a, (int)blocksize)); in DEFINE_TEST()
49 archive_write_set_bytes_in_last_block(a, (int)blocksize)); in DEFINE_TEST()
50 assertEqualInt(blocksize, in DEFINE_TEST()
54 assertEqualInt(blocksize, in DEFINE_TEST()
83 failure("blocksize in DEFINE_TEST()
37 size_t blocksize; DEFINE_TEST() local
[all...]
H A Dtest_write_format_tar_sparse.c36 size_t blocksize; in test_1()
45 for (blocksize = 1; blocksize < 100000; blocksize += blocksize + 3) { in test_1()
53 archive_write_set_bytes_per_block(a, (int)blocksize)); in test_1()
55 archive_write_set_bytes_in_last_block(a, (int)blocksize)); in test_1()
56 assertEqualInt(blocksize, in test_1()
60 assertEqualInt(blocksize, in test_1()
96 failure("blocksize in test_1()
37 size_t blocksize; test_1() local
180 size_t blocksize = 20 * 512; test_2() local
[all...]
H A Dtest_write_filter_program.c36 int blocksize = 1024; in DEFINE_TEST()
43 /* NOTE: Setting blocksize=1024 will cause gunzip failure because in DEFINE_TEST()
45 * exit code 1. So we should set blocksize=1 in order not to in DEFINE_TEST()
50 blocksize = 1; in DEFINE_TEST()
64 assertA(0 == archive_write_set_bytes_per_block(a, blocksize)); in DEFINE_TEST()
65 assertA(0 == archive_write_set_bytes_in_last_block(a, blocksize)); in DEFINE_TEST()
66 assertA(blocksize == archive_write_get_bytes_in_last_block(a)); in DEFINE_TEST()
68 assertA(blocksize == archive_write_get_bytes_in_last_block(a)); in DEFINE_TEST()
37 int blocksize = 1024; DEFINE_TEST() local
/freebsd/sys/contrib/openzfs/tests/zfs-tests/cmd/file/
H A Dfile_append.c32 static int blocksize = 131072; /* 128KiB */ variable
82 blocksize = atoi(optarg); in parse_options()
117 if (use_odirect && ((blocksize % sysconf(_SC_PAGE_SIZE)) != 0)) { in parse_options()
123 if (blocksize < 512 || expected_offset < 0 || filename == NULL || in parse_options()
155 blocksize); in main()
164 int left = blocksize; in main()
173 int wrote = write(fd, buf, blocksize); in main()
175 if (wrote != blocksize) { in main()
182 blocksize); in main()
/freebsd/crypto/heimdal/appl/rsh/
H A Dcommon.c48 size_t blocksize; in init_ivecs() local
50 krb5_crypto_getblocksize(context, crypto, &blocksize); in init_ivecs()
52 ivec_in[0] = malloc(blocksize); in init_ivecs()
53 memset(ivec_in[0], client, blocksize); in init_ivecs()
56 ivec_in[1] = malloc(blocksize); in init_ivecs()
57 memset(ivec_in[1], 2 | client, blocksize); in init_ivecs()
61 ivec_out[0] = malloc(blocksize); in init_ivecs()
62 memset(ivec_out[0], !client, blocksize); in init_ivecs()
65 ivec_out[1] = malloc(blocksize); in init_ivecs()
66 memset(ivec_out[1], 2 | !client, blocksize); in init_ivecs()
/freebsd/tools/test/stress2/misc/
H A Dnewfs.sh54 blocksize=4096
55 while [ $blocksize -le 65536 ]; do
57 fragsize=$((blocksize / i))
58 echo "newfs $opt -b $blocksize -f $fragsize"\
60 newfs $opt -b $blocksize -f $fragsize \
79 blocksize=$((blocksize * 2))
H A Dwrite.sh103 off_t blocksize;
128 if ((buf = malloc(t[indx].blocksize)) == NULL)
144 if ((r = write(fd, buf, t[indx].blocksize)) !=
145 t[indx].blocksize) {
177 t[i].blocksize = (arc4random() + 1) % MAXBLK;
179 t[i].blocksize = 2 << (arc4random() % 20);
184 if (t[i].blocks * t[i].blocksize > MAXSIZ)
185 t[i].blocks = MAXSIZ / t[i].blocksize;
189 i, (long long)t[i].blocksize, t[i].sequential, t[i].mindelay,
191 (long long)t[i].blocksize * t[i].blocks / 1024 / 1024);
H A Dnewfs3.sh53 blocksize=4096
54 while [ $blocksize -le 65536 ]; do
56 fragsize=$((blocksize / i))
57 newfs -b $blocksize -f $fragsize $opt md$mdstart > \
74 blocksize=$((blocksize * 2))
/freebsd/sys/contrib/openzfs/module/zfs/
H A Ddmu_object.c47 dmu_object_alloc_impl(objset_t *os, dmu_object_type_t ot, int blocksize, in dmu_object_alloc_impl() argument
191 dnode_allocate(dn, ot, blocksize, in dmu_object_alloc_impl()
226 dmu_object_alloc(objset_t *os, dmu_object_type_t ot, int blocksize, in dmu_object_alloc() argument
229 return dmu_object_alloc_impl(os, ot, blocksize, 0, bonustype, in dmu_object_alloc()
234 dmu_object_alloc_ibs(objset_t *os, dmu_object_type_t ot, int blocksize, in dmu_object_alloc_ibs() argument
238 return dmu_object_alloc_impl(os, ot, blocksize, indirect_blockshift, in dmu_object_alloc_ibs()
243 dmu_object_alloc_dnsize(objset_t *os, dmu_object_type_t ot, int blocksize, in dmu_object_alloc_dnsize() argument
246 return (dmu_object_alloc_impl(os, ot, blocksize, 0, bonustype, in dmu_object_alloc_dnsize()
256 dmu_object_alloc_hold(objset_t *os, dmu_object_type_t ot, int blocksize, in dmu_object_alloc_hold() argument
260 return (dmu_object_alloc_impl(os, ot, blocksize, indirect_blockshift, in dmu_object_alloc_hold()
[all …]
/freebsd/sys/opencrypto/
H A Dxform_sha2.c68 .blocksize = SHA2_224_BLOCK_LEN,
80 .blocksize = SHA2_256_BLOCK_LEN,
92 .blocksize = SHA2_384_BLOCK_LEN,
104 .blocksize = SHA2_512_BLOCK_LEN,
117 .blocksize = SHA2_224_BLOCK_LEN,
129 .blocksize = SHA2_256_BLOCK_LEN,
141 .blocksize = SHA2_384_BLOCK_LEN,
153 .blocksize = SHA2_512_BLOCK_LEN,
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/vdev_disk/
H A Dpage_alignment.c51 size_t blocksize; member
80 if (!IS_P2ALIGNED(len, s->blocksize)) in vdev_disk_check_alignment_cb()
93 if (!IS_P2ALIGNED(off, s->blocksize)) in vdev_disk_check_alignment_cb()
112 uint32_t blocksize; member
413 .blocksize = test->blocksize, in run_test()
/freebsd/lib/libc/gen/
H A Dgetbsize.c41 long n, max, mul, blocksize; in getbsize() local
88 if ((blocksize = n * mul) < 512) { in getbsize()
91 blocksize = n = 512; in getbsize()
94 blocksize = n = 512; in getbsize()
98 *blocksizep = blocksize; in getbsize()
/freebsd/sys/cam/ctl/
H A Dctl_backend_block.c823 off = roff = ((off_t)lbalen->lba) * be_lun->cbe_lun.blocksize; in ctl_be_block_gls_file()
843 scsi_ulto4b(MIN(UINT32_MAX, off / be_lun->cbe_lun.blocksize - in ctl_be_block_gls_file()
865 val = vattr.va_bytes / be_lun->cbe_lun.blocksize; in ctl_be_block_getattr_file()
872 be_lun->cbe_lun.blocksize; in ctl_be_block_getattr_file()
908 be_lun->cbe_lun.blocksize; in ctl_be_block_unmap_file()
910 be_lun->cbe_lun.blocksize; in ctl_be_block_unmap_file()
1081 off = roff = ((off_t)lbalen->lba) * be_lun->cbe_lun.blocksize; in ctl_be_block_gls_zvol()
1101 scsi_ulto4b(MIN(UINT32_MAX, off / be_lun->cbe_lun.blocksize - in ctl_be_block_gls_zvol()
1163 maxlen = LONG_MAX - (LONG_MAX % be_lun->cbe_lun.blocksize); in ctl_be_block_unmap_dev_range()
1173 bio->bio_pblkno = off / be_lun->cbe_lun.blocksize; in ctl_be_block_unmap_dev_range()
[all …]
H A Dctl_backend_ramdisk.c370 lbas = ctl_kern_data_len(io) / cbe_lun->blocksize; in ctl_backend_ramdisk_cmp()
377 page += lbaoff * cbe_lun->blocksize; in ctl_backend_ramdisk_cmp()
379 cbe_lun->blocksize); in ctl_backend_ramdisk_cmp()
381 if (res < cbe_lun->blocksize) in ctl_backend_ramdisk_cmp()
433 lbas = MIN(lbas, 131072 / cbe_lun->blocksize); in ctl_backend_ramdisk_compare()
434 len = lbas * cbe_lun->blocksize; in ctl_backend_ramdisk_compare()
461 off = lbaoff * cbe_lun->blocksize; in ctl_backend_ramdisk_rw()
467 len = lbas * cbe_lun->blocksize; in ctl_backend_ramdisk_rw()
493 ctl_set_kern_data_len(io, lbas * cbe_lun->blocksize); in ctl_backend_ramdisk_rw()
622 nsdata->ncap = htole64(be_lun->cap_bytes / cbe_lun->blocksize); in ramdisk_namespace_data()
[all …]
/freebsd/usr.bin/du/
H A Ddu.c76 static long blocksize, cblocksize; variable
109 blocksize = 0; in main()
167 blocksize = 1073741824; in main()
174 blocksize = 1024; in main()
181 blocksize = 1048576; in main()
245 if (blocksize == 0) in main()
246 (void)getbsize(&notused, &blocksize); in main()
250 blocksize /= DEV_BSIZE; in main()
255 blocksize); in main()
286 cblocksize, blocksize)) { in main()
[all …]
/freebsd/crypto/openssl/providers/implementations/kdfs/
H A Dkrb5kdf.c265 static void n_fold(unsigned char *block, unsigned int blocksize, in n_fold() argument
271 if (constant_len == blocksize) { in n_fold()
277 gcd = blocksize; in n_fold()
286 lcm = blocksize * constant_len / gcd; in n_fold()
289 memset(block, 0, blocksize); in n_fold()
297 b = l % blocksize; in n_fold()
319 for (b = blocksize - 1; b >= 0 && carry != 0; b--) { in n_fold()
363 size_t blocksize; in KRB5KDF() local
396 blocksize = EVP_CIPHER_CTX_get_block_size(ctx); in KRB5KDF()
398 if (constant_len > blocksize) { in KRB5KDF()
[all …]
/freebsd/stand/usb/storage/
H A Dumass_loader.c116 uint32_t blocksize; in umass_disk_open_sub() local
118 if (usb_msc_read_capacity(umass_uaa.device, 0, &nblock, &blocksize) != 0) in umass_disk_open_sub()
121 return (disk_open(dev, ((uint64_t)nblock + 1) * (uint64_t)blocksize, blocksize)); in umass_disk_open_sub()
146 uint32_t blocksize; in umass_disk_ioctl() local
161 &nblock, &blocksize) != 0) in umass_disk_ioctl()
167 *(uint32_t*)buf = blocksize; in umass_disk_ioctl()
/freebsd/sys/contrib/libsodium/test/default/
H A Dsodium_utils.c18 size_t blocksize; in main() local
147 blocksize = 1U + randombytes_uniform(100U); in main()
148 bin_padded_maxlen = bin_len + (blocksize - bin_len % blocksize); in main()
153 blocksize, bin_padded_maxlen - 1U) == -1); in main()
155 blocksize, bin_padded_maxlen + 1U) == 0); in main()
157 blocksize, bin_padded_maxlen + 1U) == 0); in main()
161 blocksize, bin_padded_maxlen) == 0); in main()
169 blocksize) == 0); in main()
/freebsd/sys/dev/ocs_fc/
H A Docs_utils.c1313 uint32_t blocksize = 0; in ocs_scsi_dif_blocksize() local
1316 case OCS_SCSI_DIF_BK_SIZE_512: blocksize = 512; break; in ocs_scsi_dif_blocksize()
1317 case OCS_SCSI_DIF_BK_SIZE_1024: blocksize = 1024; break; in ocs_scsi_dif_blocksize()
1318 case OCS_SCSI_DIF_BK_SIZE_2048: blocksize = 2048; break; in ocs_scsi_dif_blocksize()
1319 case OCS_SCSI_DIF_BK_SIZE_4096: blocksize = 4096; break; in ocs_scsi_dif_blocksize()
1320 case OCS_SCSI_DIF_BK_SIZE_520: blocksize = 520; break; in ocs_scsi_dif_blocksize()
1321 case OCS_SCSI_DIF_BK_SIZE_4104: blocksize = 4104; break; in ocs_scsi_dif_blocksize()
1326 return blocksize; in ocs_scsi_dif_blocksize()
1342 ocs_scsi_dif_set_blocksize(ocs_scsi_dif_info_t *dif_info, uint32_t blocksize) in ocs_scsi_dif_set_blocksize() argument
1346 switch(blocksize) { in ocs_scsi_dif_set_blocksize()
[all …]
/freebsd/crypto/openssl/crypto/ec/
H A Dec_mult.c39 size_t blocksize; /* block size for wNAF splitting */ member
65 ret->blocksize = 8; /* default */ in ec_pre_comp_new()
417 size_t blocksize = 0, numblocks = 0; /* for wNAF splitting */ in ossl_ec_wNAF_mul() local
481 blocksize = pre_comp->blocksize; in ossl_ec_wNAF_mul()
487 numblocks = (BN_num_bits(scalar) / blocksize) + 1; in ossl_ec_wNAF_mul()
600 if (tmp_len < numblocks * blocksize) { in ossl_ec_wNAF_mul()
604 numblocks = (tmp_len + blocksize - 1) / blocksize; in ossl_ec_wNAF_mul()
619 wNAF_len[i] = blocksize; in ossl_ec_wNAF_mul()
620 if (tmp_len < blocksize) { in ossl_ec_wNAF_mul()
625 tmp_len -= blocksize; in ossl_ec_wNAF_mul()
[all …]
/freebsd/usr.bin/hexdump/
H A Dhexdump.c43 int blocksize; /* data block size */ variable
61 for (blocksize = 0, tfs = fshead; tfs; tfs = tfs->nextfs) { in main()
63 if (blocksize < tfs->bcnt) in main()
64 blocksize = tfs->bcnt; in main()

123456789