From 3bd5a428cdae079f7f2c0c873b5ec48220e11e3a Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 06 2019 11:14:19 +0000 Subject: import xfsprogs-4.5.0-20.el7 --- diff --git a/SOURCES/xfsprogs-4.20-xfs_quota-fix-false-error-reporting-of-project-inhertance-flag.patch b/SOURCES/xfsprogs-4.20-xfs_quota-fix-false-error-reporting-of-project-inhertance-flag.patch new file mode 100644 index 0000000..4eeb402 --- /dev/null +++ b/SOURCES/xfsprogs-4.20-xfs_quota-fix-false-error-reporting-of-project-inhertance-flag.patch @@ -0,0 +1,43 @@ +From b136f48b19a5b8e788aceb4b80e97d6ae9edd0ea Mon Sep 17 00:00:00 2001 +From: Achilles Gaikwad +Date: Mon, 28 Jan 2019 13:03:08 -0600 +Subject: [PATCH] xfs_quota: fix false error reporting of project inheritance + flag is not set + +After kernel commit: + +9336e3a7 "xfs: project id inheritance is a directory only flag" + +xfs stopped setting the project inheritance flag on regular files, but +userspace quota code still checks for it and will now issue the error: + +"project inheritance flag is not set" + +for every regular file during quotacheck. Fix this by only checking +for the flag on directories. + +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1663502 +Reported-by: Steven Gardner +Signed-off-by: Achilles Gaikwad +Reviewed-by: Darrick J. Wong +Signed-off-by: Eric Sandeen +--- + quota/project.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/quota/project.c b/quota/project.c +index 78ede9e..7c22947 100644 +--- a/quota/project.c ++++ b/quota/project.c +@@ -114,7 +114,7 @@ check_project( + printf(_("%s - project identifier is not set" + " (inode=%u, tree=%u)\n"), + path, fsx.fsx_projid, (unsigned int)prid); +- if (!(fsx.fsx_xflags & FS_XFLAG_PROJINHERIT)) ++ if (!(fsx.fsx_xflags & FS_XFLAG_PROJINHERIT) && S_ISDIR(stat->st_mode)) + printf(_("%s - project inheritance flag is not set\n"), + path); + } +-- +2.9.5 + diff --git a/SOURCES/xfsprogs-4.20-xfs_repair-initialize-non-leaf-finobt-blocks-with-co.patch b/SOURCES/xfsprogs-4.20-xfs_repair-initialize-non-leaf-finobt-blocks-with-co.patch new file mode 100644 index 0000000..d210b1a --- /dev/null +++ b/SOURCES/xfsprogs-4.20-xfs_repair-initialize-non-leaf-finobt-blocks-with-co.patch @@ -0,0 +1,75 @@ +From 051dae5efb4fc7c1c47ccb72ff161241fb0815ee Mon Sep 17 00:00:00 2001 +From: Brian Foster +Date: Mon, 28 Jan 2019 16:05:16 -0600 +Subject: [PATCH] xfs_repair: initialize non-leaf finobt blocks with correct magic + +The free inode btree construction code in xfs_repair has a bug where +any non-leaf nodes outside of the leftmost block at the associated +level in the tree are incorrectly initialized with the inobt magic +value. Update the prop_ino_cursor() path responsible for growing the +non-leaf portion of the inode btrees to use the btnum of the +specific tree being generated rather than the hardcoded inode btree +type. + +Signed-off-by: Brian Foster +Reported-by: Lucas Stach +Root-caused-by: Lucas Stach +Reviewed-by: Eric Sandeen +Reviewed-by: Dave Chinner +Signed-off-by: Eric Sandeen +--- + +(backported for RHEL7) + +--- xfsprogs-4.5.0/repair/phase5.c 2016-02-28 17:39:26.000000000 -0600 ++++ xfsprogs-4.5.0-mine/repair/phase5.c 2019-02-05 11:18:28.046228329 -0600 +@@ -1003,7 +1003,7 @@ init_ino_cursor(xfs_mount_t *mp, xfs_agn + + static void + prop_ino_cursor(xfs_mount_t *mp, xfs_agnumber_t agno, bt_status_t *btree_curs, +- xfs_agino_t startino, int level) ++ __uint32_t magic, xfs_agino_t startino, int level) + { + struct xfs_btree_block *bt_hdr; + xfs_inobt_key_t *bt_key; +@@ -1025,7 +1025,7 @@ prop_ino_cursor(xfs_mount_t *mp, xfs_agn + * first path up the left side of the tree + * where the agbno's are already set up + */ +- prop_ino_cursor(mp, agno, btree_curs, startino, level); ++ prop_ino_cursor(mp, agno, btree_curs, magic, startino, level); + } + + if (be16_to_cpu(bt_hdr->bb_numrecs) == +@@ -1062,11 +1062,11 @@ prop_ino_cursor(xfs_mount_t *mp, xfs_agn + bt_hdr = XFS_BUF_TO_BLOCK(lptr->buf_p); + memset(bt_hdr, 0, mp->m_sb.sb_blocksize); + if (xfs_sb_version_hascrc(&mp->m_sb)) +- xfs_btree_init_block(mp, lptr->buf_p, XFS_IBT_CRC_MAGIC, ++ xfs_btree_init_block(mp, lptr->buf_p, magic, + level, 0, agno, + XFS_BTREE_CRC_BLOCKS); + else +- xfs_btree_init_block(mp, lptr->buf_p, XFS_IBT_MAGIC, ++ xfs_btree_init_block(mp, lptr->buf_p, magic, + level, 0, agno, 0); + + bt_hdr->bb_u.s.bb_leftsib = cpu_to_be32(lptr->prev_agbno); +@@ -1074,7 +1074,7 @@ prop_ino_cursor(xfs_mount_t *mp, xfs_agn + /* + * propagate extent record for first extent in new block up + */ +- prop_ino_cursor(mp, agno, btree_curs, startino, level); ++ prop_ino_cursor(mp, agno, btree_curs, magic, startino, level); + } + /* + * add inode info to current block +@@ -1236,7 +1236,7 @@ build_ino_tree(xfs_mount_t *mp, xfs_agnu + lptr->modulo--; + + if (lptr->num_recs_pb > 0) +- prop_ino_cursor(mp, agno, btree_curs, ++ prop_ino_cursor(mp, agno, btree_curs, magic, + ino_rec->ino_startnum, 0); + + bt_rec = (xfs_inobt_rec_t *) diff --git a/SPECS/xfsprogs.spec b/SPECS/xfsprogs.spec index 0fe5982..b638f3a 100644 --- a/SPECS/xfsprogs.spec +++ b/SPECS/xfsprogs.spec @@ -1,7 +1,7 @@ Summary: Utilities for managing the XFS filesystem Name: xfsprogs Version: 4.5.0 -Release: 19%{?dist} +Release: 20%{?dist} # Licensing based on generic "GNU GENERAL PUBLIC LICENSE" # in source, with no mention of version. # doc/COPYING file specifies what is GPL and what is LGPL @@ -55,7 +55,11 @@ Patch29: xfsprogs-4.15.0-xfsprogs-update-dead-urls.patch Patch30: xfsprogs-4.17.0-xfsprogs-be-careful-about-what-we-stat-in-platform_c.patch Patch31: xfsprogs-4.17.0-xfs_io-add-label-command.patch Patch32: xfsprogs-4.18-repair-root-parent.patch +# RHEL-7.7 Patch33: xfsprogs-4.15.0-xfs_copy-accept-CRC-version-of-ABTB_MAGIC-in-ASSERT.patch +Patch34: xfsprogs-4.20-xfs_quota-fix-false-error-reporting-of-project-inhertance-flag.patch +Patch35: xfsprogs-4.20-xfs_repair-initialize-non-leaf-finobt-blocks-with-co.patch + %description A set of commands to use the XFS filesystem, including mkfs.xfs. @@ -116,6 +120,8 @@ also want to install xfsprogs. %patch31 -p1 %patch32 -p1 %patch33 -p1 +%patch34 -p1 +%patch35 -p1 %build export tagname=CC @@ -181,6 +187,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/*.so %changelog +* Mon Feb 11 2019 Eric Sandeen 4.5.0-20 +- xfs_quota: fix errors if project flag is not set on regular files (#1663502) +- xfs_repair: initialize non-leaf finobt blocks with correct magic (#1670154) + * Mon Feb 11 2019 Eric Sandeen 4.5.0-19 - xfs_copy: accept CRC version of ABTB_MAGIC in ASSERT (#1641023)