search for: found_bit

Displaying 3 results from an estimated 3 matches for "found_bit".

2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 01/13] HV VM Fix map area for HV.
...pgprot_val(*prot) = pte & 0xfff; + + offset = (unsigned long)addr; + offset &= mask; + + vaddr += offset; + /* Potentially clear the nx bit */ + vaddr &= ~(1UL << 63); + + return vaddr; +} + +static unsigned long alloc_hv_pages(int pages) +{ + unsigned int bit = 0; + unsigned int found_bit; + int i; + + /* FIXME : ADD LOCKING!!! */ + + /* + * Scan the available bitmask for free pages. + * 0 - available : 1 - used + */ + do { + bit = find_next_zero_bit(hvvm_avail_pages, NR_HV_PAGES, bit); + if (bit >= NR_HV_PAGES) + return 0; + + found_bit = bit; + + for (i=1; i < pages...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 01/13] HV VM Fix map area for HV.
...pgprot_val(*prot) = pte & 0xfff; + + offset = (unsigned long)addr; + offset &= mask; + + vaddr += offset; + /* Potentially clear the nx bit */ + vaddr &= ~(1UL << 63); + + return vaddr; +} + +static unsigned long alloc_hv_pages(int pages) +{ + unsigned int bit = 0; + unsigned int found_bit; + int i; + + /* FIXME : ADD LOCKING!!! */ + + /* + * Scan the available bitmask for free pages. + * 0 - available : 1 - used + */ + do { + bit = find_next_zero_bit(hvvm_avail_pages, NR_HV_PAGES, bit); + if (bit >= NR_HV_PAGES) + return 0; + + found_bit = bit; + + for (i=1; i < pages...
2013 Apr 03
0
[PATCH] Btrfs-progs: add a free space cache checker to fsck
...index, (info->bitmap != NULL)); + if (ret) + return ret; + + ctl->free_space += info->bytes; + ctl->free_extents++; + return ret; +} + +static int search_bitmap(struct btrfs_free_space_ctl *ctl, + struct btrfs_free_space *bitmap_info, u64 *offset, + u64 *bytes) +{ + unsigned long found_bits = 0; + unsigned long bits, i; + unsigned long next_zero; + + i = offset_to_bit(bitmap_info->offset, ctl->unit, + max_t(u64, *offset, bitmap_info->offset)); + bits = bytes_to_bits(*bytes, ctl->unit); + + for_each_set_bit_from(i, bitmap_info->bitmap, BITS_PER_BITMAP) { + next_zer...