Lines Matching refs:bit

506  * ntfs_ffz - Find the first unset (zero) bit in a word
550 s64 pass_end, ll, data_pos, pass_start, ofs, bit;
616 /* If we read at least one byte, search @buf for a zero bit. */
619 bit = data_pos & 7;
622 "data_pos 0x%llx, bit 0x%llx, "
624 (long long)data_pos, (long long)bit,
626 for (; bit < size && data_pos + bit < pass_end;
627 bit &= ~7ull, bit += 8) {
633 if (ntfs_is_mft(base_ni) && bit > 400)
636 byte = buf + (bit >> 3);
642 if (b < 8 && b >= (bit & 7)) {
644 ret = data_pos + (bit & ~7ull) + b;
649 "data_pos 0x%llx, bit 0x%llx, "
651 (long long)data_pos, (long long)bit,
656 * continue searching the mft bitmap for a zero bit.
1428 s64 ll, bit;
1484 bit = FILE_mft_data;
1486 bit = ntfs_mft_bitmap_find_free_rec(vol, base_ni);
1487 if (bit >= 0)
1499 if (ntfs_bitmap_set_bit(mftbmp_na, bit)) {
1500 ntfs_log_error("Failed to allocate bit in mft bitmap #2\n");
1504 ll = (bit + 1) << vol->mft_record_size_bits;
1518 if (ntfs_mft_record_read(vol, bit, m)) {
1527 "$MFT bitmap. Fixed.\n", (long long)bit);
1543 if (ntfs_mft_record_layout(vol, bit, m)) {
1562 ni->mft_no = bit;
1607 vol->mft_data_pos = bit + 1;
1610 base_ni ? "extent " : "", (long long)bit);
1617 if (ntfs_bitmap_clear_bit(mftbmp_na, bit))
1618 ntfs_log_error("Failed to clear bit in mft bitmap.%s\n", es);
1645 * To find a free mft record, we scan the mft bitmap for a zero bit. To
1687 * - set the bit corresponding to the mft record being allocated in the
1713 s64 ll, bit;
1741 bit = ntfs_mft_bitmap_find_free_rec(vol, base_ni);
1742 if (bit >= 0) {
1744 (long long)bit);
1760 bit = ll;
1761 if (bit < RESERVED_MFT_RECORDS)
1762 bit = RESERVED_MFT_RECORDS;
1764 (long long)bit);
1801 bit = mftbmp_na->initialized_size << 3;
1810 ntfs_log_debug("found free record (#3) at %lld\n", (long long)bit);
1812 /* @bit is the found free mft record, allocate it in the mft bitmap. */
1813 if (ntfs_bitmap_set_bit(mftbmp_na, bit)) {
1814 ntfs_log_error("Failed to allocate bit in mft bitmap.\n");
1819 ll = (bit + 1) << vol->mft_record_size_bits;
1841 if (ntfs_mft_record_read(vol, bit, m)) {
1853 "$MFT bitmap. Fixed.\n", (long long)bit);
1868 if (ntfs_mft_record_layout(vol, bit, m)) {
1887 ni->mft_no = bit;
1933 vol->mft_data_pos = bit + 1;
1936 base_ni ? "extent " : "", (long long)bit);
1944 if (ntfs_bitmap_clear_bit(mftbmp_na, bit))
1945 ntfs_log_error("Failed to clear bit in mft bitmap.%s\n", es);
2001 /* Clear the bit in the $MFT/$BITMAP corresponding to this record. */