Home
last modified time | relevance | path

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

1234567891011

/src/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 …]
/src/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 …]
/src/crypto/openssl/providers/implementations/ciphers/
H A Dciphercommon_block.c40 size_t blocksize, in ossl_cipher_fillblock() argument
43 size_t blockmask = ~(blocksize - 1); in ossl_cipher_fillblock()
44 size_t bufremain = blocksize - *buflen; in ossl_cipher_fillblock()
46 assert(*buflen <= blocksize); in ossl_cipher_fillblock()
47 assert(blocksize > 0 && (blocksize & (blocksize - 1)) == 0); in ossl_cipher_fillblock()
63 int ossl_cipher_trailingdata(unsigned char *buf, size_t *buflen, size_t blocksize, in ossl_cipher_trailingdata() argument
69 if (*buflen + *inlen > blocksize) { in ossl_cipher_trailingdata()
82 void ossl_cipher_padblock(unsigned char *buf, size_t *buflen, size_t blocksize) in ossl_cipher_padblock() argument
85 unsigned char pad = (unsigned char)(blocksize - *buflen); in ossl_cipher_padblock()
87 for (i = *buflen; i < blocksize; i++) in ossl_cipher_padblock()
[all …]
/src/sys/contrib/openzfs/tests/zfs-tests/cmd/
H A Dmanipulate_user_buffer.c44 static int blocksize = 131072; /* 128K */ variable
112 blocksize = atoi(optarg); in parse_options()
158 if (blocksize < 512 || filename == NULL || numblocks <= 0 || in parse_options()
173 int total_data = blocksize * numblocks; in write_thread()
179 wrote = pwrite(fd, buf, blocksize, offset); in write_thread()
180 if (wrote != blocksize) { in write_thread()
187 offset = ((offset + blocksize) % total_data); in write_thread()
188 left -= blocksize; in write_thread()
204 int total_data = blocksize * numblocks; in read_thread()
210 read = pread(fd, buf, blocksize, offset); in read_thread()
[all …]
/src/crypto/krb5/src/lib/crypto/builtin/
H A Dkdf.c79 size_t blocksize, keybytes, n; in k5_sp800_108_feedback_cmac() local
86 blocksize = enc->block_size; in k5_sp800_108_feedback_cmac()
93 ret = alloc_data(&prf, blocksize); in k5_sp800_108_feedback_cmac()
127 if (keybytes - n <= blocksize) { in k5_sp800_108_feedback_cmac()
131 memcpy(rnd_out->data + n, prf.data, blocksize); in k5_sp800_108_feedback_cmac()
132 n += blocksize; in k5_sp800_108_feedback_cmac()
136 zapfree(prf.data, blocksize); in k5_sp800_108_feedback_cmac()
144 size_t blocksize, keybytes, n; in k5_derive_random_rfc3961() local
148 blocksize = enc->block_size; in k5_derive_random_rfc3961()
151 if (blocksize == 1) in k5_derive_random_rfc3961()
[all …]
H A Dhmac.c64 if (keyblock->length > hash->blocksize) in krb5int_hmac_keyblock()
70 xorkey = k5alloc(hash->blocksize, &ret); in krb5int_hmac_keyblock()
81 memset(xorkey, 0x36, hash->blocksize); in krb5int_hmac_keyblock()
87 ihash_iov[0].data = make_data(xorkey, hash->blocksize); in krb5int_hmac_keyblock()
95 memset(xorkey, 0x5c, hash->blocksize); in krb5int_hmac_keyblock()
101 ohash_iov[0].data = make_data(xorkey, hash->blocksize); in krb5int_hmac_keyblock()
110 zapfree(xorkey, hash->blocksize); in krb5int_hmac_keyblock()
/src/contrib/libarchive/libarchive/test/
H A Dtest_write_format_tar.c36 size_t blocksize; in DEFINE_TEST() local
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=%zu", blocksize); in DEFINE_TEST()
84 assertEqualInt(((2048 - 1)/blocksize+1)*blocksize, used); in DEFINE_TEST()
H A Dtest_write_format_tar_sparse.c36 size_t blocksize; in test_1() local
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=%zu", blocksize); in test_1()
97 assertEqualInt(((11264 - 1)/blocksize+1)*blocksize, used); in test_1()
179 size_t blocksize = 20 * 512; in test_2() local
194 archive_write_set_bytes_per_block(a, (int)blocksize)); in test_2()
[all …]
H A Dtest_write_filter_program.c36 int blocksize = 1024; in DEFINE_TEST() local
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()
/src/crypto/krb5/src/lib/crypto/krb/
H A Denc_raw.c49 unsigned int blocksize, plainlen = 0, padsize = 0; in krb5int_raw_encrypt() local
51 blocksize = ktp->crypto_length(ktp, KRB5_CRYPTO_TYPE_PADDING); in krb5int_raw_encrypt()
60 if (blocksize != 0) { in krb5int_raw_encrypt()
62 if (plainlen % blocksize) in krb5int_raw_encrypt()
63 padsize = blocksize - (plainlen % blocksize); in krb5int_raw_encrypt()
84 unsigned int blocksize = 0; /* enc block size, not confounder len */ in krb5int_raw_decrypt() local
89 blocksize = ktp->crypto_length(ktp, KRB5_CRYPTO_TYPE_PADDING); in krb5int_raw_decrypt()
98 if (blocksize == 0) { in krb5int_raw_decrypt()
104 if (cipherlen % blocksize != 0) in krb5int_raw_decrypt()
H A Denc_dk_hmac.c81 unsigned int blocksize, hmacsize, plainlen = 0, padsize = 0; in krb5int_dk_encrypt() local
86 blocksize = ktp->crypto_length(ktp, KRB5_CRYPTO_TYPE_PADDING); in krb5int_dk_encrypt()
106 if (blocksize != 0) { in krb5int_dk_encrypt()
108 if (plainlen % blocksize) in krb5int_dk_encrypt()
109 padsize = blocksize - (plainlen % blocksize); in krb5int_dk_encrypt()
191 unsigned int blocksize; /* enc block size, not confounder len */ in krb5int_dk_decrypt() local
197 blocksize = ktp->crypto_length(ktp, KRB5_CRYPTO_TYPE_PADDING); in krb5int_dk_decrypt()
200 if (blocksize != 0) { in krb5int_dk_decrypt()
208 if (cipherlen % blocksize != 0) in krb5int_dk_decrypt()
/src/tools/test/stress2/misc/
H A Dnewfs8.sh30 blocksize=4096
31 while [ $blocksize -le 65536 ]; do
33 fragsize=$((blocksize / i))
34 echo "`date +%T` newfs $opt -b $blocksize -f $fragsize"\
36 newfs $opt -b $blocksize -f $fragsize \
46 ../tools/killall.sh || { echo "Failed at $opt -b $blocksize -f $fragsize$"; \
59 blocksize=$((blocksize * 2))
62 echo "Timed out in $opt -b $blocksize -f $fragsize$"
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))
/src/sys/contrib/openzfs/tests/zfs-tests/cmd/file/
H A Dfile_append.c33 static int blocksize = 131072; /* 128KiB */ variable
83 blocksize = atoi(optarg); in parse_options()
118 if (use_odirect && ((blocksize % sysconf(_SC_PAGE_SIZE)) != 0)) { in parse_options()
124 if (blocksize < 512 || expected_offset < 0 || filename == NULL || in parse_options()
156 blocksize); in main()
165 int left = blocksize; in main()
174 int wrote = write(fd, buf, blocksize); in main()
176 if (wrote != blocksize) { in main()
183 blocksize); in main()
/src/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()
/src/sys/contrib/openzfs/module/zfs/
H A Ddmu_object.c48 dmu_object_alloc_impl(objset_t *os, dmu_object_type_t ot, int blocksize, in dmu_object_alloc_impl() argument
192 dnode_allocate(dn, ot, blocksize, in dmu_object_alloc_impl()
227 dmu_object_alloc(objset_t *os, dmu_object_type_t ot, int blocksize, in dmu_object_alloc() argument
230 return dmu_object_alloc_impl(os, ot, blocksize, 0, bonustype, in dmu_object_alloc()
235 dmu_object_alloc_ibs(objset_t *os, dmu_object_type_t ot, int blocksize, in dmu_object_alloc_ibs() argument
239 return dmu_object_alloc_impl(os, ot, blocksize, indirect_blockshift, in dmu_object_alloc_ibs()
244 dmu_object_alloc_dnsize(objset_t *os, dmu_object_type_t ot, int blocksize, in dmu_object_alloc_dnsize() argument
247 return (dmu_object_alloc_impl(os, ot, blocksize, 0, bonustype, in dmu_object_alloc_dnsize()
257 dmu_object_alloc_hold(objset_t *os, dmu_object_type_t ot, int blocksize, in dmu_object_alloc_hold() argument
261 return (dmu_object_alloc_impl(os, ot, blocksize, indirect_blockshift, in dmu_object_alloc_hold()
[all …]
/src/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,
/src/sys/contrib/openzfs/tests/zfs-tests/tests/functional/vdev_disk/
H A Dpage_alignment.c52 size_t blocksize; member
81 if (!IS_P2ALIGNED(len, s->blocksize)) in vdev_disk_check_alignment_cb()
94 if (!IS_P2ALIGNED(off, s->blocksize)) in vdev_disk_check_alignment_cb()
113 uint32_t blocksize; member
414 .blocksize = test->blocksize, in run_test()
/src/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()
/src/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 …]
/src/crypto/openssl/providers/implementations/kdfs/
H A Dkrb5kdf.c285 static void n_fold(unsigned char *block, unsigned int blocksize, in n_fold() argument
291 if (constant_len == blocksize) { in n_fold()
297 gcd = blocksize; in n_fold()
306 lcm = blocksize * constant_len / gcd; in n_fold()
309 memset(block, 0, blocksize); in n_fold()
317 b = l % blocksize; in n_fold()
339 for (b = blocksize - 1; b >= 0 && carry != 0; b--) { in n_fold()
386 size_t blocksize; in KRB5KDF() local
418 blocksize = EVP_CIPHER_CTX_get_block_size(ctx); in KRB5KDF()
420 if (blocksize == 0) { in KRB5KDF()
[all …]
/src/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()

1234567891011