Lines Matching full:rp
29 * @rp: restart page header to check
32 * Check the restart page header @rp for consistency and return 'true' if it is
35 * This function only needs NTFS_BLOCK_SIZE bytes in @rp, i.e. it does not
39 RESTART_PAGE_HEADER *rp, s64 pos) in ntfs_check_restart_page_header() argument
50 logfile_system_page_size = le32_to_cpu(rp->system_page_size); in ntfs_check_restart_page_header()
51 logfile_log_page_size = le32_to_cpu(rp->log_page_size); in ntfs_check_restart_page_header()
70 if (sle16_to_cpu(rp->major_ver) != 1 || in ntfs_check_restart_page_header()
71 sle16_to_cpu(rp->minor_ver) != 1) { in ntfs_check_restart_page_header()
74 "1.1 only.)", (int)sle16_to_cpu(rp->major_ver), in ntfs_check_restart_page_header()
75 (int)sle16_to_cpu(rp->minor_ver)); in ntfs_check_restart_page_header()
82 if (ntfs_is_chkd_record(rp->magic) && !le16_to_cpu(rp->usa_count)) { in ntfs_check_restart_page_header()
88 if (usa_count != le16_to_cpu(rp->usa_count)) { in ntfs_check_restart_page_header()
94 usa_ofs = le16_to_cpu(rp->usa_ofs); in ntfs_check_restart_page_header()
109 ra_ofs = le16_to_cpu(rp->restart_area_offset); in ntfs_check_restart_page_header()
121 if (!ntfs_is_chkd_record(rp->magic) && sle64_to_cpu(rp->chkdsk_lsn)) { in ntfs_check_restart_page_header()
133 * @rp: restart page whose restart area to check
135 * Check the restart area of the restart page @rp for consistency and return
141 * This function only needs NTFS_BLOCK_SIZE bytes in @rp, i.e. it does not
144 static bool ntfs_check_restart_area(struct inode *vi, RESTART_PAGE_HEADER *rp) in ntfs_check_restart_area() argument
152 ra_ofs = le16_to_cpu(rp->restart_area_offset); in ntfs_check_restart_area()
153 ra = (RESTART_AREA*)((u8*)rp + ra_ofs); in ntfs_check_restart_area()
186 if (ra_ofs + ra_len > le32_to_cpu(rp->system_page_size) || in ntfs_check_restart_area()
188 le32_to_cpu(rp->system_page_size) || in ntfs_check_restart_area()
247 * @rp: restart page whose log client array to check
249 * Check the log client array of the restart page @rp for consistency and
256 * function needs @rp->system_page_size bytes in @rp, i.e. it requires the full
260 RESTART_PAGE_HEADER *rp) in ntfs_check_log_client_array() argument
268 ra = (RESTART_AREA*)((u8*)rp + le16_to_cpu(rp->restart_area_offset)); in ntfs_check_log_client_array()
312 * @rp: restart page to check
317 * Check the restart page @rp for consistency and return 0 if it is consistent
321 * This function only needs NTFS_BLOCK_SIZE bytes in @rp, i.e. it does not
337 RESTART_PAGE_HEADER *rp, s64 pos, RESTART_PAGE_HEADER **wrp, in ntfs_check_and_load_restart_page() argument
346 if (!ntfs_check_restart_page_header(vi, rp, pos)) { in ntfs_check_and_load_restart_page()
351 if (!ntfs_check_restart_area(vi, rp)) { in ntfs_check_and_load_restart_page()
355 ra = (RESTART_AREA*)((u8*)rp + le16_to_cpu(rp->restart_area_offset)); in ntfs_check_and_load_restart_page()
360 trp = ntfs_malloc_nofs(le32_to_cpu(rp->system_page_size)); in ntfs_check_and_load_restart_page()
368 * completely inside @rp, just copy it from there. Otherwise map all in ntfs_check_and_load_restart_page()
372 if (size >= le32_to_cpu(rp->system_page_size)) { in ntfs_check_and_load_restart_page()
373 memcpy(trp, rp, le32_to_cpu(rp->system_page_size)); in ntfs_check_and_load_restart_page()
379 /* First copy what we already have in @rp. */ in ntfs_check_and_load_restart_page()
380 memcpy(trp, rp, size); in ntfs_check_and_load_restart_page()
383 to_read = le32_to_cpu(rp->system_page_size) - size; in ntfs_check_and_load_restart_page()
410 le32_to_cpu(rp->system_page_size))) { in ntfs_check_and_load_restart_page()
416 if (le16_to_cpu(rp->restart_area_offset) + in ntfs_check_and_load_restart_page()
431 if (ntfs_is_rstr_record(rp->magic) && in ntfs_check_and_load_restart_page()
439 if (ntfs_is_rstr_record(rp->magic)) in ntfs_check_and_load_restart_page()
441 else /* if (ntfs_is_chkd_record(rp->magic)) */ in ntfs_check_and_load_restart_page()
442 *lsn = sle64_to_cpu(rp->chkdsk_lsn); in ntfs_check_and_load_restart_page()
457 * @rp: [OUT] on success this is a copy of the current restart page
461 * returned in *@rp. Caller must call ntfs_free(*@rp) when finished with it.
471 bool ntfs_check_logfile(struct inode *log_vi, RESTART_PAGE_HEADER **rp) in ntfs_check_logfile() argument
633 if (rp) in ntfs_check_logfile()
634 *rp = rstr1_ph; in ntfs_check_logfile()
648 * @rp: copy of the current restart page
665 bool ntfs_is_logfile_clean(struct inode *log_vi, const RESTART_PAGE_HEADER *rp) in ntfs_is_logfile_clean() argument
676 BUG_ON(!rp); in ntfs_is_logfile_clean()
677 if (!ntfs_is_rstr_record(rp->magic) && in ntfs_is_logfile_clean()
678 !ntfs_is_chkd_record(rp->magic)) { in ntfs_is_logfile_clean()
685 ra = (RESTART_AREA*)((u8*)rp + le16_to_cpu(rp->restart_area_offset)); in ntfs_is_logfile_clean()