Lines Matching full:rp

17  * @rp:		restart page header to check
20 * Check the restart page header @rp for consistency and return 'true' if it is
23 * This function only needs NTFS_BLOCK_SIZE bytes in @rp, i.e. it does not
27 struct restart_page_header *rp, s64 pos) in ntfs_check_restart_page_header() argument
38 logfile_system_page_size = le32_to_cpu(rp->system_page_size); in ntfs_check_restart_page_header()
39 logfile_log_page_size = le32_to_cpu(rp->log_page_size); in ntfs_check_restart_page_header()
57 if (le16_to_cpu(rp->major_ver) != 1 || in ntfs_check_restart_page_header()
58 le16_to_cpu(rp->minor_ver) != 1) { in ntfs_check_restart_page_header()
61 (int)le16_to_cpu(rp->major_ver), in ntfs_check_restart_page_header()
62 (int)le16_to_cpu(rp->minor_ver)); in ntfs_check_restart_page_header()
69 if (ntfs_is_chkd_record(rp->magic) && !le16_to_cpu(rp->usa_count)) { in ntfs_check_restart_page_header()
75 if (usa_count != le16_to_cpu(rp->usa_count)) { in ntfs_check_restart_page_header()
81 usa_ofs = le16_to_cpu(rp->usa_ofs); in ntfs_check_restart_page_header()
96 ra_ofs = le16_to_cpu(rp->restart_area_offset); in ntfs_check_restart_page_header()
108 if (!ntfs_is_chkd_record(rp->magic) && le64_to_cpu(rp->chkdsk_lsn)) { in ntfs_check_restart_page_header()
120 * @rp: restart page whose restart area to check
122 * Check the restart area of the restart page @rp for consistency and return
128 * This function only needs NTFS_BLOCK_SIZE bytes in @rp, i.e. it does not
131 static bool ntfs_check_restart_area(struct inode *vi, struct restart_page_header *rp) in ntfs_check_restart_area() argument
139 ra_ofs = le16_to_cpu(rp->restart_area_offset); in ntfs_check_restart_area()
140 ra = (struct restart_area *)((u8 *)rp + ra_ofs); in ntfs_check_restart_area()
173 if (ra_ofs + ra_len > le32_to_cpu(rp->system_page_size) || in ntfs_check_restart_area()
175 le32_to_cpu(rp->system_page_size) || in ntfs_check_restart_area()
232 * @rp: restart page whose log client array to check
234 * Check the log client array of the restart page @rp for consistency and
241 * function needs @rp->system_page_size bytes in @rp, i.e. it requires the full
245 struct restart_page_header *rp) in ntfs_check_log_client_array() argument
253 ra = (struct restart_area *)((u8 *)rp + le16_to_cpu(rp->restart_area_offset)); in ntfs_check_log_client_array()
297 * @rp: restart page to check
302 * Check the restart page @rp for consistency and return 0 if it is consistent
306 * This function only needs NTFS_BLOCK_SIZE bytes in @rp, i.e. it does not
322 struct restart_page_header *rp, s64 pos, struct restart_page_header **wrp, in ntfs_check_and_load_restart_page() argument
331 if (!ntfs_check_restart_page_header(vi, rp, pos)) { in ntfs_check_and_load_restart_page()
336 if (!ntfs_check_restart_area(vi, rp)) { in ntfs_check_and_load_restart_page()
340 ra = (struct restart_area *)((u8 *)rp + le16_to_cpu(rp->restart_area_offset)); in ntfs_check_and_load_restart_page()
345 trp = kvzalloc(le32_to_cpu(rp->system_page_size), GFP_NOFS); in ntfs_check_and_load_restart_page()
352 * completely inside @rp, just copy it from there. Otherwise map all in ntfs_check_and_load_restart_page()
356 if (size >= le32_to_cpu(rp->system_page_size)) { in ntfs_check_and_load_restart_page()
357 memcpy(trp, rp, le32_to_cpu(rp->system_page_size)); in ntfs_check_and_load_restart_page()
363 /* First copy what we already have in @rp. */ in ntfs_check_and_load_restart_page()
364 memcpy(trp, rp, size); in ntfs_check_and_load_restart_page()
367 to_read = le32_to_cpu(rp->system_page_size) - size; in ntfs_check_and_load_restart_page()
392 post_read_mst_fixup((struct ntfs_record *)trp, le32_to_cpu(rp->system_page_size))) { in ntfs_check_and_load_restart_page()
398 if (le16_to_cpu(rp->restart_area_offset) + in ntfs_check_and_load_restart_page()
413 if (ntfs_is_rstr_record(rp->magic) && in ntfs_check_and_load_restart_page()
421 if (ntfs_is_rstr_record(rp->magic)) in ntfs_check_and_load_restart_page()
423 else /* if (ntfs_is_chkd_record(rp->magic)) */ in ntfs_check_and_load_restart_page()
424 *lsn = le64_to_cpu(rp->chkdsk_lsn); in ntfs_check_and_load_restart_page()
439 * @rp: [OUT] on success this is a copy of the current restart page
443 * returned in *@rp. Caller must call kvfree(*@rp) when finished with it.
453 bool ntfs_check_logfile(struct inode *log_vi, struct restart_page_header **rp) in ntfs_check_logfile() argument
618 if (rp) in ntfs_check_logfile()
619 *rp = rstr1_ph; in ntfs_check_logfile()