Lines Matching defs:block
30 /* Compression sub-block constants. */
36 * The maximum compression block size is by definition 16 * the cluster
115 * ntfs_decompress - decompress a compression block into an array of pages
124 * @cb_start: compression block to decompress (IN)
125 * @cb_size: size of compression block @cb_start in bytes (IN)
132 * This decompresses the compression block @cb_start into the array of
139 * @cb_start is a pointer to the compression block which needs decompressing
144 * completed during the decompression of the compression block (@cb_start).
150 * the compression block @cb_start as it is a per-CPU buffer.
159 * Pointers into the compressed data, i.e. the compression block (cb),
170 u8 *dp_sb_start; /* Start of current sub-block in dp. */
173 u16 do_sb_start; /* @dest_ofs when starting this sub-block. */
187 ntfs_debug("Beginning sub-block at offset = 0x%zx in the cb.",
190 * Have we reached the end of the compression block or the end of the
192 * position in the compression block is one byte before its end so the
231 /* Setup offsets for the current sub-block destination. */
243 /* Setup the current sub-block source pointers and validate range. */
253 /* No page present. Skip decompression of this sub-block. */
256 /* Advance destination position to next sub-block. */
266 /* Now, we are ready to process the current sub-block (sb). */
268 ntfs_debug("Found uncompressed sub-block.");
278 /* Copy the block and advance the source position. */
282 /* Advance destination position to next sub-block. */
296 ntfs_debug("Found compressed sub-block.");
303 /* Forward to the first tag in the sub-block. */
307 /* Check if the decompressed sub-block was not full-length. */
311 ntfs_debug("Filling incomplete sub-block with "
317 /* We have finished the current sub-block. */
428 * ntfs_read_compressed_block - read a compressed block into the page cache
429 * @page: locked page in the compression block(s) we need to read
434 * 1. Determine which compression block(s) @page is in.
435 * 2. Get hold of all pages corresponding to this/these compression block(s).
436 * 3. Read the (first) compression block.
439 * block or return success if no more compression blocks left.
501 int block, max_block, cb_max_page, bhs_size, nr_bhs, err = 0;
585 * Now read the first compression block.
634 block = lcn << vol->cluster_size_bits >> block_size_bits;
636 max_block = block + (vol->cluster_size >> block_size_bits);
638 ntfs_debug("block = 0x%x.", block);
639 if (unlikely(!(bhs[nr_bhs] = sb_getblk(sb, block))))
642 } while (++block < max_block);
719 ntfs_debug("Successfully read the compression block.");
726 /* Catch end of file inside a compression block. */
732 ntfs_debug("Found sparse compression block.");
779 ntfs_debug("Found uncompressed compression block.");
844 ntfs_debug("Found compressed compression block.");
856 "this compression block.",
922 "compression block.");
928 "compression block.");
933 ntfs_error(vol->sb, "getblk() failed. Cannot read compression block.");