aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorAlex Elder <aelder@sgi.com>2010-04-15 14:17:26 -0400
committerAlex Elder <aelder@sgi.com>2010-05-19 10:58:13 -0400
commit9db127edb54048707eb84517eb0573e597a2370a (patch)
treeb8c9a1a0646305cd87fe41001460fbc7bbdf7706 /fs/xfs
parent8c38366f99f83a7fa441e0c0669fefc18615e005 (diff)
xfs: change a few labels in xfs_log_recover.c
Rename a label used in xlog_find_head() that I thought was poorly chosen. Also combine two adjacent labels xlog_find_tail() into a single label, and give it a more generic name. (Now using Dave's suggested "validate_head" name for first label.) Signed-off-by: Alex Elder <aelder@sgi.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_log_recover.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 629e88b38bd1..a6cbc140c330 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -739,7 +739,7 @@ xlog_find_head(
739 goto bp_err; 739 goto bp_err;
740 if (new_blk != -1) { 740 if (new_blk != -1) {
741 head_blk = new_blk; 741 head_blk = new_blk;
742 goto bad_blk; 742 goto validate_head;
743 } 743 }
744 744
745 /* 745 /*
@@ -757,7 +757,7 @@ xlog_find_head(
757 head_blk = new_blk; 757 head_blk = new_blk;
758 } 758 }
759 759
760 bad_blk: 760validate_head:
761 /* 761 /*
762 * Now we need to make sure head_blk is not pointing to a block in 762 * Now we need to make sure head_blk is not pointing to a block in
763 * the middle of a log record. 763 * the middle of a log record.
@@ -864,12 +864,12 @@ xlog_find_tail(
864 if (*head_blk == 0) { /* special case */ 864 if (*head_blk == 0) { /* special case */
865 error = xlog_bread(log, 0, 1, bp, &offset); 865 error = xlog_bread(log, 0, 1, bp, &offset);
866 if (error) 866 if (error)
867 goto bread_err; 867 goto done;
868 868
869 if (xlog_get_cycle(offset) == 0) { 869 if (xlog_get_cycle(offset) == 0) {
870 *tail_blk = 0; 870 *tail_blk = 0;
871 /* leave all other log inited values alone */ 871 /* leave all other log inited values alone */
872 goto exit; 872 goto done;
873 } 873 }
874 } 874 }
875 875
@@ -880,7 +880,7 @@ xlog_find_tail(
880 for (i = (int)(*head_blk) - 1; i >= 0; i--) { 880 for (i = (int)(*head_blk) - 1; i >= 0; i--) {
881 error = xlog_bread(log, i, 1, bp, &offset); 881 error = xlog_bread(log, i, 1, bp, &offset);
882 if (error) 882 if (error)
883 goto bread_err; 883 goto done;
884 884
885 if (XLOG_HEADER_MAGIC_NUM == be32_to_cpu(*(__be32 *)offset)) { 885 if (XLOG_HEADER_MAGIC_NUM == be32_to_cpu(*(__be32 *)offset)) {
886 found = 1; 886 found = 1;
@@ -897,7 +897,7 @@ xlog_find_tail(
897 for (i = log->l_logBBsize - 1; i >= (int)(*head_blk); i--) { 897 for (i = log->l_logBBsize - 1; i >= (int)(*head_blk); i--) {
898 error = xlog_bread(log, i, 1, bp, &offset); 898 error = xlog_bread(log, i, 1, bp, &offset);
899 if (error) 899 if (error)
900 goto bread_err; 900 goto done;
901 901
902 if (XLOG_HEADER_MAGIC_NUM == 902 if (XLOG_HEADER_MAGIC_NUM ==
903 be32_to_cpu(*(__be32 *)offset)) { 903 be32_to_cpu(*(__be32 *)offset)) {
@@ -972,7 +972,7 @@ xlog_find_tail(
972 umount_data_blk = (i + hblks) % log->l_logBBsize; 972 umount_data_blk = (i + hblks) % log->l_logBBsize;
973 error = xlog_bread(log, umount_data_blk, 1, bp, &offset); 973 error = xlog_bread(log, umount_data_blk, 1, bp, &offset);
974 if (error) 974 if (error)
975 goto bread_err; 975 goto done;
976 976
977 op_head = (xlog_op_header_t *)offset; 977 op_head = (xlog_op_header_t *)offset;
978 if (op_head->oh_flags & XLOG_UNMOUNT_TRANS) { 978 if (op_head->oh_flags & XLOG_UNMOUNT_TRANS) {
@@ -1018,12 +1018,10 @@ xlog_find_tail(
1018 * But... if the -device- itself is readonly, just skip this. 1018 * But... if the -device- itself is readonly, just skip this.
1019 * We can't recover this device anyway, so it won't matter. 1019 * We can't recover this device anyway, so it won't matter.
1020 */ 1020 */
1021 if (!xfs_readonly_buftarg(log->l_mp->m_logdev_targp)) { 1021 if (!xfs_readonly_buftarg(log->l_mp->m_logdev_targp))
1022 error = xlog_clear_stale_blocks(log, tail_lsn); 1022 error = xlog_clear_stale_blocks(log, tail_lsn);
1023 }
1024 1023
1025bread_err: 1024done:
1026exit:
1027 xlog_put_bp(bp); 1025 xlog_put_bp(bp);
1028 1026
1029 if (error) 1027 if (error)