Lines Matching refs:start

205 		struct page *page, u64 start, u32 len)  in btrfs_subpage_assert()  argument
209 ASSERT(IS_ALIGNED(start, fs_info->sectorsize) && in btrfs_subpage_assert()
216 ASSERT(page_offset(page) <= start && in btrfs_subpage_assert()
217 start + len <= page_offset(page) + PAGE_SIZE); in btrfs_subpage_assert()
221 struct page *page, u64 start, u32 len) in btrfs_subpage_start_reader() argument
226 btrfs_subpage_assert(fs_info, page, start, len); in btrfs_subpage_start_reader()
232 struct page *page, u64 start, u32 len) in btrfs_subpage_end_reader() argument
239 btrfs_subpage_assert(fs_info, page, start, len); in btrfs_subpage_end_reader()
255 static void btrfs_subpage_clamp_range(struct page *page, u64 *start, u32 *len) in btrfs_subpage_clamp_range() argument
257 u64 orig_start = *start; in btrfs_subpage_clamp_range()
260 *start = max_t(u64, page_offset(page), orig_start); in btrfs_subpage_clamp_range()
270 orig_start + orig_len) - *start; in btrfs_subpage_clamp_range()
274 struct page *page, u64 start, u32 len) in btrfs_subpage_start_writer() argument
280 btrfs_subpage_assert(fs_info, page, start, len); in btrfs_subpage_start_writer()
288 struct page *page, u64 start, u32 len) in btrfs_subpage_end_and_test_writer() argument
293 btrfs_subpage_assert(fs_info, page, start, len); in btrfs_subpage_end_and_test_writer()
320 struct page *page, u64 start, u32 len) in btrfs_page_start_writer_lock() argument
331 btrfs_subpage_clamp_range(page, &start, &len); in btrfs_page_start_writer_lock()
332 btrfs_subpage_start_writer(fs_info, page, start, len); in btrfs_page_start_writer_lock()
337 struct page *page, u64 start, u32 len) in btrfs_page_end_writer_lock() argument
341 btrfs_subpage_clamp_range(page, &start, &len); in btrfs_page_end_writer_lock()
342 if (btrfs_subpage_end_and_test_writer(fs_info, page, start, len)) in btrfs_page_end_writer_lock()
346 static bool bitmap_test_range_all_set(unsigned long *addr, unsigned int start, in bitmap_test_range_all_set() argument
351 found_zero = find_next_zero_bit(addr, start + nbits, start); in bitmap_test_range_all_set()
352 if (found_zero == start + nbits) in bitmap_test_range_all_set()
357 static bool bitmap_test_range_all_zero(unsigned long *addr, unsigned int start, in bitmap_test_range_all_zero() argument
362 found_set = find_next_bit(addr, start + nbits, start); in bitmap_test_range_all_zero()
363 if (found_set == start + nbits) in bitmap_test_range_all_zero()
368 #define subpage_calc_start_bit(fs_info, page, name, start, len) \ argument
372 btrfs_subpage_assert(fs_info, page, start, len); \
373 start_bit = offset_in_page(start) >> fs_info->sectorsize_bits; \
389 struct page *page, u64 start, u32 len) in btrfs_subpage_set_uptodate() argument
393 uptodate, start, len); in btrfs_subpage_set_uptodate()
404 struct page *page, u64 start, u32 len) in btrfs_subpage_clear_uptodate() argument
408 uptodate, start, len); in btrfs_subpage_clear_uptodate()
418 struct page *page, u64 start, u32 len) in btrfs_subpage_set_error() argument
422 error, start, len); in btrfs_subpage_set_error()
432 struct page *page, u64 start, u32 len) in btrfs_subpage_clear_error() argument
436 error, start, len); in btrfs_subpage_clear_error()
447 struct page *page, u64 start, u32 len) in btrfs_subpage_set_dirty() argument
451 dirty, start, len); in btrfs_subpage_set_dirty()
471 struct page *page, u64 start, u32 len) in btrfs_subpage_clear_and_test_dirty() argument
475 dirty, start, len); in btrfs_subpage_clear_and_test_dirty()
488 struct page *page, u64 start, u32 len) in btrfs_subpage_clear_dirty() argument
492 last = btrfs_subpage_clear_and_test_dirty(fs_info, page, start, len); in btrfs_subpage_clear_dirty()
498 struct page *page, u64 start, u32 len) in btrfs_subpage_set_writeback() argument
502 writeback, start, len); in btrfs_subpage_set_writeback()
512 struct page *page, u64 start, u32 len) in btrfs_subpage_clear_writeback() argument
516 writeback, start, len); in btrfs_subpage_clear_writeback()
529 struct page *page, u64 start, u32 len) in btrfs_subpage_set_ordered() argument
533 ordered, start, len); in btrfs_subpage_set_ordered()
543 struct page *page, u64 start, u32 len) in btrfs_subpage_clear_ordered() argument
547 ordered, start, len); in btrfs_subpage_clear_ordered()
558 struct page *page, u64 start, u32 len) in btrfs_subpage_set_checked() argument
562 checked, start, len); in btrfs_subpage_set_checked()
573 struct page *page, u64 start, u32 len) in btrfs_subpage_clear_checked() argument
577 checked, start, len); in btrfs_subpage_clear_checked()
592 struct page *page, u64 start, u32 len) \
596 name, start, len); \
621 struct page *page, u64 start, u32 len) \
627 btrfs_subpage_set_##name(fs_info, page, start, len); \
630 struct page *page, u64 start, u32 len) \
636 btrfs_subpage_clear_##name(fs_info, page, start, len); \
639 struct page *page, u64 start, u32 len) \
643 return btrfs_subpage_test_##name(fs_info, page, start, len); \
646 struct page *page, u64 start, u32 len) \
652 btrfs_subpage_clamp_range(page, &start, &len); \
653 btrfs_subpage_set_##name(fs_info, page, start, len); \
656 struct page *page, u64 start, u32 len) \
662 btrfs_subpage_clamp_range(page, &start, &len); \
663 btrfs_subpage_clear_##name(fs_info, page, start, len); \
666 struct page *page, u64 start, u32 len) \
670 btrfs_subpage_clamp_range(page, &start, &len); \
671 return btrfs_subpage_test_##name(fs_info, page, start, len); \
720 u64 start, u32 len) in btrfs_page_unlock_writer() argument
744 btrfs_page_end_writer_lock(fs_info, page, start, len); in btrfs_page_unlock_writer()