Skip to content

xfsprogs: Initial CRC support

Dave Chinner linux-xfs 1 version Applied

Status from this message: Applied to the master branch.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest30 patches 11 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/30mkfs: fix realtime device initialisationmkfs/proto.c+2 -01 reply
2/30logprint: fix wrapped log dump issue.logprint/log_misc.c+32 -170 replies
3/30libxfs: add crc format changes to generic btreesinclude/libxfs.h include/xfs_alloc_btree.h include/xfs_bmap_btree.h +16 more+587 -2200 replies
4/30xfsprogs: add crc format chagnes to ag headersinclude/xfs_ag.h include/xfs_buf_item.h libxfs/xfs_alloc.c +1 more+231 -830 replies
5/30xfsprogs: Support new AGFL formatdb/check.c db/freesp.c repair/phase5.c +1 more+18 -70 replies
6/30libxfs: change quota buffer formatsinclude/xfs_quota.h+10 -10 replies
7/30libxfs: add version 3 inode supportdb/dir2sf.c include/xfs_buf_item.h include/xfs_dinode.h +8 more+255 -300 replies
8/30libxfs: add support for crc headers on remote symlinksinclude/Makefile include/libxfs.h include/xfs_buf_item.h +3 more+204 -40 replies
9/30xfs: add CRC checks to block format directory blocksinclude/xfs_dir2_format.h libxfs/xfs_dir2_block.c libxfs/xfs_dir2_data.c +4 more+346 -1090 replies
10/30xfs: add CRC checking to dir2 free blocksdb/check.c include/xfs_dir2_format.h libxfs/xfs_dir2_leaf.c +2 more+384 -1640 replies
11/30xfs: add CRC checking to dir2 data blocksinclude/xfs_dir2_format.h libxfs/xfs_dir2_block.c libxfs/xfs_dir2_data.c +3 more+152 -970 replies
12/30xfs: add CRC checking to dir2 leaf blocksdb/check.c db/dir2.c include/xfs_da_btree.h +8 more+938 -5320 replies
13/30xfs: shortform directory offsets change for dir3 formatdb/check.c include/xfs_dir2_format.h libxfs/xfs_dir2_sf.c +1 more+22 -180 replies
14/30xfs: add CRCs to dir2/da node blocksdb/attr.c db/check.c db/dir2.c +7 more+1066 -7000 replies
15/30xfs: add CRCs to attr leaf blocksdb/attr.c db/dir2.c db/metadump.c +6 more+1034 -7510 replies
16/30xfs: split remote attribute code outinclude/libxfs.h include/xfs_attr_remote.h libxfs/Makefile +3 more+346 -2990 replies
17/30xfs: add CRC protection to remote attributesinclude/xfs_attr_remote.h libxfs/xfs_attr_remote.c+290 -500 replies
18/30xfs: add buffer types to directory and attribute buffersinclude/xfs_attr_remote.h include/xfs_buf_item.h include/xfs_da_btree.h +9 more+127 -160 replies
19/30xfs: buffer type overruns blf_flags fieldinclude/xfs_buf_item.h include/xfs_trans.h libxfs/trans.c +10 more+86 -760 replies
20/30xfs: add CRC checks to the superblockinclude/xfs_mount.h include/xfs_sb.h libxfs/xfs_mount.c+153 -400 replies
21/30xfs: implement extended feature masksinclude/xfs_sb.h libxfs/xfs_mount.c logprint/log_print_trans.c+125 -160 replies
22/30xfsprogs: Add verifiers to libxfs buffer interfaces.copy/xfs_copy.c db/sb.c include/libxfs.h +22 more+381 -2120 replies
23/30patch xfsprogs-mkfs-crc-support-2libxfs/xfs_mount.c libxfs/xfs_symlink.c mkfs/maxtrres.c +2 more+111 -330 replies
24/30xfsprogs: add crc format support to repairinclude/libxfs.h include/xfs_alloc_btree.h include/xfs_bmap_btree.h +17 more+422 -2150 replies
25/30xfs_repair: update for dir/attr crc format changes.include/xfs_attr_leaf.h include/xfs_dir2_format.h libxfs/xfs_dir2_priv.h +4 more+126 -960 replies
26/30xfsprogs: disable xfs_check for CRC enabled filesystemsdb/check.c+14 -00 replies
27/30xfs_db: disable modification for CRC enabled filessytems.db/init.c+15 -00 replies
28/30libxfs: determine inode size from version number, not struct xfs_dinodeinclude/xfs_inode.h logprint/log_misc.c logprint/log_print_all.c +1 more+8 -110 replies
29/30xfsdb: support version 5 superblock in versionnum commanddb/sb.c+41 -50 replies
30/30xfsprogs: add crc format support to dbdb/agf.c db/agfl.c db/agfl.h +12 more+276 -50 replies

Reviews trailers per patch

1 of 30 patches has a Reviewed-by or Acked-by.

PatchBen Myers
1/30R-b
2/30
3/30
4/30
5/30
6/30
7/30
8/30
9/30
10/30
11/30
12/30
13/30
14/30
15/30
16/30
17/30
18/30
19/30
20/30
21/30
22/30
23/30
24/30
25/30
26/30
27/30
28/30
29/30
30/30

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/30] xfsprogs: Initial CRC support

Hi Folks,

This is the first real "works ok" CRC patchset for xfsprogs. It provides full support for mkfs.xfs and xfs_repair, and partial read-only support for xfs_db.

For mkfs.xfs, it does everything properly, and filesystems that are freshly made also run cleanly through xfs_repair and mount and run just fine.

For xfs_repair, it reads and writes all metadata with CRC checks, calculations and validation just like the kernel code does, but it currently silently ignores the validation done in the IO layer. Enabling that is future work - it involves adding buffer error checking to every libxfs_readbuf() call that is made, and we do none of that right now. It does, however, fully validate all the non-CRC format metadata just as it does for non-CRC filesystems, and so the coverage it has is the same for both CRC and non-CRC filesystems.

For xfs_db, there is read-only support for looking at the filesystem as the xfs_db IO stack does not support CRCs at all. We need to convert xfs_db to use the libxfs infrastructure to enable that. Apart from that, xfs_db has partial support for the extended metadata fields - the directory/attribute blocks don't have extended support yet, but everything else does.

xfs_check is made special. It currently detects a version 5 superblock, and immediately exits with success. Hence it always says CRC enabled filesystems are OK. This is a temporary change that enables running xfstests without full support in xfs_db for all the new metadata structures (like headers in remote symlink and attribute blocks). Depending on if we want to keep xfs-check useful for xfstests, we can revisit this bypass hack once xfs_db has been converted to use the libxfs IO engine.

Overall, xfstests is now running enough to start to find bugs in the kernel CRC code - I'm mainly hitting remote attribute block bugs right now (generic/117!) but there's certainly less problems being reported than I expected.

Oh, and I've tested it with external log devices and real time devices, too.

Comments, thoughts, flames, and testing all welcome!

Cheers,

Dave.

$ git diff --minimal --stat --summary 8e78288..
 copy/xfs_copy.c            |    4 +-
 db/agf.c                   |    3 +
 db/agfl.c                  |   16 +
 db/agfl.h                  |    2 +
 db/agi.c                   |    3 +
 db/attr.c                  |   20 +-
 db/btblock.c               |  145 +++++
 db/btblock.h               |   10 +
 db/check.c                 |   34 +-
 db/dir2.c                  |   10 +-
 db/dir2sf.c                |    9 +-
 db/field.c                 |   16 +
 db/field.h                 |    8 +
 db/freesp.c                |   13 +-
 db/init.c                  |   19 +
 db/inode.c                 |   27 +
 db/inode.h                 |    3 +
 db/metadump.c              |    4 +-
 db/sb.c                    |   54 +-
 db/type.c                  |   34 +-
 db/type.h                  |    3 +-
 include/Makefile           |    4 +-
 include/libxfs.h           |  118 ++--
 include/libxlog.h          |    2 +-
 include/xfs_ag.h           |   54 +-
 include/xfs_alloc_btree.h  |   13 +-
 include/xfs_attr_leaf.h    |  124 +++-
 include/xfs_attr_remote.h  |   52 ++
 include/xfs_bmap_btree.h   |   20 +-
 include/xfs_btree.h        |   63 +-
 include/xfs_buf_item.h     |   64 +-
 include/xfs_da_btree.h     |  130 +++-
 include/xfs_dinode.h       |   37 +-
 include/xfs_dir2.h         |    7 +
 include/xfs_dir2_format.h  |  293 ++++++++-
 include/xfs_ialloc_btree.h |   10 +-
 include/xfs_inode.h        |   26 +
 include/xfs_mount.h        |    1 +
 include/xfs_quota.h        |   11 +-
 include/xfs_sb.h           |  166 ++++-
 include/xfs_symlink.h      |   45 ++
 libxfs/Makefile            |    4 +-
 libxfs/init.c              |   84 ++-
 libxfs/logitem.c           |    4 +-
 libxfs/rdwr.c              |  236 ++++---
 libxfs/trans.c             |   17 +-
 libxfs/util.c              |   29 +-
 libxfs/xfs.h               |   37 +-
 libxfs/xfs_alloc.c         |  202 ++++--
 libxfs/xfs_alloc_btree.c   |   99 ++-
 libxfs/xfs_attr.c          |  386 ++----------
 libxfs/xfs_attr_leaf.c     | 1553 ++++++++++++++++++++++++++--------------------
 libxfs/xfs_attr_remote.c   |  527 ++++++++++++++++
 libxfs/xfs_bmap.c          |   49 +-
 libxfs/xfs_bmap_btree.c    |  107 +++-
 libxfs/xfs_btree.c         |  255 ++++++--
 libxfs/xfs_da_btree.c      | 1499 +++++++++++++++++++++++++++-----------------
 libxfs/xfs_dir2_block.c    |  171 +++--
 libxfs/xfs_dir2_data.c     |  266 +++++---
 libxfs/xfs_dir2_leaf.c     |  880 ++++++++++++++++----------
 libxfs/xfs_dir2_node.c     | 1007 +++++++++++++++++++-----------
 libxfs/xfs_dir2_priv.h     |   46 +-
 libxfs/xfs_dir2_sf.c       |    8 +-
 libxfs/xfs_ialloc.c        |   78 ++-
 libxfs/xfs_ialloc_btree.c  |   80 ++-
 libxfs/xfs_inode.c         |  124 +++-
 libxfs/xfs_mount.c         |  137 +++-
 libxfs/xfs_symlink.c       |  154 +++++
 logprint/log_misc.c        |   51 +-
 logprint/log_print_all.c   |    3 +-
 logprint/log_print_trans.c |   18 +
 logprint/logprint.c        |    4 +-
 mdrestore/Makefile         |    2 +-
 mkfs/maxtrres.c            |    4 +-
 mkfs/proto.c               |    6 +-
 mkfs/xfs_mkfs.c            |  170 +++--
 mkfs/xfs_mkfs.h            |   12 +-
 repair/agheader.c          |   36 +-
 repair/attr_repair.c       |  173 +++---
 repair/dino_chunks.c       |   13 +-
 repair/dinode.c            |  200 +++---
 repair/dir2.c              |  167 ++---
 repair/dir2.h              |    6 +-
 repair/phase2.c            |    8 +-
 repair/phase3.c            |    2 +-
 repair/phase5.c            |  156 +++--
 repair/phase6.c            |  172 +++--
 repair/prefetch.c          |    9 +-
 repair/rt.c                |    4 +-
 repair/scan.c              |  169 ++---
 repair/scan.h              |   12 +-
 repair/versions.c          |    2 +-
 repair/xfs_repair.c        |    8 +-
 93 files changed, 7559 insertions(+), 3564 deletions(-)
 create mode 100644 include/xfs_attr_remote.h
 create mode 100644 include/xfs_symlink.h
 create mode 100644 libxfs/xfs_attr_remote.c
 create mode 100644 libxfs/xfs_symlink.c

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs