Lines Matching defs:block

91 		ntfs_error(ni->vol->sb, "Buffer I/O error, logical block "
237 /* Is the block within the allowed limits? */
260 /* Setup buffer head to correct block. */
269 /* Fully non-initialized data block, zero it. */
537 sector_t block, dblock, iblock;
582 /* The first block in the page. */
583 block = (s64)page->index << (PAGE_SHIFT - blocksize_bits);
590 /* The first out of bounds block for the data size. */
593 /* The last (fully or partially) initialized block. */
609 * underlying block device's mapping.
616 if (unlikely(block >= dblock)) {
638 if (unlikely((block >= iblock) &&
647 if (block > iblock) {
700 /* Convert block into corresponding vcn and offset. */
701 vcn = (VCN)block << blocksize_bits;
718 /* Setup buffer head to point to correct block. */
794 } while (block++, (bh = bh->b_this_page) != head);
904 sector_t block, dblock, rec_block;
953 /* The first block in the page. */
954 rec_block = block = (sector_t)page->index <<
957 /* The first out of bounds block for the data size. */
967 if (likely(block < rec_block)) {
968 if (unlikely(block >= dblock)) {
974 * This block is not the first one in the record. We
985 } else /* if (block == rec_block) */ {
986 BUG_ON(block > rec_block);
987 /* This block is the first one in the record. */
990 if (unlikely(block >= dblock)) {
1009 /* Obtain the vcn and offset of the current block. */
1010 vcn = (VCN)block << bh_size_bits;
1027 /* Setup buffer head to correct block. */
1067 (long long)block <<
1097 } while (block++, (bh = bh->b_this_page) != head);
1527 * ntfs_bmap - map logical file block to physical device block
1528 * @mapping: address space mapping to which the block to be mapped belongs
1529 * @block: logical block to map to its physical device block
1532 * the logical @block belonging to the file described by the address space
1533 * mapping @mapping to its physical device block.
1535 * The size of the block is equal to the @s_blocksize field of the super block
1537 * to the cluster size thus the block is guaranteed to fit entirely inside the
1539 * available after the beginning of the block.
1541 * Return the physical device block if the mapping succeeded or 0 if the block
1545 * as that really is in block zero but there is nothing we can do. bmap() is
1549 static sector_t ntfs_bmap(struct address_space *mapping, sector_t block)
1560 ntfs_debug("Entering for mft_no 0x%lx, logical block 0x%llx.",
1561 ni->mft_no, (unsigned long long)block);
1575 ofs = (s64)block << blocksize_bits;
1581 * If the offset is outside the initialized size or the block straddles
1628 * The block is really allocated and fullfils all our criteria.
1629 * Convert the cluster to units of block size and return the result.
1632 if (unlikely(sizeof(block) < sizeof(lcn))) {
1633 block = lcn = ((lcn << cluster_size_shift) + delta) >>
1635 /* If the block number was truncated return 0. */
1636 if (unlikely(block != lcn)) {
1637 ntfs_error(vol->sb, "Physical block 0x%llx is too "
1643 block = ((lcn << cluster_size_shift) + delta) >>
1645 ntfs_debug("Done (returning block 0x%llx).", (unsigned long long)lcn);
1646 return block;