fslog.c (f777316e52e14059a6a1df45cbf39a93ac49a593) fslog.c (f759942b72a9ad309282b2fedcebcee3c4c58e24)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 *
4 * Copyright (C) 2019-2021 Paragon Software GmbH, All rights reserved.
5 *
6 */
7
8#include <linux/blkdev.h>

--- 3829 unchanged lines hidden (view full) ---

3838 * If the restart offset above wasn't zero then we won't
3839 * look for a second restart.
3840 */
3841 if (rst_info.vbo)
3842 goto check_restart_area;
3843
3844 memset(&rst_info2, 0, sizeof(struct restart_info));
3845 err = log_read_rst(log, l_size, false, &rst_info2);
1// SPDX-License-Identifier: GPL-2.0
2/*
3 *
4 * Copyright (C) 2019-2021 Paragon Software GmbH, All rights reserved.
5 *
6 */
7
8#include <linux/blkdev.h>

--- 3829 unchanged lines hidden (view full) ---

3838 * If the restart offset above wasn't zero then we won't
3839 * look for a second restart.
3840 */
3841 if (rst_info.vbo)
3842 goto check_restart_area;
3843
3844 memset(&rst_info2, 0, sizeof(struct restart_info));
3845 err = log_read_rst(log, l_size, false, &rst_info2);
3846 if (err)
3847 goto out;
3846
3847 /* Determine which restart area to use. */
3848 if (!rst_info2.restart || rst_info2.last_lsn <= rst_info.last_lsn)
3849 goto use_first_page;
3850
3851 use_second_page = true;
3852
3853 if (rst_info.chkdsk_was_run && page_size != rst_info.vbo) {

--- 1198 unchanged lines hidden (view full) ---

5052 * If the mapping isn't already the table or the mapping
5053 * corresponds to a hole the mapping, we need to make sure
5054 * there is no partial page already memory.
5055 */
5056 if (is_mapped && lcn != SPARSE_LCN && clen >= t16)
5057 goto add_allocated_vcns;
5058
5059 vcn = le64_to_cpu(lrh->target_vcn);
3848
3849 /* Determine which restart area to use. */
3850 if (!rst_info2.restart || rst_info2.last_lsn <= rst_info.last_lsn)
3851 goto use_first_page;
3852
3853 use_second_page = true;
3854
3855 if (rst_info.chkdsk_was_run && page_size != rst_info.vbo) {

--- 1198 unchanged lines hidden (view full) ---

5054 * If the mapping isn't already the table or the mapping
5055 * corresponds to a hole the mapping, we need to make sure
5056 * there is no partial page already memory.
5057 */
5058 if (is_mapped && lcn != SPARSE_LCN && clen >= t16)
5059 goto add_allocated_vcns;
5060
5061 vcn = le64_to_cpu(lrh->target_vcn);
5060 vcn &= ~(log->clst_per_page - 1);
5062 vcn &= ~(u64)(log->clst_per_page - 1);
5061
5062add_allocated_vcns:
5063 for (i = 0, vcn = le64_to_cpu(lrh->target_vcn),
5064 size = (vcn + 1) << sbi->cluster_bits;
5065 i < t16; i++, vcn += 1, size += sbi->cluster_size) {
5066 attr = oa->attr;
5067 if (!attr->non_res) {
5068 if (size > le32_to_cpu(attr->res.data_size))

--- 147 unchanged lines hidden ---
5063
5064add_allocated_vcns:
5065 for (i = 0, vcn = le64_to_cpu(lrh->target_vcn),
5066 size = (vcn + 1) << sbi->cluster_bits;
5067 i < t16; i++, vcn += 1, size += sbi->cluster_size) {
5068 attr = oa->attr;
5069 if (!attr->non_res) {
5070 if (size > le32_to_cpu(attr->res.data_size))

--- 147 unchanged lines hidden ---