/linux/fs/nilfs2/ |
H A D | the_nilfs.c | 200 * @blocksize: place to store block size 203 * exponent information written in @sbp and stores it in @blocksize, 209 struct nilfs_super_block *sbp, int *blocksize) in nilfs_get_blocksize() argument 215 nilfs_err(sb, "too large filesystem blocksize: 2 ^ %u KiB", in nilfs_get_blocksize() 219 *blocksize = BLOCK_SIZE << shift_bits; in nilfs_get_blocksize() 262 int blocksize; in load_nilfs() local 283 err = nilfs_get_blocksize(sb, sbp[0], &blocksize); in load_nilfs() 287 if (blocksize != nilfs->ns_blocksize) { in load_nilfs() 289 "blocksize differs between two super blocks (%d != %d)", in load_nilfs() 290 blocksize, nilfs->ns_blocksize); in load_nilfs() [all …]
|
/linux/lib/zstd/compress/ |
H A D | zstd_preSplit.c | 155 static size_t ZSTD_splitBlock_byChunks(const void* blockStart, size_t blockSize, in ZSTD_splitBlock_byChunks() argument 168 assert(blockSize == (128 << 10)); in ZSTD_splitBlock_byChunks() 176 for (pos = CHUNKSIZE; pos <= blockSize - CHUNKSIZE; pos += CHUNKSIZE) { in ZSTD_splitBlock_byChunks() 185 assert(pos == blockSize); in ZSTD_splitBlock_byChunks() 186 return blockSize; in ZSTD_splitBlock_byChunks() 199 static size_t ZSTD_splitBlock_fromBorders(const void* blockStart, size_t blockSize, in ZSTD_splitBlock_fromBorders() argument 205 assert(blockSize == (128 << 10)); in ZSTD_splitBlock_fromBorders() 213 …HIST_add(fpstats->newEvents.events, (const char*)blockStart + blockSize - SEGMENT_SIZE, SEGMENT_SI… in ZSTD_splitBlock_fromBorders() 216 return blockSize; in ZSTD_splitBlock_fromBorders() 218 …HIST_add(middleEvents->events, (const char*)blockStart + blockSize/2 - SEGMENT_SIZE/2, SEGMENT_SIZ… in ZSTD_splitBlock_fromBorders() [all …]
|
H A D | zstd_compress.c | 1633 static size_t ZSTD_maxNbSeq(size_t blockSize, unsigned minMatch, int useSequenceProducer) { in ZSTD_maxNbSeq() argument 1635 return blockSize / divider; in ZSTD_maxNbSeq() 1650 size_t const blockSize = MIN(ZSTD_resolveMaxBlockSize(maxBlockSize), windowSize); in ZSTD_estimateCCtxSize_usingCCtxParams_internal() local 1651 size_t const maxNbSeq = ZSTD_maxNbSeq(blockSize, cParams->minMatch, useSequenceProducer); in ZSTD_estimateCCtxSize_usingCCtxParams_internal() 1652 size_t const tokenSpace = ZSTD_cwksp_alloc_size(WILDCOPY_OVERLENGTH + blockSize) in ZSTD_estimateCCtxSize_usingCCtxParams_internal() 1660 size_t const maxNbLdmSeq = ZSTD_ldm_getMaxNbSeq(*ldmParams, blockSize); in ZSTD_estimateCCtxSize_usingCCtxParams_internal() 1670 size_t const maxNbExternalSeq = ZSTD_sequenceBound(blockSize); in ZSTD_estimateCCtxSize_usingCCtxParams_internal() 1752 …size_t const blockSize = MIN(ZSTD_resolveMaxBlockSize(params->maxBlockSize), (size_t)1 << cParams.… in ZSTD_estimateCStreamSize_usingCCtxParams() local 1754 ? ((size_t)1 << cParams.windowLog) + blockSize in ZSTD_estimateCStreamSize_usingCCtxParams() 1757 ? ZSTD_compressBound(blockSize) + 1 in ZSTD_estimateCStreamSize_usingCCtxParams() [all …]
|
/linux/fs/affs/ |
H A D | super.c | 173 int blocksize; /* Initial device blksize */ member 215 pr_warn("Invalid blocksize (512, 1024, 2048, 4096 allowed)\n"); in affs_parse_param() 218 ctx->blocksize = n; in affs_parse_param() 314 int size, blocksize; in affs_fill_super() local 358 pr_debug("initial blocksize=%d, #blocks=%d\n", 512, size); in affs_fill_super() 365 blocksize = ctx->blocksize; in affs_fill_super() 366 if (blocksize > 0) { in affs_fill_super() 367 i = j = blocksize; in affs_fill_super() 368 size = size / (blocksize / 512); in affs_fill_super() 371 for (blocksize = i; blocksize <= j; blocksize <<= 1, size >>= 1) { in affs_fill_super() [all …]
|
/linux/drivers/mtd/parsers/ |
H A D | bcm47xxpart.c | 95 uint32_t blocksize = master->erasesize; in bcm47xxpart_parse() local 105 if (blocksize < 0x1000) in bcm47xxpart_parse() 106 blocksize = 0x1000; in bcm47xxpart_parse() 121 for (offset = 0; offset <= master->size - blocksize; in bcm47xxpart_parse() 122 offset += blocksize) { in bcm47xxpart_parse() 206 trx_size = max(trx->length, last_subpart + blocksize); in bcm47xxpart_parse() 212 offset += roundup(trx_size, blocksize) - blocksize; in bcm47xxpart_parse() 228 if (offset != master->size - blocksize && in bcm47xxpart_parse() 236 err = mtd_read(master, offset + (blocksize / 2), 0x4, &bytes_read, in bcm47xxpart_parse() 240 offset + (blocksize / 2), err); in bcm47xxpart_parse() [all …]
|
/linux/fs/btrfs/ |
H A D | fs.c | 73 bool __attribute_const__ btrfs_supported_blocksize(u32 blocksize) in btrfs_supported_blocksize() argument 75 /* @blocksize should be validated first. */ in btrfs_supported_blocksize() 76 ASSERT(is_power_of_2(blocksize) && blocksize >= BTRFS_MIN_BLOCKSIZE && in btrfs_supported_blocksize() 77 blocksize <= BTRFS_MAX_BLOCKSIZE); in btrfs_supported_blocksize() 79 if (blocksize == PAGE_SIZE || blocksize == SZ_4K || blocksize == BTRFS_MIN_BLOCKSIZE) in btrfs_supported_blocksize() 98 if (IS_ENABLED(CONFIG_HIGHMEM) && blocksize > PAGE_SIZE) in btrfs_supported_blocksize()
|
H A D | misc.h | 39 * @blocksize: The blocksize to iterate. 43 #define btrfs_bio_for_each_block(paddr, bio, iter, blocksize) \ argument 46 bio_advance_iter_single((bio), (iter), (blocksize))) 66 #define btrfs_bio_for_each_block_all(paddr, bio, blocksize) \ argument 70 bio_advance_iter_single((bio), &(iter), (blocksize)))
|
/linux/drivers/gpu/drm/vmwgfx/ |
H A D | vmw_surface_cache.h | 81 desc->blockSize.width); in vmw_surface_get_size_in_blocks() 83 desc->blockSize.height); in vmw_surface_get_size_in_blocks() 85 desc->blockSize.depth); in vmw_surface_get_size_in_blocks() 203 const u32 bw = desc->blockSize.width, bh = desc->blockSize.height; in vmw_surface_get_pixel_offset() 204 const u32 bd = desc->blockSize.depth; in vmw_surface_get_pixel_offset() 406 desc->blockSize.width) * in vmw_surface_setup_cache() 413 desc->blockSize.height) * in vmw_surface_setup_cache() 462 loc->z *= desc->blockSize.depth; in vmw_surface_get_loc() 465 loc->y *= desc->blockSize.height; in vmw_surface_get_loc() 467 loc->x *= desc->blockSize.width; in vmw_surface_get_loc() [all …]
|
/linux/sound/pci/emu10k1/ |
H A D | emu10k1_patch.c | 33 int truesize, size, blocksize; in snd_emu10k1_sample_new() local 99 blocksize = truesize << shift; in snd_emu10k1_sample_new() 100 sp->block = snd_emu10k1_synth_alloc(emu, blocksize); in snd_emu10k1_sample_new() 103 "synth malloc failed (size=%d)\n", blocksize); in snd_emu10k1_sample_new() 108 sp->v.truesize = blocksize; in snd_emu10k1_sample_new() 140 if (offset < blocksize) in snd_emu10k1_sample_new() 141 snd_emu10k1_synth_memset(emu, sp->block, offset, blocksize - offset, fill); in snd_emu10k1_sample_new()
|
/linux/fs/ocfs2/ |
H A D | ocfs2_fs.h | 28 * blocksize of 2K, it is 4096 bytes into disk. 40 * Blocks cannot be bigger than clusters, so the maximum blocksize is the 412 on the blocksize. OCFS2's maximum 413 blocksize, 4K, requires 16 parity bits, 533 * 255 * sizeof(__le16) == 512B, within the 512B block minimum blocksize. 599 __le32 s_blocksize_bits; /* Blocksize for this fs */ 624 * our smallest blocksize, which is 512 bytes. To ensure this, 626 * will not be available on the smallest blocksize. 1230 static inline struct ocfs2_disk_dqtrailer *ocfs2_block_dqtrailer(int blocksize, in ocfs2_block_dqtrailer() argument 1234 ptr += blocksize - OCFS2_QBLK_RESERVED_SPACE; in ocfs2_block_dqtrailer() [all …]
|
H A D | blockcheck.c | 144 u32 ocfs2_hamming_encode_block(void *data, unsigned int blocksize) in ocfs2_hamming_encode_block() argument 146 return ocfs2_hamming_encode(0, data, blocksize * 8, 0); in ocfs2_hamming_encode_block() 212 void ocfs2_hamming_fix_block(void *data, unsigned int blocksize, in ocfs2_hamming_fix_block() argument 215 ocfs2_hamming_fix(data, blocksize * 8, 0, fix); in ocfs2_hamming_fix_block() 349 void ocfs2_block_check_compute(void *data, size_t blocksize, in ocfs2_block_check_compute() argument 357 crc = crc32_le(~0, data, blocksize); in ocfs2_block_check_compute() 358 ecc = ocfs2_hamming_encode_block(data, blocksize); in ocfs2_block_check_compute() 378 int ocfs2_block_check_validate(void *data, size_t blocksize, in ocfs2_block_check_validate() argument 395 crc = crc32_le(~0, data, blocksize); in ocfs2_block_check_validate() 405 ecc = ocfs2_hamming_encode_block(data, blocksize); in ocfs2_block_check_validate() [all …]
|
H A D | blockcheck.h | 42 void ocfs2_block_check_compute(void *data, size_t blocksize, 44 int ocfs2_block_check_validate(void *data, size_t blocksize, 91 extern u32 ocfs2_hamming_encode_block(void *data, unsigned int blocksize); 92 extern void ocfs2_hamming_fix_block(void *data, unsigned int blocksize,
|
/linux/net/sunrpc/auth_gss/ |
H A D | gss_krb5_keys.c | 154 size_t blocksize, keybytes, keylength, n; in krb5_DK() local 169 blocksize = crypto_sync_skcipher_blocksize(cipher); in krb5_DK() 174 inblockdata = kmalloc(blocksize, gfp_mask); in krb5_DK() 178 outblockdata = kmalloc(blocksize, gfp_mask); in krb5_DK() 183 inblock.len = blocksize; in krb5_DK() 186 outblock.len = blocksize; in krb5_DK() 376 unsigned int blocksize, offset; in krb5_kdf_feedback_cmac() local 395 blocksize = crypto_shash_digestsize(tfm); in krb5_kdf_feedback_cmac() 396 n = (outkey->len + blocksize - 1) / blocksize; in krb5_kdf_feedback_cmac() 400 step.len = blocksize; in krb5_kdf_feedback_cmac() [all …]
|
/linux/drivers/ssb/ |
H A D | driver_chipcommon_sflash.c | 28 u32 blocksize; member 149 sflash->blocksize = e->blocksize; in ssb_sflash_init() 151 sflash->size = sflash->blocksize * sflash->numblocks; in ssb_sflash_init() 154 pr_info("Found %s serial flash (size: %dKiB, blocksize: 0x%X, blocks: %d)\n", in ssb_sflash_init() 155 e->name, sflash->size / 1024, e->blocksize, e->numblocks); in ssb_sflash_init()
|
/linux/drivers/bcma/ |
H A D | driver_chipcommon_sflash.c | 29 u32 blocksize; member 149 sflash->blocksize = e->blocksize; in bcma_sflash_init() 151 sflash->size = sflash->blocksize * sflash->numblocks; in bcma_sflash_init() 154 bcma_info(bus, "Found %s serial flash (size: %dKiB, blocksize: 0x%X, blocks: %d)\n", in bcma_sflash_init() 155 e->name, sflash->size / 1024, sflash->blocksize, in bcma_sflash_init()
|
/linux/fs/ext4/ |
H A D | namei.c | 302 unsigned int blocksize) in ext4_initialize_dirent_tail() argument 304 struct ext4_dir_entry_tail *t = EXT4_DIRENT_TAIL(bh->b_data, blocksize); in ext4_initialize_dirent_tail() 308 sizeof(struct ext4_dir_entry_tail), blocksize); in ext4_initialize_dirent_tail() 317 int blocksize = EXT4_BLOCK_SIZE(inode->i_sb); in get_dirent_tail() local 324 (blocksize - sizeof(struct ext4_dir_entry_tail))); in get_dirent_tail() 325 while (d < top && ext4_rec_len_from_disk(d->rec_len, blocksize)) in get_dirent_tail() 327 ext4_rec_len_from_disk(d->rec_len, blocksize)); in get_dirent_tail() 338 (ext4_rec_len_from_disk(t->det_rec_len, blocksize) != in get_dirent_tail() 419 int blocksize = EXT4_BLOCK_SIZE(inode->i_sb); in get_dx_countlimit() local 420 unsigned int rlen = ext4_rec_len_from_disk(dirent->rec_len, blocksize); in get_dx_countlimit() [all …]
|
H A D | move_extent.c | 173 unsigned int blocksize, block_start, block_end; in mext_page_mkuptodate() local 183 blocksize = i_blocksize(inode); in mext_page_mkuptodate() 186 head = create_empty_buffers(folio, blocksize, 0); in mext_page_mkuptodate() 193 block_end = block_start + blocksize; in mext_page_mkuptodate() 206 folio_zero_range(folio, block_start, blocksize); in mext_page_mkuptodate() 226 if (bh_offset(bh) + blocksize <= from) in mext_page_mkuptodate() 268 unsigned long blocksize = orig_inode->i_sb->s_blocksize; in move_extent_per_page() local 301 tmp_data_size = orig_inode->i_size & (blocksize - 1); in move_extent_per_page() 304 * blocksize. So we set appropriate value. in move_extent_per_page() 307 tmp_data_size = blocksize; in move_extent_per_page() [all …]
|
/linux/fs/ |
H A D | buffer.c | 240 "device %pg blocksize: %d\n", in __find_get_block_slow() 666 sector_t bblock, unsigned blocksize) in write_boundary_block() argument 670 bh = __find_get_block_nonatomic(bdev, bblock + 1, blocksize); in write_boundary_block() 1686 unsigned long blocksize, unsigned long b_state) in create_empty_buffers() argument 1691 head = folio_alloc_buffers(folio, blocksize, gfp); in create_empty_buffers() 1843 size_t blocksize; in __block_write_full_folio() local 1861 blocksize = bh->b_size; in __block_write_full_folio() 1863 block = div_u64(folio_pos(folio), blocksize); in __block_write_full_folio() 1864 last_block = div_u64(i_size_read(inode) - 1, blocksize); in __block_write_full_folio() 1884 WARN_ON(bh->b_size != blocksize); in __block_write_full_folio() [all …]
|
/linux/fs/befs/ |
H A D | super.c | 71 * Check blocksize of BEFS. in befs_check_sb() 73 * Blocksize of BEFS is 1024, 2048, 4096 or 8192. in befs_check_sb() 80 befs_error(sb, "invalid blocksize: %u", befs_sb->block_size); in befs_check_sb() 85 befs_error(sb, "blocksize(%u) cannot be larger " in befs_check_sb()
|
/linux/fs/ext2/ |
H A D | super.c | 890 int blocksize = BLOCK_SIZE; in ext2_fill_super() local 915 * See what the current blocksize for the device is, and in ext2_fill_super() 916 * use that as the blocksize. Otherwise (or if the blocksize in ext2_fill_super() 921 blocksize = sb_min_blocksize(sb, BLOCK_SIZE); in ext2_fill_super() 922 if (!blocksize) { in ext2_fill_super() 923 ext2_msg(sb, KERN_ERR, "error: unable to set blocksize"); in ext2_fill_super() 931 if (blocksize != BLOCK_SIZE) { in ext2_fill_super() 932 logic_sb_block = (sb_block*BLOCK_SIZE) / blocksize; in ext2_fill_super() 933 offset = (sb_block*BLOCK_SIZE) % blocksize; in ext2_fill_super() 992 blocksize = BLOCK_SIZE << le32_to_cpu(sbi->s_es->s_log_block_size); in ext2_fill_super() [all …]
|
/linux/drivers/crypto/caam/ |
H A D | caamhash.c | 429 int blocksize = crypto_tfm_alg_blocksize(&ahash->base); in ahash_setkey() local 437 if (keylen > blocksize) { in ahash_setkey() 829 int blocksize = crypto_ahash_blocksize(ahash); in ahash_update_ctx() local 836 *next_buflen = in_len & (blocksize - 1); in ahash_update_ctx() 844 is_cmac_aes(ctx->adata.algtype)) && to_hash >= blocksize && in ahash_update_ctx() 846 *next_buflen = blocksize; in ahash_update_ctx() 847 to_hash -= blocksize; in ahash_update_ctx() 1205 int blocksize = crypto_ahash_blocksize(ahash); in ahash_update_no_ctx() local 1212 *next_buflen = in_len & (blocksize - 1); in ahash_update_no_ctx() 1220 is_cmac_aes(ctx->adata.algtype)) && to_hash >= blocksize && in ahash_update_no_ctx() [all …]
|
/linux/drivers/mtd/devices/ |
H A D | bcm47xxsflash.c | 81 if (b47s->blocksize < (64 * 1024)) in bcm47xxsflash_erase() 177 u32 mask = b47s->blocksize - 1; in bcm47xxsflash_write_at() 183 if (byte || (len < b47s->blocksize)) { in bcm47xxsflash_write_at() 199 if (byte == b47s->blocksize) in bcm47xxsflash_write_at() 261 mtd->erasesize = b47s->blocksize; in bcm47xxsflash_fill_mtd() 340 b47s->blocksize = sflash->blocksize; in bcm47xxsflash_bcma_probe()
|
/linux/drivers/scsi/mpt3sas/ |
H A D | mpt3sas_warpdrive.c | 200 le16_to_cpu(vol_pg0->BlockSize)) / 1024, in mpt3sas_init_warpdrive_properties() 201 le16_to_cpu(vol_pg0->BlockSize)); in mpt3sas_init_warpdrive_properties() 211 le16_to_cpu(vol_pg0->BlockSize)) / 1024); in mpt3sas_init_warpdrive_properties() 215 block_sz = le16_to_cpu(vol_pg0->BlockSize); in mpt3sas_init_warpdrive_properties() 219 raid_device->handle, le16_to_cpu(vol_pg0->BlockSize)); in mpt3sas_init_warpdrive_properties() 233 raid_device->block_sz = le16_to_cpu(vol_pg0->BlockSize); in mpt3sas_init_warpdrive_properties()
|
/linux/fs/adfs/ |
H A D | super.c | 262 unsigned int blocksize = BLOCK_SIZE; in adfs_probe() local 267 if (sb->s_blocksize != blocksize && in adfs_probe() 268 !sb_set_blocksize(sb, blocksize)) { in adfs_probe() 271 "error: unsupported blocksize"); in adfs_probe() 292 blocksize = 1 << dr->log2secsize; in adfs_probe() 293 if (sb->s_blocksize == blocksize) { in adfs_probe()
|
/linux/fs/isofs/ |
H A D | inode.c | 160 unsigned int blocksize; member 430 popt->blocksize = n; in isofs_parse_param() 462 seq_printf(m, ",blocksize=%lu", root->d_sb->s_blocksize); in isofs_show_options() 598 * First of all, get the hardware blocksize for this device. in isofs_fill_super() 599 * If we don't know what it is, or the hardware blocksize is in isofs_fill_super() 600 * larger than the blocksize the user specified, then use in isofs_fill_super() 612 opt->blocksize = sb_min_blocksize(s, opt->blocksize); in isofs_fill_super() 737 if (orig_zonesize < opt->blocksize) in isofs_fill_super() 780 * we may need to change the device blocksize, and would in isofs_fill_super() 794 * to change the device blocksize, so release the buffer now. in isofs_fill_super() [all …]
|