aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_recover.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r--fs/xfs/xfs_log_recover.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 9824b5bf0ec0..0aac28ddb81c 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -148,7 +148,7 @@ xlog_bread(
148 * The buffer is kept locked across the write and is returned locked. 148 * The buffer is kept locked across the write and is returned locked.
149 * This can only be used for synchronous log writes. 149 * This can only be used for synchronous log writes.
150 */ 150 */
151int 151STATIC int
152xlog_bwrite( 152xlog_bwrite(
153 xlog_t *log, 153 xlog_t *log,
154 xfs_daddr_t blk_no, 154 xfs_daddr_t blk_no,
@@ -179,7 +179,7 @@ xlog_bwrite(
179 return error; 179 return error;
180} 180}
181 181
182xfs_caddr_t 182STATIC xfs_caddr_t
183xlog_align( 183xlog_align(
184 xlog_t *log, 184 xlog_t *log,
185 xfs_daddr_t blk_no, 185 xfs_daddr_t blk_no,
@@ -528,7 +528,7 @@ out:
528 * 528 *
529 * Return: zero if normal, non-zero if error. 529 * Return: zero if normal, non-zero if error.
530 */ 530 */
531int 531STATIC int
532xlog_find_head( 532xlog_find_head(
533 xlog_t *log, 533 xlog_t *log,
534 xfs_daddr_t *return_head_blk) 534 xfs_daddr_t *return_head_blk)
@@ -1964,7 +1964,8 @@ xlog_recover_do_reg_buffer(
1964 * probably a good thing to do for other buf types also. 1964 * probably a good thing to do for other buf types also.
1965 */ 1965 */
1966 error = 0; 1966 error = 0;
1967 if (buf_f->blf_flags & (XFS_BLI_UDQUOT_BUF|XFS_BLI_GDQUOT_BUF)) { 1967 if (buf_f->blf_flags &
1968 (XFS_BLI_UDQUOT_BUF|XFS_BLI_PDQUOT_BUF|XFS_BLI_GDQUOT_BUF)) {
1968 error = xfs_qm_dqcheck((xfs_disk_dquot_t *) 1969 error = xfs_qm_dqcheck((xfs_disk_dquot_t *)
1969 item->ri_buf[i].i_addr, 1970 item->ri_buf[i].i_addr,
1970 -1, 0, XFS_QMOPT_DOWARN, 1971 -1, 0, XFS_QMOPT_DOWARN,
@@ -2030,6 +2031,7 @@ xfs_qm_dqcheck(
2030 } 2031 }
2031 2032
2032 if (INT_GET(ddq->d_flags, ARCH_CONVERT) != XFS_DQ_USER && 2033 if (INT_GET(ddq->d_flags, ARCH_CONVERT) != XFS_DQ_USER &&
2034 INT_GET(ddq->d_flags, ARCH_CONVERT) != XFS_DQ_PROJ &&
2033 INT_GET(ddq->d_flags, ARCH_CONVERT) != XFS_DQ_GROUP) { 2035 INT_GET(ddq->d_flags, ARCH_CONVERT) != XFS_DQ_GROUP) {
2034 if (flags & XFS_QMOPT_DOWARN) 2036 if (flags & XFS_QMOPT_DOWARN)
2035 cmn_err(CE_ALERT, 2037 cmn_err(CE_ALERT,
@@ -2135,6 +2137,8 @@ xlog_recover_do_dquot_buffer(
2135 type = 0; 2137 type = 0;
2136 if (buf_f->blf_flags & XFS_BLI_UDQUOT_BUF) 2138 if (buf_f->blf_flags & XFS_BLI_UDQUOT_BUF)
2137 type |= XFS_DQ_USER; 2139 type |= XFS_DQ_USER;
2140 if (buf_f->blf_flags & XFS_BLI_PDQUOT_BUF)
2141 type |= XFS_DQ_PROJ;
2138 if (buf_f->blf_flags & XFS_BLI_GDQUOT_BUF) 2142 if (buf_f->blf_flags & XFS_BLI_GDQUOT_BUF)
2139 type |= XFS_DQ_GROUP; 2143 type |= XFS_DQ_GROUP;
2140 /* 2144 /*
@@ -2247,7 +2251,8 @@ xlog_recover_do_buffer_trans(
2247 error = 0; 2251 error = 0;
2248 if (flags & XFS_BLI_INODE_BUF) { 2252 if (flags & XFS_BLI_INODE_BUF) {
2249 error = xlog_recover_do_inode_buffer(mp, item, bp, buf_f); 2253 error = xlog_recover_do_inode_buffer(mp, item, bp, buf_f);
2250 } else if (flags & (XFS_BLI_UDQUOT_BUF | XFS_BLI_GDQUOT_BUF)) { 2254 } else if (flags &
2255 (XFS_BLI_UDQUOT_BUF|XFS_BLI_PDQUOT_BUF|XFS_BLI_GDQUOT_BUF)) {
2251 xlog_recover_do_dquot_buffer(mp, log, item, bp, buf_f); 2256 xlog_recover_do_dquot_buffer(mp, log, item, bp, buf_f);
2252 } else { 2257 } else {
2253 xlog_recover_do_reg_buffer(mp, item, bp, buf_f); 2258 xlog_recover_do_reg_buffer(mp, item, bp, buf_f);
@@ -2619,7 +2624,7 @@ xlog_recover_do_dquot_trans(
2619 * This type of quotas was turned off, so ignore this record. 2624 * This type of quotas was turned off, so ignore this record.
2620 */ 2625 */
2621 type = INT_GET(recddq->d_flags, ARCH_CONVERT) & 2626 type = INT_GET(recddq->d_flags, ARCH_CONVERT) &
2622 (XFS_DQ_USER | XFS_DQ_GROUP); 2627 (XFS_DQ_USER | XFS_DQ_PROJ | XFS_DQ_GROUP);
2623 ASSERT(type); 2628 ASSERT(type);
2624 if (log->l_quotaoffs_flag & type) 2629 if (log->l_quotaoffs_flag & type)
2625 return (0); 2630 return (0);
@@ -2742,7 +2747,6 @@ xlog_recover_do_efd_trans(
2742 xfs_efi_log_item_t *efip = NULL; 2747 xfs_efi_log_item_t *efip = NULL;
2743 xfs_log_item_t *lip; 2748 xfs_log_item_t *lip;
2744 int gen; 2749 int gen;
2745 int nexts;
2746 __uint64_t efi_id; 2750 __uint64_t efi_id;
2747 SPLDECL(s); 2751 SPLDECL(s);
2748 2752
@@ -2777,22 +2781,15 @@ xlog_recover_do_efd_trans(
2777 } 2781 }
2778 lip = xfs_trans_next_ail(mp, lip, &gen, NULL); 2782 lip = xfs_trans_next_ail(mp, lip, &gen, NULL);
2779 } 2783 }
2780 if (lip == NULL) {
2781 AIL_UNLOCK(mp, s);
2782 }
2783 2784
2784 /* 2785 /*
2785 * If we found it, then free it up. If it wasn't there, it 2786 * If we found it, then free it up. If it wasn't there, it
2786 * must have been overwritten in the log. Oh well. 2787 * must have been overwritten in the log. Oh well.
2787 */ 2788 */
2788 if (lip != NULL) { 2789 if (lip != NULL) {
2789 nexts = efip->efi_format.efi_nextents; 2790 xfs_efi_item_free(efip);
2790 if (nexts > XFS_EFI_MAX_FAST_EXTENTS) { 2791 } else {
2791 kmem_free(lip, sizeof(xfs_efi_log_item_t) + 2792 AIL_UNLOCK(mp, s);
2792 ((nexts - 1) * sizeof(xfs_extent_t)));
2793 } else {
2794 kmem_zone_free(xfs_efi_zone, efip);
2795 }
2796 } 2793 }
2797} 2794}
2798 2795