diff options
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_buf_item.h | 18 | ||||
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 58 | ||||
-rw-r--r-- | fs/xfs/xfs_trans.h | 4 |
3 files changed, 3 insertions, 77 deletions
diff --git a/fs/xfs/xfs_buf_item.h b/fs/xfs/xfs_buf_item.h index 07c708c2b529..d7e136143066 100644 --- a/fs/xfs/xfs_buf_item.h +++ b/fs/xfs/xfs_buf_item.h | |||
@@ -21,23 +21,7 @@ | |||
21 | /* | 21 | /* |
22 | * This is the structure used to lay out a buf log item in the | 22 | * This is the structure used to lay out a buf log item in the |
23 | * log. The data map describes which 128 byte chunks of the buffer | 23 | * log. The data map describes which 128 byte chunks of the buffer |
24 | * have been logged. This structure works only on buffers that | 24 | * have been logged. |
25 | * reside up to the first TB in the filesystem. These buffers are | ||
26 | * generated only by pre-6.2 systems and are known as XFS_LI_6_1_BUF. | ||
27 | */ | ||
28 | typedef struct xfs_buf_log_format_v1 { | ||
29 | unsigned short blf_type; /* buf log item type indicator */ | ||
30 | unsigned short blf_size; /* size of this item */ | ||
31 | __int32_t blf_blkno; /* starting blkno of this buf */ | ||
32 | ushort blf_flags; /* misc state */ | ||
33 | ushort blf_len; /* number of blocks in this buf */ | ||
34 | unsigned int blf_map_size; /* size of data bitmap in words */ | ||
35 | unsigned int blf_data_map[1];/* variable size bitmap of */ | ||
36 | /* regions of buffer in this item */ | ||
37 | } xfs_buf_log_format_v1_t; | ||
38 | |||
39 | /* | ||
40 | * This is a form of the above structure with a 64 bit blkno field. | ||
41 | * For 6.2 and beyond, this is XFS_LI_BUF. We use this to log everything. | 25 | * For 6.2 and beyond, this is XFS_LI_BUF. We use this to log everything. |
42 | */ | 26 | */ |
43 | typedef struct xfs_buf_log_format_t { | 27 | typedef struct xfs_buf_log_format_t { |
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 3cb678e3a132..61a29e1191a8 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -1514,7 +1514,6 @@ xlog_recover_reorder_trans( | |||
1514 | { | 1514 | { |
1515 | xlog_recover_item_t *first_item, *itemq, *itemq_next; | 1515 | xlog_recover_item_t *first_item, *itemq, *itemq_next; |
1516 | xfs_buf_log_format_t *buf_f; | 1516 | xfs_buf_log_format_t *buf_f; |
1517 | xfs_buf_log_format_v1_t *obuf_f; | ||
1518 | ushort flags = 0; | 1517 | ushort flags = 0; |
1519 | 1518 | ||
1520 | first_item = itemq = trans->r_itemq; | 1519 | first_item = itemq = trans->r_itemq; |
@@ -1522,29 +1521,16 @@ xlog_recover_reorder_trans( | |||
1522 | do { | 1521 | do { |
1523 | itemq_next = itemq->ri_next; | 1522 | itemq_next = itemq->ri_next; |
1524 | buf_f = (xfs_buf_log_format_t *)itemq->ri_buf[0].i_addr; | 1523 | buf_f = (xfs_buf_log_format_t *)itemq->ri_buf[0].i_addr; |
1525 | switch (ITEM_TYPE(itemq)) { | ||
1526 | case XFS_LI_BUF: | ||
1527 | flags = buf_f->blf_flags; | ||
1528 | break; | ||
1529 | case XFS_LI_6_1_BUF: | ||
1530 | case XFS_LI_5_3_BUF: | ||
1531 | obuf_f = (xfs_buf_log_format_v1_t*)buf_f; | ||
1532 | flags = obuf_f->blf_flags; | ||
1533 | break; | ||
1534 | } | ||
1535 | 1524 | ||
1536 | switch (ITEM_TYPE(itemq)) { | 1525 | switch (ITEM_TYPE(itemq)) { |
1537 | case XFS_LI_BUF: | 1526 | case XFS_LI_BUF: |
1538 | case XFS_LI_6_1_BUF: | 1527 | flags = buf_f->blf_flags; |
1539 | case XFS_LI_5_3_BUF: | ||
1540 | if (!(flags & XFS_BLI_CANCEL)) { | 1528 | if (!(flags & XFS_BLI_CANCEL)) { |
1541 | xlog_recover_insert_item_frontq(&trans->r_itemq, | 1529 | xlog_recover_insert_item_frontq(&trans->r_itemq, |
1542 | itemq); | 1530 | itemq); |
1543 | break; | 1531 | break; |
1544 | } | 1532 | } |
1545 | case XFS_LI_INODE: | 1533 | case XFS_LI_INODE: |
1546 | case XFS_LI_6_1_INODE: | ||
1547 | case XFS_LI_5_3_INODE: | ||
1548 | case XFS_LI_DQUOT: | 1534 | case XFS_LI_DQUOT: |
1549 | case XFS_LI_QUOTAOFF: | 1535 | case XFS_LI_QUOTAOFF: |
1550 | case XFS_LI_EFD: | 1536 | case XFS_LI_EFD: |
@@ -1583,7 +1569,6 @@ xlog_recover_do_buffer_pass1( | |||
1583 | xfs_buf_cancel_t *nextp; | 1569 | xfs_buf_cancel_t *nextp; |
1584 | xfs_buf_cancel_t *prevp; | 1570 | xfs_buf_cancel_t *prevp; |
1585 | xfs_buf_cancel_t **bucket; | 1571 | xfs_buf_cancel_t **bucket; |
1586 | xfs_buf_log_format_v1_t *obuf_f; | ||
1587 | xfs_daddr_t blkno = 0; | 1572 | xfs_daddr_t blkno = 0; |
1588 | uint len = 0; | 1573 | uint len = 0; |
1589 | ushort flags = 0; | 1574 | ushort flags = 0; |
@@ -1594,13 +1579,6 @@ xlog_recover_do_buffer_pass1( | |||
1594 | len = buf_f->blf_len; | 1579 | len = buf_f->blf_len; |
1595 | flags = buf_f->blf_flags; | 1580 | flags = buf_f->blf_flags; |
1596 | break; | 1581 | break; |
1597 | case XFS_LI_6_1_BUF: | ||
1598 | case XFS_LI_5_3_BUF: | ||
1599 | obuf_f = (xfs_buf_log_format_v1_t*)buf_f; | ||
1600 | blkno = (xfs_daddr_t) obuf_f->blf_blkno; | ||
1601 | len = obuf_f->blf_len; | ||
1602 | flags = obuf_f->blf_flags; | ||
1603 | break; | ||
1604 | } | 1582 | } |
1605 | 1583 | ||
1606 | /* | 1584 | /* |
@@ -1746,7 +1724,6 @@ xlog_recover_do_buffer_pass2( | |||
1746 | xlog_t *log, | 1724 | xlog_t *log, |
1747 | xfs_buf_log_format_t *buf_f) | 1725 | xfs_buf_log_format_t *buf_f) |
1748 | { | 1726 | { |
1749 | xfs_buf_log_format_v1_t *obuf_f; | ||
1750 | xfs_daddr_t blkno = 0; | 1727 | xfs_daddr_t blkno = 0; |
1751 | ushort flags = 0; | 1728 | ushort flags = 0; |
1752 | uint len = 0; | 1729 | uint len = 0; |
@@ -1757,13 +1734,6 @@ xlog_recover_do_buffer_pass2( | |||
1757 | flags = buf_f->blf_flags; | 1734 | flags = buf_f->blf_flags; |
1758 | len = buf_f->blf_len; | 1735 | len = buf_f->blf_len; |
1759 | break; | 1736 | break; |
1760 | case XFS_LI_6_1_BUF: | ||
1761 | case XFS_LI_5_3_BUF: | ||
1762 | obuf_f = (xfs_buf_log_format_v1_t*)buf_f; | ||
1763 | blkno = (xfs_daddr_t) obuf_f->blf_blkno; | ||
1764 | flags = obuf_f->blf_flags; | ||
1765 | len = (xfs_daddr_t) obuf_f->blf_len; | ||
1766 | break; | ||
1767 | } | 1737 | } |
1768 | 1738 | ||
1769 | return xlog_check_buffer_cancelled(log, blkno, len, flags); | 1739 | return xlog_check_buffer_cancelled(log, blkno, len, flags); |
@@ -1799,7 +1769,6 @@ xlog_recover_do_inode_buffer( | |||
1799 | int inodes_per_buf; | 1769 | int inodes_per_buf; |
1800 | xfs_agino_t *logged_nextp; | 1770 | xfs_agino_t *logged_nextp; |
1801 | xfs_agino_t *buffer_nextp; | 1771 | xfs_agino_t *buffer_nextp; |
1802 | xfs_buf_log_format_v1_t *obuf_f; | ||
1803 | unsigned int *data_map = NULL; | 1772 | unsigned int *data_map = NULL; |
1804 | unsigned int map_size = 0; | 1773 | unsigned int map_size = 0; |
1805 | 1774 | ||
@@ -1808,12 +1777,6 @@ xlog_recover_do_inode_buffer( | |||
1808 | data_map = buf_f->blf_data_map; | 1777 | data_map = buf_f->blf_data_map; |
1809 | map_size = buf_f->blf_map_size; | 1778 | map_size = buf_f->blf_map_size; |
1810 | break; | 1779 | break; |
1811 | case XFS_LI_6_1_BUF: | ||
1812 | case XFS_LI_5_3_BUF: | ||
1813 | obuf_f = (xfs_buf_log_format_v1_t*)buf_f; | ||
1814 | data_map = obuf_f->blf_data_map; | ||
1815 | map_size = obuf_f->blf_map_size; | ||
1816 | break; | ||
1817 | } | 1780 | } |
1818 | /* | 1781 | /* |
1819 | * Set the variables corresponding to the current region to | 1782 | * Set the variables corresponding to the current region to |
@@ -1912,7 +1875,6 @@ xlog_recover_do_reg_buffer( | |||
1912 | int i; | 1875 | int i; |
1913 | int bit; | 1876 | int bit; |
1914 | int nbits; | 1877 | int nbits; |
1915 | xfs_buf_log_format_v1_t *obuf_f; | ||
1916 | unsigned int *data_map = NULL; | 1878 | unsigned int *data_map = NULL; |
1917 | unsigned int map_size = 0; | 1879 | unsigned int map_size = 0; |
1918 | int error; | 1880 | int error; |
@@ -1922,12 +1884,6 @@ xlog_recover_do_reg_buffer( | |||
1922 | data_map = buf_f->blf_data_map; | 1884 | data_map = buf_f->blf_data_map; |
1923 | map_size = buf_f->blf_map_size; | 1885 | map_size = buf_f->blf_map_size; |
1924 | break; | 1886 | break; |
1925 | case XFS_LI_6_1_BUF: | ||
1926 | case XFS_LI_5_3_BUF: | ||
1927 | obuf_f = (xfs_buf_log_format_v1_t*)buf_f; | ||
1928 | data_map = obuf_f->blf_data_map; | ||
1929 | map_size = obuf_f->blf_map_size; | ||
1930 | break; | ||
1931 | } | 1887 | } |
1932 | bit = 0; | 1888 | bit = 0; |
1933 | i = 1; /* 0 is the buf format structure */ | 1889 | i = 1; /* 0 is the buf format structure */ |
@@ -2160,7 +2116,6 @@ xlog_recover_do_buffer_trans( | |||
2160 | int pass) | 2116 | int pass) |
2161 | { | 2117 | { |
2162 | xfs_buf_log_format_t *buf_f; | 2118 | xfs_buf_log_format_t *buf_f; |
2163 | xfs_buf_log_format_v1_t *obuf_f; | ||
2164 | xfs_mount_t *mp; | 2119 | xfs_mount_t *mp; |
2165 | xfs_buf_t *bp; | 2120 | xfs_buf_t *bp; |
2166 | int error; | 2121 | int error; |
@@ -2197,13 +2152,6 @@ xlog_recover_do_buffer_trans( | |||
2197 | len = buf_f->blf_len; | 2152 | len = buf_f->blf_len; |
2198 | flags = buf_f->blf_flags; | 2153 | flags = buf_f->blf_flags; |
2199 | break; | 2154 | break; |
2200 | case XFS_LI_6_1_BUF: | ||
2201 | case XFS_LI_5_3_BUF: | ||
2202 | obuf_f = (xfs_buf_log_format_v1_t*)buf_f; | ||
2203 | blkno = obuf_f->blf_blkno; | ||
2204 | len = obuf_f->blf_len; | ||
2205 | flags = obuf_f->blf_flags; | ||
2206 | break; | ||
2207 | default: | 2155 | default: |
2208 | xfs_fs_cmn_err(CE_ALERT, log->l_mp, | 2156 | xfs_fs_cmn_err(CE_ALERT, log->l_mp, |
2209 | "xfs_log_recover: unknown buffer type 0x%x, logdev %s", | 2157 | "xfs_log_recover: unknown buffer type 0x%x, logdev %s", |
@@ -2830,9 +2778,7 @@ xlog_recover_do_trans( | |||
2830 | * where xfs_daddr_t is 32-bits but mount will warn us | 2778 | * where xfs_daddr_t is 32-bits but mount will warn us |
2831 | * off a > 1 TB filesystem before we get here. | 2779 | * off a > 1 TB filesystem before we get here. |
2832 | */ | 2780 | */ |
2833 | if ((ITEM_TYPE(item) == XFS_LI_BUF) || | 2781 | if ((ITEM_TYPE(item) == XFS_LI_BUF)) { |
2834 | (ITEM_TYPE(item) == XFS_LI_6_1_BUF) || | ||
2835 | (ITEM_TYPE(item) == XFS_LI_5_3_BUF)) { | ||
2836 | if ((error = xlog_recover_do_buffer_trans(log, item, | 2782 | if ((error = xlog_recover_do_buffer_trans(log, item, |
2837 | pass))) | 2783 | pass))) |
2838 | break; | 2784 | break; |
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h index c68e00105d23..9c975c6e6a4f 100644 --- a/fs/xfs/xfs_trans.h +++ b/fs/xfs/xfs_trans.h | |||
@@ -39,13 +39,9 @@ typedef struct xfs_trans_header { | |||
39 | /* | 39 | /* |
40 | * Log item types. | 40 | * Log item types. |
41 | */ | 41 | */ |
42 | #define XFS_LI_5_3_BUF 0x1234 /* v1 bufs, 1-block inode buffers */ | ||
43 | #define XFS_LI_5_3_INODE 0x1235 /* 1-block inode buffers */ | ||
44 | #define XFS_LI_EFI 0x1236 | 42 | #define XFS_LI_EFI 0x1236 |
45 | #define XFS_LI_EFD 0x1237 | 43 | #define XFS_LI_EFD 0x1237 |
46 | #define XFS_LI_IUNLINK 0x1238 | 44 | #define XFS_LI_IUNLINK 0x1238 |
47 | #define XFS_LI_6_1_INODE 0x1239 /* 4K non-aligned inode bufs */ | ||
48 | #define XFS_LI_6_1_BUF 0x123a /* v1, 4K inode buffers */ | ||
49 | #define XFS_LI_INODE 0x123b /* aligned ino chunks, var-size ibufs */ | 45 | #define XFS_LI_INODE 0x123b /* aligned ino chunks, var-size ibufs */ |
50 | #define XFS_LI_BUF 0x123c /* v2 bufs, variable sized inode bufs */ | 46 | #define XFS_LI_BUF 0x123c /* v2 bufs, variable sized inode bufs */ |
51 | #define XFS_LI_DQUOT 0x123d | 47 | #define XFS_LI_DQUOT 0x123d |