fast_commit.c (7069d105c1f15c442b68af43f7fde784f3126739) fast_commit.c (27cd49780381c6ccbf248798e5e8fd076200ffba)
1// SPDX-License-Identifier: GPL-2.0
2
3/*
4 * fs/ext4/fast_commit.c
5 *
6 * Written by Harshad Shirwadkar <harshadshirwadkar@gmail.com>
7 *
8 * Ext4 fast commits routines.

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

1676 * during replay phase, the fc_regions_valid may not same as
1677 * fc_regions_used, update it when do new additions.
1678 */
1679 if (replay && state->fc_regions_used != state->fc_regions_valid)
1680 state->fc_regions_used = state->fc_regions_valid;
1681 if (state->fc_regions_used == state->fc_regions_size) {
1682 struct ext4_fc_alloc_region *fc_regions;
1683
1// SPDX-License-Identifier: GPL-2.0
2
3/*
4 * fs/ext4/fast_commit.c
5 *
6 * Written by Harshad Shirwadkar <harshadshirwadkar@gmail.com>
7 *
8 * Ext4 fast commits routines.

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

1676 * during replay phase, the fc_regions_valid may not same as
1677 * fc_regions_used, update it when do new additions.
1678 */
1679 if (replay && state->fc_regions_used != state->fc_regions_valid)
1680 state->fc_regions_used = state->fc_regions_valid;
1681 if (state->fc_regions_used == state->fc_regions_size) {
1682 struct ext4_fc_alloc_region *fc_regions;
1683
1684 state->fc_regions_size +=
1685 EXT4_FC_REPLAY_REALLOC_INCREMENT;
1686 fc_regions = krealloc(state->fc_regions,
1684 fc_regions = krealloc(state->fc_regions,
1687 state->fc_regions_size *
1688 sizeof(struct ext4_fc_alloc_region),
1685 sizeof(struct ext4_fc_alloc_region) *
1686 (state->fc_regions_size +
1687 EXT4_FC_REPLAY_REALLOC_INCREMENT),
1689 GFP_KERNEL);
1690 if (!fc_regions)
1691 return -ENOMEM;
1688 GFP_KERNEL);
1689 if (!fc_regions)
1690 return -ENOMEM;
1691 state->fc_regions_size +=
1692 EXT4_FC_REPLAY_REALLOC_INCREMENT;
1692 state->fc_regions = fc_regions;
1693 }
1694 region = &state->fc_regions[state->fc_regions_used++];
1695 region->ino = ino;
1696 region->lblk = lblk;
1697 region->pblk = pblk;
1698 region->len = len;
1699

--- 562 unchanged lines hidden ---
1693 state->fc_regions = fc_regions;
1694 }
1695 region = &state->fc_regions[state->fc_regions_used++];
1696 region->ino = ino;
1697 region->lblk = lblk;
1698 region->pblk = pblk;
1699 region->len = len;
1700

--- 562 unchanged lines hidden ---