Lines Matching refs:lsn

417 		u64 lsn = le64_to_cpu(cr->oldest_lsn);  in oldest_client_lsn()  local
420 if (lsn && lsn < *oldest_lsn) in oldest_client_lsn()
421 *oldest_lsn = lsn; in oldest_client_lsn()
1079 static inline u32 lsn_to_vbo(struct ntfs_log *log, const u64 lsn) in lsn_to_vbo() argument
1081 u32 vbo = (lsn << log->seq_num_bits) >> (log->seq_num_bits - 3); in lsn_to_vbo()
1093 static inline u32 lsn_to_page_off(struct ntfs_log *log, u64 lsn) in lsn_to_page_off() argument
1095 return (((u32)lsn) << 3) & log->page_mask; in lsn_to_page_off()
1103 static inline bool is_lsn_in_file(struct ntfs_log *log, u64 lsn) in is_lsn_in_file() argument
1105 return lsn >= log->oldest_lsn && in is_lsn_in_file()
1106 lsn <= le64_to_cpu(log->ra->current_lsn); in is_lsn_in_file()
1113 return le64_to_cpu(hdr->rhdr.lsn); in hdr_file_off()
1119 const struct RECORD_PAGE_HDR *hdr, u64 lsn) in base_lsn() argument
1121 u64 h_lsn = le64_to_cpu(hdr->rhdr.lsn); in base_lsn()
1123 (lsn < (lsn_to_vbo(log, h_lsn) & ~log->page_mask) ? 1 : 0)) in base_lsn()
1129 lsn) >> in base_lsn()
1136 const struct CLIENT_REC *client, u64 lsn) in verify_client_lsn() argument
1138 return lsn >= le64_to_cpu(client->oldest_lsn) && in verify_client_lsn()
1139 lsn <= le64_to_cpu(log->ra->current_lsn) && lsn; in verify_client_lsn()
1287 info->last_lsn = le64_to_cpu(r_page->rhdr.lsn); in log_read_rst()
1423 static u32 final_log_off(struct ntfs_log *log, u64 lsn, u32 data_len) in final_log_off() argument
1425 u32 base_vbo = lsn << 3; in final_log_off()
1465 u64 *lsn) in next_log_lsn() argument
1491 if (this_lsn == le64_to_cpu(page->rhdr.lsn)) { in next_log_lsn()
1503 *lsn = vbo_to_lsn(log, vbo, seq); in next_log_lsn()
1509 if (!is_lsn_in_file(log, *lsn)) in next_log_lsn()
1510 *lsn = 0; in next_log_lsn()
1570 u64 lsn = le64_to_cpu(rhdr->lsn); in check_subseq_log_page() local
1579 lsn_seq = lsn >> log->file_data_bits; in check_subseq_log_page()
1587 vbo != (lsn_to_vbo(log, lsn) & ~log->page_mask)); in check_subseq_log_page()
1825 cur_page->rhdr.lsn == page->rhdr.lsn && in last_log_lsn()
1841 lsn_cur = le64_to_cpu(cur_page->rhdr.lsn); in last_log_lsn()
1942 lsn_cur = le64_to_cpu(page->rhdr.lsn); in last_log_lsn()
2023 last_ok_lsn = le64_to_cpu(page->rhdr.lsn); in last_log_lsn()
2204 page->rhdr.lsn = page->record_hdr.last_end_lsn; in last_log_lsn()
2255 u64 lsn = le64_to_cpu(rh->this_lsn); in read_log_rec_buf() local
2256 u32 vbo = lsn_to_vbo(log, lsn) & ~log->page_mask; in read_log_rec_buf()
2257 u32 off = lsn_to_page_off(log, lsn) + log->record_header_len; in read_log_rec_buf()
2281 if (lsn > le64_to_cpu(ph->rhdr.lsn)) { in read_log_rec_buf()
2291 lsn > le64_to_cpu(ph->record_hdr.last_end_lsn)) { in read_log_rec_buf()
2298 if (ph->rhdr.lsn == ph->record_hdr.last_end_lsn || in read_log_rec_buf()
2299 lsn > le64_to_cpu(ph->rhdr.lsn)) { in read_log_rec_buf()
2320 u64 *lsn) in read_rst_area() argument
2330 *lsn = 0; in read_rst_area()
2351 *lsn = lsnr; in read_rst_area()
2385 static int find_log_rec(struct ntfs_log *log, u64 lsn, struct lcb *lcb) in find_log_rec() argument
2393 err = read_log_page(log, lsn_to_vbo(log, lsn), in find_log_rec()
2405 if (lsn != le64_to_cpu(rh->this_lsn)) in find_log_rec()
2437 u32 page_off = lsn_to_page_off(log, lsn); in find_log_rec()
2452 static int read_log_rec_lcb(struct ntfs_log *log, u64 lsn, u32 ctx_mode, in read_log_rec_lcb() argument
2471 if (!verify_client_lsn(log, cr, lsn)) in read_log_rec_lcb()
2481 err = find_log_rec(log, lsn, lcb); in read_log_rec_lcb()
2499 static int find_client_next_lsn(struct ntfs_log *log, struct lcb *lcb, u64 *lsn) in find_client_next_lsn() argument
2506 *lsn = 0; in find_client_next_lsn()
2537 *lsn = current_lsn; in find_client_next_lsn()
2571 *lsn = next_lsn; in find_client_next_lsn()
2576 static int read_next_log_rec(struct ntfs_log *log, struct lcb *lcb, u64 *lsn) in read_next_log_rec() argument
2580 err = find_client_next_lsn(log, lcb, lsn); in read_next_log_rec()
2584 if (!*lsn) in read_next_log_rec()
2595 return find_log_rec(log, *lsn, lcb); in read_next_log_rec()
2816 u64 lsn; in check_lsn() local
2821 lsn = le64_to_cpu(hdr->lsn); in check_lsn()
2826 if (*rlsn > lsn) in check_lsn()
3694 rec->rhdr.lsn = t64; in do_action()
3696 ib->rhdr.lsn = t64; in do_action()