Lines Matching full:logical

70 	u64			logical;  member
90 u64 logical; member
199 u64 logical; member
205 u64 logical; member
238 static int scrub_pages(struct scrub_ctx *sctx, u64 logical, u64 len,
335 if (fstripe_logical < entry->logical) { in insert_full_stripe_lock()
337 } else if (fstripe_logical > entry->logical) { in insert_full_stripe_lock()
351 ret->logical = fstripe_logical; in insert_full_stripe_lock()
378 if (fstripe_logical < entry->logical) in search_full_stripe_lock()
380 else if (fstripe_logical > entry->logical) in search_full_stripe_lock()
389 * Helper to get full stripe logical from a normal bytenr.
508 fstripe_lock->logical); in unlock_full_stripe()
704 "%s at logical %llu on dev %s, physical %llu, root %llu, inode %llu, offset %llu, length %llu, link… in scrub_print_warning_inode()
705 swarn->errstr, swarn->logical, in scrub_print_warning_inode()
718 …"%s at logical %llu on dev %s, physical %llu, root %llu, inode %llu, offset %llu: path resolving f… in scrub_print_warning_inode()
719 swarn->errstr, swarn->logical, in scrub_print_warning_inode()
754 swarn.logical = sblock->pagev[0]->logical; in scrub_print_warning()
758 ret = extent_from_logical(fs_info, swarn.logical, path, &found_key, in scrub_print_warning()
763 extent_item_pos = swarn.logical - found_key.objectid; in scrub_print_warning()
776 "%s at logical %llu on dev %s, physical %llu: metadata %s (level %d) in tree %llu", in scrub_print_warning()
777 errstr, swarn.logical, in scrub_print_warning()
826 u64 logical; in scrub_handle_errored_block() local
854 logical = sblock_to_check->pagev[0]->logical; in scrub_handle_errored_block()
879 ret = lock_full_stripe(fs_info, logical, &full_stripe_locked); in scrub_handle_errored_block()
932 /* setup the context, map the logical blocks and alloc the pages */ in scrub_handle_errored_block()
1181 "fixed up error at logical %llu on dev %s", in scrub_handle_errored_block()
1182 logical, rcu_str_deref(dev->name)); in scrub_handle_errored_block()
1190 "unable to fixup (regular) error at logical %llu on dev %s", in scrub_handle_errored_block()
1191 logical, rcu_str_deref(dev->name)); in scrub_handle_errored_block()
1218 ret = unlock_full_stripe(fs_info, logical, full_stripe_locked); in scrub_handle_errored_block()
1235 static inline void scrub_stripe_index_and_offset(u64 logical, u64 map_type, in scrub_stripe_index_and_offset() argument
1251 if (logical >= raid_map[i] && in scrub_stripe_index_and_offset()
1252 logical < raid_map[i] + mapped_length) in scrub_stripe_index_and_offset()
1257 *stripe_offset = logical - raid_map[i]; in scrub_stripe_index_and_offset()
1271 u64 logical = original_sblock->pagev[0]->logical; in scrub_setup_recheck_block() local
1303 logical, &mapped_length, &bbio); in scrub_setup_recheck_block()
1347 page->logical = logical; in scrub_setup_recheck_block()
1354 scrub_stripe_index_and_offset(logical, in scrub_setup_recheck_block()
1383 logical += sublen; in scrub_setup_recheck_block()
1403 bio->bi_iter.bi_sector = page->logical >> 9; in scrub_submit_raid56_bio_wait()
1648 sbio->logical = spage->logical; in scrub_add_page_to_wr_bio()
1664 sbio->logical + sbio->page_count * PAGE_SIZE != in scrub_add_page_to_wr_bio()
1665 spage->logical) { in scrub_add_page_to_wr_bio()
1833 if (spage->logical != btrfs_stack_header_bytenr(h)) in scrub_checksum_tree_block()
1882 if (spage->logical != btrfs_super_bytenr(s)) in scrub_checksum_super()
1994 sbio->logical = spage->logical; in scrub_add_page_to_rd_bio()
2010 sbio->logical + sbio->page_count * PAGE_SIZE != in scrub_add_page_to_rd_bio()
2011 spage->logical || in scrub_add_page_to_rd_bio()
2056 u64 logical; in scrub_missing_raid56_worker() local
2059 logical = sblock->pagev[0]->logical; in scrub_missing_raid56_worker()
2070 "IO error rebuilding logical %llu for dev %s", in scrub_missing_raid56_worker()
2071 logical, rcu_str_deref(dev->name)); in scrub_missing_raid56_worker()
2077 "failed to rebuild valid logical %llu for dev %s", in scrub_missing_raid56_worker()
2078 logical, rcu_str_deref(dev->name)); in scrub_missing_raid56_worker()
2098 u64 logical = sblock->pagev[0]->logical; in scrub_missing_raid56_pages() local
2106 ret = btrfs_map_sblock(fs_info, BTRFS_MAP_GET_READ_MIRRORS, logical, in scrub_missing_raid56_pages()
2123 bio->bi_iter.bi_sector = logical >> 9; in scrub_missing_raid56_pages()
2134 raid56_add_scrub_pages(rbio, spage->page, spage->logical); in scrub_missing_raid56_pages()
2153 static int scrub_pages(struct scrub_ctx *sctx, u64 logical, u64 len, in scrub_pages() argument
2195 spage->logical = logical; in scrub_pages()
2210 logical += l; in scrub_pages()
2358 u64 start = sblock->pagev[0]->logical; in scrub_block_complete()
2359 u64 end = sblock->pagev[sblock->page_count - 1]->logical + in scrub_block_complete()
2367 static int scrub_find_csum(struct scrub_ctx *sctx, u64 logical, u8 *csum) in scrub_find_csum() argument
2376 if (sum->bytenr > logical) in scrub_find_csum()
2378 if (sum->bytenr + sum->len > logical) in scrub_find_csum()
2389 index = div_u64(logical - sum->bytenr, sctx->fs_info->sectorsize); in scrub_find_csum()
2403 u64 logical, u64 len, in scrub_extent() argument
2440 have_csum = scrub_find_csum(sctx, logical, csum); in scrub_extent()
2444 ret = scrub_pages(sctx, logical, l, physical, dev, flags, gen, in scrub_extent()
2450 logical += l; in scrub_extent()
2458 u64 logical, u64 len, in scrub_pages_for_parity() argument
2506 spage->logical = logical; in scrub_pages_for_parity()
2520 logical += l; in scrub_pages_for_parity()
2542 u64 logical, u64 len, in scrub_extent_for_parity() argument
2552 scrub_parity_mark_sectors_error(sparity, logical, len); in scrub_extent_for_parity()
2571 have_csum = scrub_find_csum(sctx, logical, csum); in scrub_extent_for_parity()
2575 ret = scrub_pages_for_parity(sparity, logical, l, physical, dev, in scrub_extent_for_parity()
2582 logical += l; in scrub_extent_for_parity()
2590 * logical offset. if this is a parity stripe, it will return
2591 * the most left data stripe's logical offset.
2875 "scrub: tree block %llu spanning stripes, ignored. logical=%llu", in scrub_raid56_parity()
2993 u64 logical; in scrub_stripe() local
3065 logical = base + offset; in scrub_stripe()
3072 logic_end = logical + increment * nstripes; in scrub_stripe()
3079 key.objectid = logical; in scrub_stripe()
3089 key.offset = logical; in scrub_stripe()
3138 &logical, in scrub_stripe()
3140 logical += base; in scrub_stripe()
3158 key.objectid = logical; in scrub_stripe()
3207 if (key.objectid + bytes <= logical) in scrub_stripe()
3210 if (key.objectid >= logical + map->stripe_len) { in scrub_stripe()
3237 (key.objectid < logical || in scrub_stripe()
3239 logical + map->stripe_len)) { in scrub_stripe()
3241 "scrub: tree block %llu spanning stripes, ignored. logical=%llu", in scrub_stripe()
3242 key.objectid, logical); in scrub_stripe()
3256 if (extent_logical < logical) { in scrub_stripe()
3257 extent_len -= logical - extent_logical; in scrub_stripe()
3258 extent_logical = logical; in scrub_stripe()
3261 logical + map->stripe_len) { in scrub_stripe()
3262 extent_len = logical + map->stripe_len - in scrub_stripe()
3266 extent_physical = extent_logical - logical + physical; in scrub_stripe()
3287 extent_logical - logical + physical); in scrub_stripe()
3304 num, map, &logical, in scrub_stripe()
3306 logical += base; in scrub_stripe()
3322 logical += increment; in scrub_stripe()
3324 if (logical < key.objectid + bytes) { in scrub_stripe()
3339 logical += increment; in scrub_stripe()
3504 * group doesn't get its logical address and its device extents in scrub_enumerate_chunks()