Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus-v3.10-rc6' of git://oss.sgi.com/xfs/xfs

Pull xfs fixes from Ben Myers:
- Remove noisy warnings about experimental support which spams the logs
- Add padding to align directory and attr structures correctly
- Set block number on child buffer on a root btree split
- Disable verifiers during log recovery for non-CRC filesystems

* tag 'for-linus-v3.10-rc6' of git://oss.sgi.com/xfs/xfs:
xfs: don't shutdown log recovery on validation errors
xfs: ensure btree root split sets blkno correctly
xfs: fix implicit padding in directory and attr CRC formats
xfs: don't emit v5 superblock warnings on write

+42 -11
+1
fs/xfs/xfs_attr_leaf.h
··· 128 128 __u8 holes; 129 129 __u8 pad1; 130 130 struct xfs_attr_leaf_map freemap[XFS_ATTR_LEAF_MAPSIZE]; 131 + __be32 pad2; /* 64 bit alignment */ 131 132 }; 132 133 133 134 #define XFS_ATTR3_LEAF_CRC_OFF (offsetof(struct xfs_attr3_leaf_hdr, info.crc))
+10
fs/xfs/xfs_btree.c
··· 2544 2544 if (error) 2545 2545 goto error0; 2546 2546 2547 + /* 2548 + * we can't just memcpy() the root in for CRC enabled btree blocks. 2549 + * In that case have to also ensure the blkno remains correct 2550 + */ 2547 2551 memcpy(cblock, block, xfs_btree_block_len(cur)); 2552 + if (cur->bc_flags & XFS_BTREE_CRC_BLOCKS) { 2553 + if (cur->bc_flags & XFS_BTREE_LONG_PTRS) 2554 + cblock->bb_u.l.bb_blkno = cpu_to_be64(cbp->b_bn); 2555 + else 2556 + cblock->bb_u.s.bb_blkno = cpu_to_be64(cbp->b_bn); 2557 + } 2548 2558 2549 2559 be16_add_cpu(&block->bb_level, 1); 2550 2560 xfs_btree_set_numrecs(block, 1);
+3 -2
fs/xfs/xfs_dir2_format.h
··· 266 266 struct xfs_dir3_data_hdr { 267 267 struct xfs_dir3_blk_hdr hdr; 268 268 xfs_dir2_data_free_t best_free[XFS_DIR2_DATA_FD_COUNT]; 269 + __be32 pad; /* 64 bit alignment */ 269 270 }; 270 271 271 272 #define XFS_DIR3_DATA_CRC_OFF offsetof(struct xfs_dir3_data_hdr, hdr.crc) ··· 478 477 struct xfs_da3_blkinfo info; /* header for da routines */ 479 478 __be16 count; /* count of entries */ 480 479 __be16 stale; /* count of stale entries */ 481 - __be32 pad; 480 + __be32 pad; /* 64 bit alignment */ 482 481 }; 483 482 484 483 struct xfs_dir3_icleaf_hdr { ··· 716 715 __be32 firstdb; /* db of first entry */ 717 716 __be32 nvalid; /* count of valid entries */ 718 717 __be32 nused; /* count of used entries */ 719 - __be32 pad; /* 64 bit alignment. */ 718 + __be32 pad; /* 64 bit alignment */ 720 719 }; 721 720 722 721 struct xfs_dir3_free {
+17 -2
fs/xfs/xfs_log_recover.c
··· 1845 1845 xfs_agino_t *buffer_nextp; 1846 1846 1847 1847 trace_xfs_log_recover_buf_inode_buf(mp->m_log, buf_f); 1848 - bp->b_ops = &xfs_inode_buf_ops; 1848 + 1849 + /* 1850 + * Post recovery validation only works properly on CRC enabled 1851 + * filesystems. 1852 + */ 1853 + if (xfs_sb_version_hascrc(&mp->m_sb)) 1854 + bp->b_ops = &xfs_inode_buf_ops; 1849 1855 1850 1856 inodes_per_buf = BBTOB(bp->b_io_length) >> mp->m_sb.sb_inodelog; 1851 1857 for (i = 0; i < inodes_per_buf; i++) { ··· 2211 2205 /* Shouldn't be any more regions */ 2212 2206 ASSERT(i == item->ri_total); 2213 2207 2214 - xlog_recovery_validate_buf_type(mp, bp, buf_f); 2208 + /* 2209 + * We can only do post recovery validation on items on CRC enabled 2210 + * fielsystems as we need to know when the buffer was written to be able 2211 + * to determine if we should have replayed the item. If we replay old 2212 + * metadata over a newer buffer, then it will enter a temporarily 2213 + * inconsistent state resulting in verification failures. Hence for now 2214 + * just avoid the verification stage for non-crc filesystems 2215 + */ 2216 + if (xfs_sb_version_hascrc(&mp->m_sb)) 2217 + xlog_recovery_validate_buf_type(mp, bp, buf_f); 2215 2218 } 2216 2219 2217 2220 /*
+11 -7
fs/xfs/xfs_mount.c
··· 314 314 xfs_mount_validate_sb( 315 315 xfs_mount_t *mp, 316 316 xfs_sb_t *sbp, 317 - bool check_inprogress) 317 + bool check_inprogress, 318 + bool check_version) 318 319 { 319 320 320 321 /* ··· 338 337 339 338 /* 340 339 * Version 5 superblock feature mask validation. Reject combinations the 341 - * kernel cannot support up front before checking anything else. 340 + * kernel cannot support up front before checking anything else. For 341 + * write validation, we don't need to check feature masks. 342 342 */ 343 - if (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5) { 343 + if (check_version && XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5) { 344 344 xfs_alert(mp, 345 345 "Version 5 superblock detected. This kernel has EXPERIMENTAL support enabled!\n" 346 346 "Use of these features in this kernel is at your own risk!"); ··· 677 675 678 676 static int 679 677 xfs_sb_verify( 680 - struct xfs_buf *bp) 678 + struct xfs_buf *bp, 679 + bool check_version) 681 680 { 682 681 struct xfs_mount *mp = bp->b_target->bt_mount; 683 682 struct xfs_sb sb; ··· 689 686 * Only check the in progress field for the primary superblock as 690 687 * mkfs.xfs doesn't clear it from secondary superblocks. 691 688 */ 692 - return xfs_mount_validate_sb(mp, &sb, bp->b_bn == XFS_SB_DADDR); 689 + return xfs_mount_validate_sb(mp, &sb, bp->b_bn == XFS_SB_DADDR, 690 + check_version); 693 691 } 694 692 695 693 /* ··· 723 719 goto out_error; 724 720 } 725 721 } 726 - error = xfs_sb_verify(bp); 722 + error = xfs_sb_verify(bp, true); 727 723 728 724 out_error: 729 725 if (error) { ··· 762 758 struct xfs_buf_log_item *bip = bp->b_fspriv; 763 759 int error; 764 760 765 - error = xfs_sb_verify(bp); 761 + error = xfs_sb_verify(bp, false); 766 762 if (error) { 767 763 XFS_CORRUPTION_ERROR(__func__, XFS_ERRLEVEL_LOW, mp, bp->b_addr); 768 764 xfs_buf_ioerror(bp, error);