Home
last modified time | relevance | path

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

1234

/freebsd/bin/pax/
H A Dbuf_subs.c61 int blksz = MAXBLK; /* block input/output size in bytes */ variable
108 blksz = rdblksz = wrblksz; in wr_start()
166 rdblksz = blksz = MAXBLK; in cp_start()
217 wrblksz = blksz = rdblksz; in appnd_start()
219 blksz = rdblksz; in appnd_start()
234 if ((cnt = (skcnt/blksz) * blksz) < skcnt) in appnd_start()
235 cnt += blksz; in appnd_start()
252 bufend = buf + blksz; in appnd_start()
261 bufend = buf + blksz; in appnd_start()
266 bufend = buf + blksz; in appnd_start()
[all …]
H A Dar_io.c192 blksz = rdblksz = wrblksz; in ar_open()
220 blksz = rdblksz = MAXBLK; in ar_open()
234 blksz = rdblksz = wrblksz; in ar_open()
247 blksz = rdblksz; in ar_open()
249 blksz = MAXBLK; in ar_open()
257 blksz = rdblksz = wrblksz; in ar_open()
275 blksz = rdblksz; in ar_open()
277 blksz = MAXBLK; in ar_open()
283 blksz = rdblksz = BLKMULT; in ar_open()
/freebsd/sys/opencrypto/
H A Dcryptosoft.c106 int blksz, resid; in swcr_encdec() local
124 blksz = exf->blocksize; in swcr_encdec()
126 blksz = exf->native_blocksize; in swcr_encdec()
161 for (resid = crp->crp_payload_length; resid >= blksz; resid -= todo) { in swcr_encdec()
172 if (inlen < blksz) { in swcr_encdec()
173 crypto_cursor_copydata(&cc_in, blksz, blk); in swcr_encdec()
175 inlen = blksz; in swcr_encdec()
177 if (outlen < blksz) { in swcr_encdec()
179 outlen = blksz; in swcr_encdec()
182 todo = rounddown2(MIN(resid, MIN(inlen, outlen)), blksz); in swcr_encdec()
[all …]
/freebsd/sys/contrib/openzfs/include/sys/
H A Duio_impl.h60 zfs_dio_offset_aligned(uint64_t offset, uint64_t blksz) in zfs_dio_offset_aligned() argument
62 return (IS_P2ALIGNED(offset, blksz)); in zfs_dio_offset_aligned()
66 zfs_dio_size_aligned(uint64_t size, uint64_t blksz) in zfs_dio_size_aligned() argument
68 return ((size % blksz) == 0); in zfs_dio_size_aligned()
72 zfs_dio_aligned(uint64_t offset, uint64_t size, uint64_t blksz) in zfs_dio_aligned() argument
74 return (zfs_dio_offset_aligned(offset, blksz) && in zfs_dio_aligned()
75 zfs_dio_size_aligned(size, blksz)); in zfs_dio_aligned()
79 zfs_uio_aligned(zfs_uio_t *uio, uint64_t blksz) in zfs_uio_aligned() argument
82 blksz)); in zfs_uio_aligned()
/freebsd/crypto/openssl/providers/implementations/ciphers/
H A Dciphercommon.c253 size_t blksz = ctx->blocksize; in ossl_cipher_generic_block_update() local
282 padnum = blksz - (inl % blksz); in ossl_cipher_generic_block_update()
306 if ((inl % blksz) != 0) { in ossl_cipher_generic_block_update()
329 blksz, &ctx->tlsmac, &ctx->alloced, in ossl_cipher_generic_block_update()
338 nextblocks = ossl_cipher_fillblock(ctx->buf, &ctx->bufsz, blksz, in ossl_cipher_generic_block_update()
341 nextblocks = inl & ~(blksz-1); in ossl_cipher_generic_block_update()
348 if (ctx->bufsz == blksz && (ctx->enc || inl > 0 || !ctx->pad)) { in ossl_cipher_generic_block_update()
349 if (outsize < blksz) { in ossl_cipher_generic_block_update()
353 if (!ctx->hw->cipher(ctx, out, ctx->buf, blksz)) { in ossl_cipher_generic_block_update()
358 outlint = blksz; in ossl_cipher_generic_block_update()
[all …]
/freebsd/usr.bin/mkimg/tests/
H A Dmkimg_test.sh32 local blksz bootarg bootsz format geom nhds nsecs partarg pfx scheme
36 blksz=$3
62 imagename=$pfx-$geom-$blksz-$scheme.$format
64 mkimg -y -f $format -o $imagename -s $scheme -P $blksz -H $nhds -T $nsecs \
98 local blksz format geom scheme
101 blksz=$2
107 bsd=`makeimage raw bsd $blksz $geom _tmp`
114 image=`makeimage $format $scheme $blksz $geom img $partinfo`
/freebsd/sys/contrib/openzfs/lib/libspl/include/sys/
H A Duio.h93 zfs_dio_offset_aligned(uint64_t offset, uint64_t blksz) in zfs_dio_offset_aligned() argument
95 return ((IS_P2ALIGNED(offset, blksz)) ? B_TRUE : B_FALSE); in zfs_dio_offset_aligned()
99 zfs_dio_size_aligned(uint64_t size, uint64_t blksz) in zfs_dio_size_aligned() argument
101 return (((size % blksz) == 0) ? B_TRUE : B_FALSE); in zfs_dio_size_aligned()
105 zfs_dio_aligned(uint64_t offset, uint64_t size, uint64_t blksz) in zfs_dio_aligned() argument
107 return ((zfs_dio_offset_aligned(offset, blksz) && in zfs_dio_aligned()
108 zfs_dio_size_aligned(size, blksz)) ? B_TRUE : B_FALSE); in zfs_dio_aligned()
/freebsd/sys/dev/sound/pcm/
H A Dbuffer.c163 sndbuf_resize(struct snd_dbuf *b, unsigned int blkcnt, unsigned int blksz) in sndbuf_resize() argument
173 if (blksz == 0) in sndbuf_resize()
174 blksz = b->blksz; in sndbuf_resize()
175 if (blkcnt < 2 || blksz < 16 || (blkcnt * blksz) > b->maxsize) { in sndbuf_resize()
179 if (blkcnt == b->blkcnt && blksz == b->blksz) in sndbuf_resize()
182 bufsize = blkcnt * blksz; in sndbuf_resize()
203 b->blksz = blksz; in sndbuf_resize()
213 sndbuf_remalloc(struct snd_dbuf *b, unsigned int blkcnt, unsigned int blksz) in sndbuf_remalloc() argument
218 if (blkcnt < 2 || blksz < 16) in sndbuf_remalloc()
221 bufsize = blksz * blkcnt; in sndbuf_remalloc()
[all …]
H A Dbuffer.h48 unsigned int blksz, blkcnt; member
68 int sndbuf_resize(struct snd_dbuf *b, unsigned int blkcnt, unsigned int blksz);
69 int sndbuf_remalloc(struct snd_dbuf *b, unsigned int blkcnt, unsigned int blksz);
94 void sndbuf_setblksz(struct snd_dbuf *b, unsigned int blksz);
/freebsd/sys/dev/sound/macio/
H A Daoa.c66 u_int blksz; /* block size */ member
79 dma->slots = dma->bufsz / dma->blksz; in aoa_dma_set_program()
87 dma->blksz, /* count */ in aoa_dma_set_program()
94 addr += dma->blksz; in aoa_dma_set_program()
130 dma->blksz = PAGE_SIZE; /* initial blocksize */ in aoa_dma_create()
154 blocksz, dma->blksz)); in aoa_chan_setblocksize()
173 if (blocksz == dma->blksz) in aoa_chan_setblocksize()
174 return (dma->blksz); in aoa_chan_setblocksize()
184 dma->blksz = blocksz; in aoa_chan_setblocksize()
187 return (dma->blksz); in aoa_chan_setblocksize()
[all …]
/freebsd/sys/geom/uzip/
H A Dg_uzip_zlib.c41 uint32_t blksz; member
71 zp->zs.avail_out = zp->blksz; in g_uzip_zlib_decompress()
97 g_uzip_zlib_ctor(uint32_t blksz) in g_uzip_zlib_ctor() argument
105 zp->blksz = blksz; in g_uzip_zlib_ctor()
106 zp->pub.max_blen = compressBound(blksz); in g_uzip_zlib_ctor()
H A Dg_uzip_lzma.c42 uint32_t blksz; member
77 lzp->b.out_size = lzp->blksz; in g_uzip_lzma_decompress()
98 g_uzip_lzma_ctor(uint32_t blksz) in g_uzip_lzma_ctor() argument
107 lzp->blksz = blksz; in g_uzip_lzma_ctor()
108 lzp->pub.max_blen = LZ4_compressBound(blksz); in g_uzip_lzma_ctor()
H A Dg_uzip.c179 blk = ofs / sc->blksz; in g_uzip_cached()
182 blkofs = ofs % sc->blksz; in g_uzip_cached()
183 usz = sc->blksz - blkofs; in g_uzip_cached()
239 start_blk = ofs / sc->blksz; in g_uzip_request()
241 end_blk = howmany(ofs + bp->bio_resid, sc->blksz); in g_uzip_request()
246 start_blk_ofs = ofs % sc->blksz; in g_uzip_request()
247 zsize = MIN(sc->blksz - start_blk_ofs, bp->bio_resid); in g_uzip_request()
376 firstblk = blk = ofs / sc->blksz; in g_uzip_do()
377 blkofs = ofs % sc->blksz; in g_uzip_do()
387 ulen = MIN(sc->blksz - blkofs, bp2->bio_resid); in g_uzip_do()
[all …]
H A Dg_uzip_zstd.c133 g_uzip_zstd_ctor(uint32_t blksz) in g_uzip_zstd_ctor() argument
146 sc->guz_blksz = blksz; in g_uzip_zstd_ctor()
147 sc->guz_pub.max_blen = ZSTD_compressBound(blksz); in g_uzip_zstd_ctor()
/freebsd/sys/dev/sound/pci/
H A Datiixp.c100 uint32_t blksz, blkcnt; member
467 ch->blksz = sc->bufsz / ch->blkcnt; in atiixp_chan_init()
531 uint32_t blksz, uint32_t blkcnt) in atiixp_chan_setfragments() argument
536 blksz &= ATI_IXP_BLK_ALIGN; in atiixp_chan_setfragments()
538 if (blksz > (sndbuf_getmaxsize(ch->buffer) / ATI_IXP_DMA_CHSEGS_MIN)) in atiixp_chan_setfragments()
539 blksz = sndbuf_getmaxsize(ch->buffer) / ATI_IXP_DMA_CHSEGS_MIN; in atiixp_chan_setfragments()
540 if (blksz < ATI_IXP_BLK_MIN) in atiixp_chan_setfragments()
541 blksz = ATI_IXP_BLK_MIN; in atiixp_chan_setfragments()
547 while ((blksz * blkcnt) > sndbuf_getmaxsize(ch->buffer)) { in atiixp_chan_setfragments()
550 else if ((blksz >> 1) >= ATI_IXP_BLK_MIN) in atiixp_chan_setfragments()
[all …]
H A Dvia8233.c96 unsigned int blksz, blkcnt; member
392 ch->sgd_table[i].ptr = phys_addr + (i * ch->blksz); in via_buildsgdt()
393 ch->sgd_table[i].flags = flag | ch->blksz; in via_buildsgdt()
564 uint32_t blksz, uint32_t blkcnt) in via8233chan_setfragments() argument
569 blksz &= VIA_BLK_ALIGN; in via8233chan_setfragments()
571 if (blksz > (sndbuf_getmaxsize(ch->buffer) / VIA_SEGS_MIN)) in via8233chan_setfragments()
572 blksz = sndbuf_getmaxsize(ch->buffer) / VIA_SEGS_MIN; in via8233chan_setfragments()
573 if (blksz < VIA_BLK_MIN) in via8233chan_setfragments()
574 blksz = VIA_BLK_MIN; in via8233chan_setfragments()
580 while ((blksz * blkcnt) > sndbuf_getmaxsize(ch->buffer)) { in via8233chan_setfragments()
[all …]
H A Dich.c161 uint32_t blksz, blkcnt, spd; member
305 if ((ch->blksz * ch->blkcnt) > sndbuf_getmaxsize(ch->buffer)) in ich_filldtbl()
306 ch->blksz = sndbuf_getmaxsize(ch->buffer) / ch->blkcnt; in ich_filldtbl()
307 if ((sndbuf_getblksz(ch->buffer) != ch->blksz || in ich_filldtbl()
309 sndbuf_resize(ch->buffer, ch->blkcnt, ch->blksz) != 0) in ich_filldtbl()
311 __func__, ch->blksz, ch->blkcnt); in ich_filldtbl()
312 ch->blksz = sndbuf_getblksz(ch->buffer); in ich_filldtbl()
315 ch->dtbl[i].buffer = base + (ch->blksz * (i % ch->blkcnt)); in ich_filldtbl()
317 | (ch->blksz / ch->parent->sample_size); in ich_filldtbl()
386 ch->blksz = sc->bufsz / ch->blkcnt; in ichchan_init()
[all …]
/freebsd/stand/efi/boot1/
H A Dzfs_module.c57 size_t size, remainder, rb_size, blksz; in vdev_read() local
73 blksz = size; in vdev_read()
82 blksz = rb_size - remainder; in vdev_read()
90 if (bytes < blksz) in vdev_read()
91 blksz = bytes; in vdev_read()
93 memcpy(buf, rb_buf + remainder, blksz); in vdev_read()
94 buf = (void *)((uintptr_t)buf + blksz); in vdev_read()
95 bytes -= blksz; in vdev_read()
98 blksz = rb_size; in vdev_read()
/freebsd/usr.sbin/makefs/zfs/
H A Dzap.c358 off_t loc, blksz; in zap_fat_write() local
369 blksz = (off_t)1 << blkshift; in zap_fat_write()
375 ptrcnt = (blksz / 2) / sizeof(uint64_t); in zap_fat_write()
400 leafblks = ecalloc(lblkcnt, blksz); in zap_fat_write()
402 l.l_phys = (zap_leaf_phys_t *)(leafblks + li * blksz); in zap_fat_write()
413 ptrhasht = (uint64_t *)(&zfs->filebuf[0] + blksz / 2); in zap_fat_write()
424 l.l_phys = (zap_leaf_phys_t *)(leafblks + li * blksz); in zap_fat_write()
516 dnode->dn_datablkszsec = blksz >> MINBLOCKSHIFT; in zap_fat_write()
520 (lblkcnt + 1) * blksz, blksz); in zap_fat_write()
522 loc = objset_space_alloc(zfs, zap->os, &blksz); in zap_fat_write()
[all …]
/freebsd/usr.bin/mkuzip/
H A Dmkuzip.c144 cfs.blksz = DEFAULT_CLSTSIZE; in main()
183 cfs.blksz = tmp; in main()
246 if (cfs.blksz % DEV_BSIZE != 0) in main()
249 cfs.cbound_blksz = cfs.handler->f_compress_bound(cfs.blksz); in main()
283 hdr.nblocks = cfs.isize / cfs.blksz; in main()
284 if ((cfs.isize % cfs.blksz) != 0) { in main()
287 "of %d, padding data\n", cfs.blksz); in main()
329 iblk = readblock(cfs.fdr, cfs.blksz); in main()
368 "out len=%lu offset=%lu", io, cfs.blksz, in main()
409 hdr.blksz = htonl(cfs.blksz); in main()
H A Dmkuz_zlib.c42 mkuz_zlib_cbound(size_t blksz) in mkuz_zlib_cbound() argument
44 return (compressBound(blksz)); in mkuz_zlib_cbound()
/freebsd/usr.sbin/makefs/
H A Dzfs.c643 off_t size, off_t blksz) in dnode_cursor_init() argument
649 assert(blksz <= MAXBLOCKSIZE); in dnode_cursor_init()
651 if (blksz == 0) { in dnode_cursor_init()
653 blksz = MIN(MAXBLOCKSIZE, MAX(1 << zfs->ashift, in dnode_cursor_init()
656 assert(powerof2(blksz)); in dnode_cursor_init()
664 ndatablks = size == 0 ? 0 : howmany(size, blksz); in dnode_cursor_init()
674 dnode->dn_datablkszsec = blksz >> MINBLOCKSHIFT; in dnode_cursor_init()
683 c->datablksz = blksz; in dnode_cursor_init()
694 off_t blkid, blksz, loc; in _dnode_cursor_flush() local
699 blksz = MAXBLOCKSIZE; in _dnode_cursor_flush()
[all …]
/freebsd/sys/contrib/openzfs/module/zfs/
H A Dzfs_vnops.c771 uint64_t blksz; in zfs_write() local
780 blksz = 1 << highbit64(zp->z_blksz); in zfs_write()
782 blksz = zfsvfs->z_max_blksz; in zfs_write()
784 blksz = MIN(blksz, P2ROUNDUP(end_size, in zfs_write()
786 blksz = MAX(blksz, zp->z_blksz); in zfs_write()
788 blksz = zp->z_blksz; in zfs_write()
793 if (n >= blksz && woff >= zp->z_size && in zfs_write()
794 P2PHASE(woff, blksz) == 0 && in zfs_write()
796 (blksz >= SPA_OLD_MAXBLOCKSIZE || n < 4 * blksz)) { in zfs_write()
805 blksz); in zfs_write()
[all …]
/freebsd/sys/dev/sdio/
H A Dsdiob.c235 * For b_count == 0, blksz is the len of bytes, otherwise it is the amount of
238 * For byte mode, the maximum of blksz is the functions cur_blksize.
243 bool wr, uint8_t *buffer, bool incaddr, uint32_t b_count, uint16_t blksz) in sdiob_rw_extended_cam() argument
255 ("%s(fn=%d addr=%#0x wr=%d b_count=%u blksz=%u buf=%p incr=%d)\n", in sdiob_rw_extended_cam()
256 __func__, fn, addr, wr, b_count, blksz, buffer, incaddr)); in sdiob_rw_extended_cam()
259 "supported: b_count %u blksz %u, sc %p, fn %u, addr %#10x, %s, " in sdiob_rw_extended_cam()
260 "buffer %p, %s\n", __func__, b_count, blksz, sc, fn, addr, in sdiob_rw_extended_cam()
263 KASSERT((blksz <= sc->cardinfo.f[fn].cur_blksize), ("%s: blksz " in sdiob_rw_extended_cam()
265 "buffer %p, %s, b_count %u\n", __func__, blksz, in sdiob_rw_extended_cam()
[all...]
/freebsd/stand/efi/libefi/
H A Defipart.c1086 size_t blkoff, blksz, bio_size; in efipart_realstrategy() local
1183 blksz = blkio->Media->BlockSize * x - blkoff; in efipart_realstrategy()
1184 if (size < blksz) in efipart_realstrategy()
1185 blksz = size; in efipart_realstrategy()
1192 bcopy(blkbuf + blkoff, buf, blksz); in efipart_realstrategy()
1202 blksz = blkio->Media->BlockSize - blkoff; in efipart_realstrategy()
1203 blksz = min(blksz, size); in efipart_realstrategy()
1212 blksz = size; in efipart_realstrategy()
1217 blksz = blkio->Media->BlockSize * x; in efipart_realstrategy()
1227 bcopy(buf, blkbuf + blkoff, blksz); in efipart_realstrategy()
[all …]

1234