• Home
  • Raw
  • Download

Lines Matching refs:ra

466 	const struct RESTART_AREA *ra;  in is_rst_area_valid()  local
476 ra = Add2Ptr(rhdr, ro); in is_rst_area_valid()
477 cl = le16_to_cpu(ra->log_clients); in is_rst_area_valid()
482 off = le16_to_cpu(ra->client_off); in is_rst_area_valid()
496 if (le16_to_cpu(rhdr->ra_off) + le16_to_cpu(ra->ra_len) > sys_page || in is_rst_area_valid()
497 off > le16_to_cpu(ra->ra_len)) { in is_rst_area_valid()
505 fl = le16_to_cpu(ra->client_idx[0]); in is_rst_area_valid()
506 ul = le16_to_cpu(ra->client_idx[1]); in is_rst_area_valid()
512 l_size = le64_to_cpu(ra->l_size); in is_rst_area_valid()
520 if (seq_bits != ra->seq_num_bits) in is_rst_area_valid()
524 if (!IS_ALIGNED(le16_to_cpu(ra->data_off), 8) || in is_rst_area_valid()
525 !IS_ALIGNED(le16_to_cpu(ra->rec_hdr_len), 8)) in is_rst_area_valid()
535 const struct RESTART_AREA *ra = Add2Ptr(rhdr, ro); in is_client_area_valid() local
536 u16 ra_len = le16_to_cpu(ra->ra_len); in is_client_area_valid()
544 ca = Add2Ptr(ra, le16_to_cpu(ra->client_off)); in is_client_area_valid()
552 u16 client_idx = le16_to_cpu(ra->client_idx[i]); in is_client_area_valid()
554 u16 clients = le16_to_cpu(ra->log_clients); in is_client_area_valid()
560 client_idx >= le16_to_cpu(ra->log_clients)) in is_client_area_valid()
1015 struct RESTART_AREA *ra; /* In-memory image of the next restart area. */ member
1074 lsn <= le64_to_cpu(log->ra->current_lsn); in is_lsn_in_file()
1107 lsn <= le64_to_cpu(log->ra->current_lsn) && lsn; in verify_client_lsn()
1200 struct RESTART_AREA *ra; in log_read_rst() local
1229 ra = NULL; in log_read_rst()
1237 ra = Add2Ptr(r_page, le16_to_cpu(r_page->ra_off)); in log_read_rst()
1247 if (bchk || ra->client_idx[1] == LFS_NO_CLIENT_LE) { in log_read_rst()
1254 ra = Add2Ptr(r_page, le16_to_cpu(r_page->ra_off)); in log_read_rst()
1275 info->last_lsn = le64_to_cpu(ra->current_lsn); in log_read_rst()
1354 log->ra_size = struct_size(log->ra, clients, 1); in log_create()
1380 struct RESTART_AREA *ra = kzalloc(log->restart_size, GFP_NOFS); in log_create_ra() local
1382 if (!ra) in log_create_ra()
1385 ra->current_lsn = cpu_to_le64(log->last_lsn); in log_create_ra()
1386 ra->log_clients = cpu_to_le16(1); in log_create_ra()
1387 ra->client_idx[1] = LFS_NO_CLIENT_LE; in log_create_ra()
1389 ra->flags = RESTART_SINGLE_PAGE_IO; in log_create_ra()
1390 ra->seq_num_bits = cpu_to_le32(log->seq_num_bits); in log_create_ra()
1391 ra->ra_len = cpu_to_le16(log->ra_size); in log_create_ra()
1392 ra->client_off = cpu_to_le16(offsetof(struct RESTART_AREA, clients)); in log_create_ra()
1393 ra->l_size = cpu_to_le64(log->l_size); in log_create_ra()
1394 ra->rec_hdr_len = cpu_to_le16(log->record_header_len); in log_create_ra()
1395 ra->data_off = cpu_to_le16(log->data_off); in log_create_ra()
1396 ra->open_log_count = cpu_to_le32(log->current_openlog_count + 1); in log_create_ra()
1398 cr = ra->clients; in log_create_ra()
1403 return ra; in log_create_ra()
1846 log->ra->current_lsn = cur_page->record_hdr.last_end_lsn; in last_log_lsn()
1979 log->ra->current_lsn = page->record_hdr.last_end_lsn; in last_log_lsn()
2026 log->ra->current_lsn = tail_page->record_hdr.last_end_lsn; in last_log_lsn()
2058 if (replace_page || (log->ra->flags & RESTART_SINGLE_PAGE_IO)) { in last_log_lsn()
2309 Add2Ptr(log->ra, le16_to_cpu(log->ra->client_off)); in read_rst_area()
2453 cr = Add2Ptr(log->ra, le16_to_cpu(log->ra->client_off)); in read_log_rec_lcb()
2543 log, Add2Ptr(log->ra, le16_to_cpu(log->ra->client_off)), in find_client_next_lsn()
3752 struct RESTART_AREA *ra2, *ra = NULL; in log_replay() local
3809 log->ra = ra; in log_replay()
3811 ra = log_create_ra(log); in log_replay()
3812 if (!ra) { in log_replay()
3816 log->ra = ra; in log_replay()
3899 ra = log_create_ra(log); in log_replay()
3900 if (!ra) { in log_replay()
3904 log->ra = ra; in log_replay()
4017 ra = kzalloc(log->restart_size, GFP_NOFS); in log_replay()
4018 if (!ra) { in log_replay()
4022 log->ra = ra; in log_replay()
4026 memcpy(ra, ra2, log->ra_size); in log_replay()
4028 memcpy(ra, ra2, offsetof(struct RESTART_AREA, clients)); in log_replay()
4029 memcpy(ra->clients, Add2Ptr(ra2, t16), in log_replay()
4033 ra->open_log_count = cpu_to_le32(log->current_openlog_count); in log_replay()
4036 ra->client_off = in log_replay()
4038 ra->ra_len = cpu_to_le16(log->ra_size); in log_replay()
4041 le32_add_cpu(&ra->open_log_count, 1); in log_replay()
4069 ca = Add2Ptr(ra, le16_to_cpu(ra->client_off)); in log_replay()
4071 for (client = ra->client_idx[1];; client = cr->next_client) { in log_replay()
4074 client = ra->client_idx[0]; in log_replay()
4083 remove_client(ca, cr, &ra->client_idx[0]); in log_replay()
4093 add_client(ca, t16, &ra->client_idx[1]); in log_replay()
5140 memcpy(ra2, ra, sizeof(struct RESTART_AREA)); in log_replay()
5198 kfree(ra); in log_replay()