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()
1060 static inline u32 lsn_to_vbo(struct ntfs_log *log, const u64 lsn) in lsn_to_vbo() argument
1062 u32 vbo = (lsn << log->seq_num_bits) >> (log->seq_num_bits - 3); in lsn_to_vbo()
1074 static inline u32 lsn_to_page_off(struct ntfs_log *log, u64 lsn) in lsn_to_page_off() argument
1076 return (((u32)lsn) << 3) & log->page_mask; in lsn_to_page_off()
1084 static inline bool is_lsn_in_file(struct ntfs_log *log, u64 lsn) in is_lsn_in_file() argument
1086 return lsn >= log->oldest_lsn && in is_lsn_in_file()
1087 lsn <= le64_to_cpu(log->ra->current_lsn); in is_lsn_in_file()
1094 return le64_to_cpu(hdr->rhdr.lsn); in hdr_file_off()
1100 const struct RECORD_PAGE_HDR *hdr, u64 lsn) in base_lsn() argument
1102 u64 h_lsn = le64_to_cpu(hdr->rhdr.lsn); in base_lsn()
1104 (lsn < (lsn_to_vbo(log, h_lsn) & ~log->page_mask) ? 1 : 0)) in base_lsn()
1110 lsn) >> in base_lsn()
1117 const struct CLIENT_REC *client, u64 lsn) in verify_client_lsn() argument
1119 return lsn >= le64_to_cpu(client->oldest_lsn) && in verify_client_lsn()
1120 lsn <= le64_to_cpu(log->ra->current_lsn) && lsn; in verify_client_lsn()
1267 info->last_lsn = le64_to_cpu(r_page->rhdr.lsn); in log_read_rst()
1403 static u32 final_log_off(struct ntfs_log *log, u64 lsn, u32 data_len) in final_log_off() argument
1405 u32 base_vbo = lsn << 3; in final_log_off()
1445 u64 *lsn) in next_log_lsn() argument
1471 if (this_lsn == le64_to_cpu(page->rhdr.lsn)) { in next_log_lsn()
1483 *lsn = vbo_to_lsn(log, vbo, seq); in next_log_lsn()
1489 if (!is_lsn_in_file(log, *lsn)) in next_log_lsn()
1490 *lsn = 0; in next_log_lsn()
1550 u64 lsn = le64_to_cpu(rhdr->lsn); in check_subseq_log_page() local
1559 lsn_seq = lsn >> log->file_data_bits; in check_subseq_log_page()
1567 vbo != (lsn_to_vbo(log, lsn) & ~log->page_mask)); in check_subseq_log_page()
1805 cur_page->rhdr.lsn == page->rhdr.lsn && in last_log_lsn()
1821 lsn_cur = le64_to_cpu(cur_page->rhdr.lsn); in last_log_lsn()
1922 lsn_cur = le64_to_cpu(page->rhdr.lsn); in last_log_lsn()
2003 last_ok_lsn = le64_to_cpu(page->rhdr.lsn); in last_log_lsn()
2184 page->rhdr.lsn = page->record_hdr.last_end_lsn; in last_log_lsn()
2235 u64 lsn = le64_to_cpu(rh->this_lsn); in read_log_rec_buf() local
2236 u32 vbo = lsn_to_vbo(log, lsn) & ~log->page_mask; in read_log_rec_buf()
2237 u32 off = lsn_to_page_off(log, lsn) + log->record_header_len; in read_log_rec_buf()
2261 if (lsn > le64_to_cpu(ph->rhdr.lsn)) { in read_log_rec_buf()
2271 lsn > le64_to_cpu(ph->record_hdr.last_end_lsn)) { in read_log_rec_buf()
2278 if (ph->rhdr.lsn == ph->record_hdr.last_end_lsn || in read_log_rec_buf()
2279 lsn > le64_to_cpu(ph->rhdr.lsn)) { in read_log_rec_buf()
2300 u64 *lsn) in read_rst_area() argument
2310 *lsn = 0; in read_rst_area()
2331 *lsn = lsnr; in read_rst_area()
2365 static int find_log_rec(struct ntfs_log *log, u64 lsn, struct lcb *lcb) in find_log_rec() argument
2373 err = read_log_page(log, lsn_to_vbo(log, lsn), in find_log_rec()
2385 if (lsn != le64_to_cpu(rh->this_lsn)) in find_log_rec()
2417 u32 page_off = lsn_to_page_off(log, lsn); in find_log_rec()
2432 static int read_log_rec_lcb(struct ntfs_log *log, u64 lsn, u32 ctx_mode, in read_log_rec_lcb() argument
2451 if (!verify_client_lsn(log, cr, lsn)) in read_log_rec_lcb()
2461 err = find_log_rec(log, lsn, lcb); in read_log_rec_lcb()
2479 static int find_client_next_lsn(struct ntfs_log *log, struct lcb *lcb, u64 *lsn) in find_client_next_lsn() argument
2486 *lsn = 0; in find_client_next_lsn()
2517 *lsn = current_lsn; in find_client_next_lsn()
2551 *lsn = next_lsn; in find_client_next_lsn()
2556 static int read_next_log_rec(struct ntfs_log *log, struct lcb *lcb, u64 *lsn) in read_next_log_rec() argument
2560 err = find_client_next_lsn(log, lcb, lsn); in read_next_log_rec()
2564 if (!*lsn) in read_next_log_rec()
2575 return find_log_rec(log, *lsn, lcb); in read_next_log_rec()
2796 u64 lsn; in check_lsn() local
2801 lsn = le64_to_cpu(hdr->lsn); in check_lsn()
2806 if (*rlsn > lsn) in check_lsn()
3674 rec->rhdr.lsn = t64; in do_action()
3676 ib->rhdr.lsn = t64; in do_action()