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()
1045 static inline u32 lsn_to_vbo(struct ntfs_log *log, const u64 lsn) in lsn_to_vbo() argument
1047 u32 vbo = (lsn << log->seq_num_bits) >> (log->seq_num_bits - 3); in lsn_to_vbo()
1059 static inline u32 lsn_to_page_off(struct ntfs_log *log, u64 lsn) in lsn_to_page_off() argument
1061 return (((u32)lsn) << 3) & log->page_mask; in lsn_to_page_off()
1069 static inline bool is_lsn_in_file(struct ntfs_log *log, u64 lsn) in is_lsn_in_file() argument
1071 return lsn >= log->oldest_lsn && in is_lsn_in_file()
1072 lsn <= le64_to_cpu(log->ra->current_lsn); in is_lsn_in_file()
1079 return le64_to_cpu(hdr->rhdr.lsn); in hdr_file_off()
1085 const struct RECORD_PAGE_HDR *hdr, u64 lsn) in base_lsn() argument
1087 u64 h_lsn = le64_to_cpu(hdr->rhdr.lsn); in base_lsn()
1089 (lsn < (lsn_to_vbo(log, h_lsn) & ~log->page_mask) ? 1 : 0)) in base_lsn()
1095 lsn) >> in base_lsn()
1102 const struct CLIENT_REC *client, u64 lsn) in verify_client_lsn() argument
1104 return lsn >= le64_to_cpu(client->oldest_lsn) && in verify_client_lsn()
1105 lsn <= le64_to_cpu(log->ra->current_lsn) && lsn; in verify_client_lsn()
1286 info->last_lsn = le64_to_cpu(r_page->rhdr.lsn); in log_read_rst()
1428 static u32 final_log_off(struct ntfs_log *log, u64 lsn, u32 data_len) in final_log_off() argument
1430 u32 base_vbo = lsn << 3; in final_log_off()
1470 u64 *lsn) in next_log_lsn() argument
1496 if (this_lsn == le64_to_cpu(page->rhdr.lsn)) { in next_log_lsn()
1508 *lsn = vbo_to_lsn(log, vbo, seq); in next_log_lsn()
1514 if (!is_lsn_in_file(log, *lsn)) in next_log_lsn()
1515 *lsn = 0; in next_log_lsn()
1576 u64 lsn = le64_to_cpu(rhdr->lsn); in check_subseq_log_page() local
1585 lsn_seq = lsn >> log->file_data_bits; in check_subseq_log_page()
1593 vbo != (lsn_to_vbo(log, lsn) & ~log->page_mask)); in check_subseq_log_page()
1831 cur_page->rhdr.lsn == page->rhdr.lsn && in last_log_lsn()
1847 lsn_cur = le64_to_cpu(cur_page->rhdr.lsn); in last_log_lsn()
1948 lsn_cur = le64_to_cpu(page->rhdr.lsn); in last_log_lsn()
2029 last_ok_lsn = le64_to_cpu(page->rhdr.lsn); in last_log_lsn()
2208 page->rhdr.lsn = page->record_hdr.last_end_lsn; in last_log_lsn()
2259 u64 lsn = le64_to_cpu(rh->this_lsn); in read_log_rec_buf() local
2260 u32 vbo = lsn_to_vbo(log, lsn) & ~log->page_mask; in read_log_rec_buf()
2261 u32 off = lsn_to_page_off(log, lsn) + log->record_header_len; in read_log_rec_buf()
2285 if (lsn > le64_to_cpu(ph->rhdr.lsn)) { in read_log_rec_buf()
2295 lsn > le64_to_cpu(ph->record_hdr.last_end_lsn)) { in read_log_rec_buf()
2302 if (ph->rhdr.lsn == ph->record_hdr.last_end_lsn || in read_log_rec_buf()
2303 lsn > le64_to_cpu(ph->rhdr.lsn)) { in read_log_rec_buf()
2324 u64 *lsn) in read_rst_area() argument
2334 *lsn = 0; in read_rst_area()
2355 *lsn = lsnr; in read_rst_area()
2389 static int find_log_rec(struct ntfs_log *log, u64 lsn, struct lcb *lcb) in find_log_rec() argument
2397 err = read_log_page(log, lsn_to_vbo(log, lsn), in find_log_rec()
2409 if (lsn != le64_to_cpu(rh->this_lsn)) in find_log_rec()
2441 u32 page_off = lsn_to_page_off(log, lsn); in find_log_rec()
2456 static int read_log_rec_lcb(struct ntfs_log *log, u64 lsn, u32 ctx_mode, in read_log_rec_lcb() argument
2475 if (!verify_client_lsn(log, cr, lsn)) in read_log_rec_lcb()
2485 err = find_log_rec(log, lsn, lcb); in read_log_rec_lcb()
2503 static int find_client_next_lsn(struct ntfs_log *log, struct lcb *lcb, u64 *lsn) in find_client_next_lsn() argument
2510 *lsn = 0; in find_client_next_lsn()
2541 *lsn = current_lsn; in find_client_next_lsn()
2575 *lsn = next_lsn; in find_client_next_lsn()
2580 static int read_next_log_rec(struct ntfs_log *log, struct lcb *lcb, u64 *lsn) in read_next_log_rec() argument
2584 err = find_client_next_lsn(log, lcb, lsn); in read_next_log_rec()
2588 if (!*lsn) in read_next_log_rec()
2599 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()
3696 rec->rhdr.lsn = t64; in do_action()
3698 ib->rhdr.lsn = t64; in do_action()