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. */
536 sector_t block, dblock, iblock;
581 /* The first block in the page. */
582 block = (s64)page->index << (PAGE_SHIFT - blocksize_bits);
589 /* The first out of bounds block for the data size. */
592 /* The last (fully or partially) initialized block. */
608 * underlying block device's mapping.
615 if (unlikely(block >= dblock)) {
637 if (unlikely((block >= iblock) &&
645 if (block > iblock) {
698 /* Convert block into corresponding vcn and offset. */
699 vcn = (VCN)block << blocksize_bits;
716 /* Setup buffer head to point to correct block. */
792 } while (block++, (bh = bh->b_this_page) != head);
902 sector_t block, dblock, rec_block;
951 /* The first block in the page. */
952 rec_block = block = (sector_t)page->index <<
955 /* The first out of bounds block for the data size. */
965 if (likely(block < rec_block)) {
966 if (unlikely(block >= dblock)) {
972 * This block is not the first one in the record. We
983 } else /* if (block == rec_block) */ {
984 BUG_ON(block > rec_block);
985 /* This block is the first one in the record. */
988 if (unlikely(block >= dblock)) {
1007 /* Obtain the vcn and offset of the current block. */
1008 vcn = (VCN)block << bh_size_bits;
1025 /* Setup buffer head to correct block. */
1065 (long long)block <<
1095 } while (block++, (bh = bh->b_this_page) != head);
1524 * ntfs_bmap - map logical file block to physical device block
1525 * @mapping: address space mapping to which the block to be mapped belongs
1526 * @block: logical block to map to its physical device block
1529 * the logical @block belonging to the file described by the address space
1530 * mapping @mapping to its physical device block.
1532 * The size of the block is equal to the @s_blocksize field of the super block
1534 * to the cluster size thus the block is guaranteed to fit entirely inside the
1536 * available after the beginning of the block.
1538 * Return the physical device block if the mapping succeeded or 0 if the block
1542 * as that really is in block zero but there is nothing we can do. bmap() is
1546 static sector_t ntfs_bmap(struct address_space *mapping, sector_t block)
1557 ntfs_debug("Entering for mft_no 0x%lx, logical block 0x%llx.",
1558 ni->mft_no, (unsigned long long)block);
1572 ofs = (s64)block << blocksize_bits;
1578 * If the offset is outside the initialized size or the block straddles
1625 * The block is really allocated and fullfils all our criteria.
1626 * Convert the cluster to units of block size and return the result.
1629 if (unlikely(sizeof(block) < sizeof(lcn))) {
1630 block = lcn = ((lcn << cluster_size_shift) + delta) >>
1632 /* If the block number was truncated return 0. */
1633 if (unlikely(block != lcn)) {
1634 ntfs_error(vol->sb, "Physical block 0x%llx is too "
1640 block = ((lcn << cluster_size_shift) + delta) >>
1642 ntfs_debug("Done (returning block 0x%llx).", (unsigned long long)lcn);
1643 return block;