diff --git a/SOURCES/xfsprogs-4.11.0-xfs_repair-warn-about-dirty-log-with-n-option.patch b/SOURCES/xfsprogs-4.11.0-xfs_repair-warn-about-dirty-log-with-n-option.patch new file mode 100644 index 0000000..2f659b8 --- /dev/null +++ b/SOURCES/xfsprogs-4.11.0-xfs_repair-warn-about-dirty-log-with-n-option.patch @@ -0,0 +1,39 @@ +From 47e48705ed893ca9f46adb02ad15e5acddbe060a Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Mon, 10 Apr 2017 17:32:04 -0500 +Subject: [PATCH] xfs_repair: warn about dirty log with -n option + +When looking at xfs_repair -n output today, we have no idea if +reported errors may be due to an un-replayed dirty log. If this +is the case, mention it in the output. + +Signed-off-by: Eric Sandeen +Reviewed-by: Darrick J. Wong +Signed-off-by: Eric Sandeen +--- + repair/phase2.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +Index: xfsprogs-4.5.0/repair/phase2.c +=================================================================== +--- xfsprogs-4.5.0.orig/repair/phase2.c ++++ xfsprogs-4.5.0/repair/phase2.c +@@ -89,11 +89,16 @@ zero_log( + _("zero_log: head block %" PRId64 " tail block %" PRId64 "\n"), + head_blk, tail_blk); + } +- if (!no_modify && head_blk != tail_blk) { +- if (zap_log) { ++ if (head_blk != tail_blk) { ++ if (!no_modify && zap_log) { + do_warn(_( + "ALERT: The filesystem has valuable metadata changes in a log which is being\n" + "destroyed because the -L option was used.\n")); ++ } else if (no_modify) { ++ do_warn(_( ++"ALERT: The filesystem has valuable metadata changes in a log which is being\n" ++"ignored because the -n option was used. Expect spurious inconsistencies\n" ++"which may be resolved by first mounting the filesystem to replay the log.\n")); + } else { + do_warn(_( + "ERROR: The filesystem has valuable metadata changes in a log which needs to\n" diff --git a/SOURCES/xfsprogs-4.12.0-mkfs.xfs-allow-specification-of-0-data-stripe-width-.patch b/SOURCES/xfsprogs-4.12.0-mkfs.xfs-allow-specification-of-0-data-stripe-width-.patch new file mode 100644 index 0000000..d388d39 --- /dev/null +++ b/SOURCES/xfsprogs-4.12.0-mkfs.xfs-allow-specification-of-0-data-stripe-width-.patch @@ -0,0 +1,86 @@ +From 746d40a73162f942f63f6a2f612f491d107b9824 Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Thu, 20 Jul 2017 10:51:34 -0500 +Subject: [PATCH] mkfs.xfs: allow specification of 0 data stripe width & unit + +The "noalign" option works for this too, but it seems reasonable +to allow explicit specification of stripe unit and stripe width +to 0; today, doing so today makes the code think it's unspecified, +and so it goes ahead and detects stripe geometry and sets it in the +superblock. That's unexpected and surprising. + +Create a new flag that tracks whtether a geometry option has been +specified, and if it's set along with 0 values, treat it the +same as if "noalign" had been specified. + +Signed-off-by: Eric Sandeen +Reviewed-by: Christoph Hellwig +Signed-off-by: Eric Sandeen +--- + mkfs/xfs_mkfs.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +Index: xfsprogs-rhel7.5/mkfs/xfs_mkfs.c +=================================================================== +--- xfsprogs-rhel7.5.orig/mkfs/xfs_mkfs.c ++++ xfsprogs-rhel7.5/mkfs/xfs_mkfs.c +@@ -909,6 +909,7 @@ main( + int dsw; + int dsunit; + int dswidth; ++ int dsflag; + int force_overwrite; + struct fsxattr fsx; + int iaflag; +@@ -1012,7 +1013,7 @@ main( + dfile = logfile = rtfile = NULL; + dsize = logsize = rtsize = rtextsize = protofile = NULL; + dsu = dsw = dsunit = dswidth = lalign = lsu = lsunit = 0; +- nodsflag = norsflag = 0; ++ dsflag = nodsflag = norsflag = 0; + force_overwrite = 0; + worst_freelist = 0; + lazy_sb_counters = 1; +@@ -1137,6 +1138,7 @@ main( + exit(1); + } + dsunit = cvtnum(0, 0, value); ++ dsflag = 1; + break; + case D_SWIDTH: + if (!value || *value == '\0') +@@ -1153,6 +1155,7 @@ main( + exit(1); + } + dswidth = cvtnum(0, 0, value); ++ dsflag = 1; + break; + case D_SU: + if (!value || *value == '\0') +@@ -1164,6 +1167,7 @@ main( + D_SU); + dsu = cvtnum( + blocksize, sectorsize, value); ++ dsflag = 1; + break; + case D_SW: + if (!value || *value == '\0') +@@ -1180,6 +1184,7 @@ main( + exit(1); + } + dsw = cvtnum(0, 0, value); ++ dsflag = 1; + break; + case D_NOALIGN: + if (dsu) +@@ -2078,6 +2083,10 @@ _("warning: sparse inodes not supported + calc_stripe_factors(dsu, dsw, sectorsize, lsu, lsectorsize, + &dsunit, &dswidth, &lsunit); + ++ /* If sunit & swidth were manually specified as 0, same as noalign */ ++ if (dsflag && !dsunit && !dswidth) ++ nodsflag = 1; ++ + xi.setblksize = sectorsize; + + /* diff --git a/SOURCES/xfsprogs-4.12.0-xfs_db-improve-argument-naming-in-set_cur-and-set_io.patch b/SOURCES/xfsprogs-4.12.0-xfs_db-improve-argument-naming-in-set_cur-and-set_io.patch new file mode 100644 index 0000000..0781351 --- /dev/null +++ b/SOURCES/xfsprogs-4.12.0-xfs_db-improve-argument-naming-in-set_cur-and-set_io.patch @@ -0,0 +1,148 @@ +From db23e0f431a77d228b5f68ef0a8587c25c689133 Mon Sep 17 00:00:00 2001 +From: Bill O'Donnell +Date: Thu, 29 Jun 2017 13:05:00 -0500 +Subject: [PATCH] xfs_db: improve argument naming in set_cur and set_iocur_type + +In set_cur and set_iocur_type, the current naming for arguments +type, block number, and length are t, d, and c, respectively. +Replace these with more intuitive and descriptive names: +type, blknum, and len. Fix type of blknum (xfs_daddr_t) to be +consistent with that of libxfs_readbuf where it's used. +Additionally remove extra blank line in io.c. + +Signed-off-by: Bill O'Donnell +Reviewed-by: Eric Sandeen +Signed-off-by: Eric Sandeen +--- + db/io.c | 38 +++++++++++++++++++------------------- + db/io.h | 6 +++--- + 2 files changed, 22 insertions(+), 22 deletions(-) + +Index: xfsprogs-rhel7.5/db/io.c +=================================================================== +--- xfsprogs-rhel7.5.orig/db/io.c ++++ xfsprogs-rhel7.5/db/io.c +@@ -487,9 +487,9 @@ write_cur(void) + + void + set_cur( +- const typ_t *t, +- __int64_t d, +- int c, ++ const typ_t *type, ++ xfs_daddr_t blknum, ++ int len, + int ring_flag, + bbmap_t *bbmap) + { +@@ -497,14 +497,13 @@ set_cur( + xfs_ino_t dirino; + xfs_ino_t ino; + __uint16_t mode; +- const struct xfs_buf_ops *ops = t ? t->bops : NULL; ++ const struct xfs_buf_ops *ops = type ? type->bops : NULL; + + if (iocur_sp < 0) { + dbprintf(_("set_cur no stack element to set\n")); + return; + } + +- + ino = iocur_top->ino; + dirino = iocur_top->dirino; + mode = iocur_top->mode; +@@ -514,7 +513,7 @@ set_cur( + if (bbmap) { + #ifdef DEBUG_BBMAP + int i; +- printf(_("xfs_db got a bbmap for %lld\n"), (long long)d); ++ printf(_("xfs_db got a bbmap for %lld\n"), (long long)blknum); + printf(_("\tblock map")); + for (i = 0; i < bbmap->nmaps; i++) + printf(" %lld:%d", (long long)bbmap->b[i].bm_bn, +@@ -528,7 +527,7 @@ set_cur( + bp = libxfs_readbuf_map(mp->m_ddev_targp, bbmap->b, + bbmap->nmaps, 0, ops); + } else { +- bp = libxfs_readbuf(mp->m_ddev_targp, d, c, 0, ops); ++ bp = libxfs_readbuf(mp->m_ddev_targp, blknum, len, 0, ops); + iocur_top->bbmap = NULL; + } + +@@ -544,13 +543,13 @@ set_cur( + if (!ops) + bp->b_flags |= LIBXFS_B_UNCHECKED; + +- iocur_top->bb = d; +- iocur_top->blen = c; ++ iocur_top->bb = blknum; ++ iocur_top->blen = len; + iocur_top->boff = 0; + iocur_top->data = iocur_top->buf; +- iocur_top->len = BBTOB(c); +- iocur_top->off = d << BBSHIFT; +- iocur_top->typ = cur_typ = t; ++ iocur_top->len = BBTOB(len); ++ iocur_top->off = blknum << BBSHIFT; ++ iocur_top->typ = cur_typ = type; + iocur_top->ino = ino; + iocur_top->dirino = dirino; + iocur_top->mode = mode; +@@ -564,23 +563,24 @@ set_cur( + + void + set_iocur_type( +- const typ_t *t) ++ const typ_t *type) + { + struct xfs_buf *bp = iocur_top->bp; + + /* adjust buffer size for types with fields & hence fsize() */ +- if (t->fields) { ++ if (type->fields) { + int bb_count; /* type's size in basic blocks */ + +- bb_count = BTOBB(byteize(fsize(t->fields, iocur_top->data, 0, 0))); +- set_cur(t, iocur_top->bb, bb_count, DB_RING_IGN, NULL); ++ bb_count = BTOBB(byteize(fsize(type->fields, ++ iocur_top->data, 0, 0))); ++ set_cur(type, iocur_top->bb, bb_count, DB_RING_IGN, NULL); + } +- iocur_top->typ = t; ++ iocur_top->typ = type; + + /* verify the buffer if the type has one. */ + if (!bp) + return; +- if (!t->bops) { ++ if (!type->bops) { + bp->b_ops = NULL; + bp->b_flags |= LIBXFS_B_UNCHECKED; + return; +@@ -588,7 +588,7 @@ set_iocur_type( + if (!(bp->b_flags & LIBXFS_B_UPTODATE)) + return; + bp->b_error = 0; +- bp->b_ops = t->bops; ++ bp->b_ops = type->bops; + bp->b_ops->verify_read(bp); + bp->b_flags &= ~LIBXFS_B_UNCHECKED; + } +Index: xfsprogs-rhel7.5/db/io.h +=================================================================== +--- xfsprogs-rhel7.5.orig/db/io.h ++++ xfsprogs-rhel7.5/db/io.h +@@ -59,10 +59,10 @@ extern void print_iocur(char *tag, iocur + extern void push_cur(void); + extern int read_buf(__int64_t daddr, int count, void *bufp); + extern void write_cur(void); +-extern void set_cur(const struct typ *t, __int64_t d, int c, int ring_add, +- bbmap_t *bbmap); ++extern void set_cur(const struct typ *type, xfs_daddr_t blknum, ++ int len, int ring_add, bbmap_t *bbmap); + extern void ring_add(void); +-extern void set_iocur_type(const struct typ *t); ++extern void set_iocur_type(const struct typ *type); + extern void xfs_dummy_verify(struct xfs_buf *bp); + + /* diff --git a/SOURCES/xfsprogs-4.12.0-xfs_db-properly-set-inode-type.patch b/SOURCES/xfsprogs-4.12.0-xfs_db-properly-set-inode-type.patch new file mode 100644 index 0000000..5e66b34 --- /dev/null +++ b/SOURCES/xfsprogs-4.12.0-xfs_db-properly-set-inode-type.patch @@ -0,0 +1,58 @@ +From 533d1d229a881d5a58a232377c409a3dd7a5cd6f Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Thu, 20 Jul 2017 10:51:46 -0500 +Subject: [PATCH] xfs_db: properly set inode type + +When we set the type to "inode" the verifier validates multiple +inodes in the current fs block, so setting the buffer size to +that of just one inode is not sufficient and it'll emit spurious +verifier errors for all but the first, as we read off the end: + +xfs_db> daddr 99 +xfs_db> type inode +Metadata corruption detected at xfs_inode block 0x63/0x200 +Metadata corruption detected at xfs_inode block 0x63/0x200 +Metadata corruption detected at xfs_inode block 0x63/0x200 +Metadata corruption detected at xfs_inode block 0x63/0x200 +Metadata corruption detected at xfs_inode block 0x63/0x200 +Metadata corruption detected at xfs_inode block 0x63/0x200 +Metadata corruption detected at xfs_inode block 0x63/0x200 + +Use the special set_cur_inode() function for this purpose +as is done in inode_f(). + +Signed-off-by: Eric Sandeen +Reviewed-by: Bill O'Donnell +[sandeen: remove nag/warning printf for now] +Signed-off-by: Eric Sandeen +--- + db/io.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +Index: xfsprogs-rhel7.5/db/io.c +=================================================================== +--- xfsprogs-rhel7.5.orig/db/io.c ++++ xfsprogs-rhel7.5/db/io.c +@@ -567,6 +567,22 @@ set_iocur_type( + { + struct xfs_buf *bp = iocur_top->bp; + ++ /* Inodes are special; verifier checks all inodes in the chunk */ ++ if (type->typnm == TYP_INODE) { ++ xfs_daddr_t b = iocur_top->bb; ++ xfs_ino_t ino; ++ ++ /* ++ * Note that this will back up to the beginning of the inode ++ * which contains the current disk location; daddr may change. ++ */ ++ ino = XFS_AGINO_TO_INO(mp, xfs_daddr_to_agno(mp, b), ++ ((b << BBSHIFT) >> mp->m_sb.sb_inodelog) % ++ (mp->m_sb.sb_agblocks << mp->m_sb.sb_inopblog)); ++ set_cur_inode(ino); ++ return; ++ } ++ + /* adjust buffer size for types with fields & hence fsize() */ + if (type->fields) { + int bb_count; /* type's size in basic blocks */ diff --git a/SOURCES/xfsprogs-4.12.0-xfs_db-update-buffer-size-when-new-type-is-set.patch b/SOURCES/xfsprogs-4.12.0-xfs_db-update-buffer-size-when-new-type-is-set.patch new file mode 100644 index 0000000..42ed956 --- /dev/null +++ b/SOURCES/xfsprogs-4.12.0-xfs_db-update-buffer-size-when-new-type-is-set.patch @@ -0,0 +1,65 @@ +From 55f224baf83d71b3d2cc24e6387d9f1f6a5a1eda Mon Sep 17 00:00:00 2001 +From: Bill O'Donnell +Date: Thu, 29 Jun 2017 13:05:00 -0500 +Subject: [PATCH] xfs_db: update buffer size when new type is set + +xfs_db doesn't take sector size into account when setting type. +This can result in an errant crc. For example, with a sector size +of 4096: + +xfs_db> agi 0 +xfs_db> p crc +crc = 0xab85043e (correct) +xfs_db> daddr +current daddr is 16 +xfs_db> daddr 42 +xfs_db> daddr 16 +xfs_db> type agi +Metadata CRC error detected at xfs_agi block 0x10/0x200 +xfs_db> p crc +crc = 0xab85043e (bad) + +When xfs_db sets the new daddr in daddr_f, it does so with one +BBSIZE sector (512). Changing the type doesn't change the size +of the current buffer in iocur_top, so the checksum is calculated +on the wrong length for the type (when the actual sector size > BBSIZE (512). + +For types with fields, reread the buffer to pick up the correct size for +the new type when it gets set. Facilitate the reread by setting the cursor +with set_cur(). + +Signed-off-by: Bill O'Donnell +Reviewed-by: Carlos Maiolino +Reviewed-by: Darrick J. Wong +[sandeen: fix up long line, clarify subject & comments] +Signed-off-by: Eric Sandeen +--- + db/io.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +Index: xfsprogs-rhel7.5/db/io.c +=================================================================== +--- xfsprogs-rhel7.5.orig/db/io.c ++++ xfsprogs-rhel7.5/db/io.c +@@ -27,6 +27,7 @@ + #include "output.h" + #include "init.h" + #include "malloc.h" ++#include "bit.h" + + static int pop_f(int argc, char **argv); + static void pop_help(void); +@@ -567,6 +568,13 @@ set_iocur_type( + { + struct xfs_buf *bp = iocur_top->bp; + ++ /* adjust buffer size for types with fields & hence fsize() */ ++ if (t->fields) { ++ int bb_count; /* type's size in basic blocks */ ++ ++ bb_count = BTOBB(byteize(fsize(t->fields, iocur_top->data, 0, 0))); ++ set_cur(t, iocur_top->bb, bb_count, DB_RING_IGN, NULL); ++ } + iocur_top->typ = t; + + /* verify the buffer if the type has one. */ diff --git a/SOURCES/xfsprogs-4.13.0-mkfs.xfs-Don-t-stagger-AG-for-a-single-disk.patch b/SOURCES/xfsprogs-4.13.0-mkfs.xfs-Don-t-stagger-AG-for-a-single-disk.patch new file mode 100644 index 0000000..5fb2d7e --- /dev/null +++ b/SOURCES/xfsprogs-4.13.0-mkfs.xfs-Don-t-stagger-AG-for-a-single-disk.patch @@ -0,0 +1,54 @@ +From 9a106b5fbb88342f0ee02891d1bbb0e3c5a93d03 Mon Sep 17 00:00:00 2001 +From: Donald Douwsma +Date: Fri, 15 Sep 2017 08:33:42 -0500 +Subject: [PATCH] mkfs.xfs: Don't stagger AG for a single disk + +When sunit and swidth are used mkfs.xfs tries to avoid all allocation +groups aligning on the same stripe and will attempt to stagger them +across the stripes that make up swidth. If there is only one stripe +then there is no benefit in this optimisation. + +$ truncate -s10G xfs_10G_su256k_sw1.image +$ mkfs.xfs -d su=256k,sw=1 xfs_10G_su256k_sw1.image +meta-data=xfs_10G_su256k_sw1.image isize=512 agcount=16, agsize=163776 blks + = sectsz=512 attr=2, projid32bit=1 + = crc=1 finobt=0, sparse=0 +data = bsize=4096 blocks=2620416, imaxpct=25 + = sunit=64 swidth=64 blks +naming =version 2 bsize=4096 ascii-ci=0 ftype=1 +log =internal log bsize=4096 blocks=2560, version=2 + = sectsz=512 sunit=64 blks, lazy-count=1 +realtime =none extsz=4096 blocks=0, rtextents=0 + +A side effect of the optimisation is that the size adjustment used to stager +the allocation groups causes the last sunit of storage to be unused. + +$ echo $((2620416*4096)) +10733223936 +$ ls -l xfs_10G_su256k_sw1.image +-rw-rw-r--. 1 test test 10737418240 Aug 30 10:54 xfs_10G_su256k_sw1.image + +Skip this optimisation when sunit == swidth. + +Signed-off-by: Donald Douwsma +Reviewed-by: Eric Sandeen +Signed-off-by: Eric Sandeen +--- + mkfs/xfs_mkfs.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +Index: xfsprogs-rhel7.5/mkfs/xfs_mkfs.c +=================================================================== +--- xfsprogs-rhel7.5.orig/mkfs/xfs_mkfs.c ++++ xfsprogs-rhel7.5/mkfs/xfs_mkfs.c +@@ -2308,7 +2308,9 @@ reported by the device (%u).\n"), + } + } + } +- if (dswidth && ((agsize % dswidth) == 0) && (agcount > 1)) { ++ if (dswidth && ((agsize % dswidth) == 0) ++ && (dswidth != dsunit) ++ && (agcount > 1)) { + /* This is a non-optimal configuration because all AGs + * start on the same disk in the stripe. Changing + * the AG size by one sunit will guarantee that this diff --git a/SOURCES/xfsprogs-4.13.0-xfs_repair-don-t-use-do_warn-for-normal-log-message.patch b/SOURCES/xfsprogs-4.13.0-xfs_repair-don-t-use-do_warn-for-normal-log-message.patch new file mode 100644 index 0000000..4020c02 --- /dev/null +++ b/SOURCES/xfsprogs-4.13.0-xfs_repair-don-t-use-do_warn-for-normal-log-message.patch @@ -0,0 +1,34 @@ +From 67ea25fe9d663f69b550b39ce86b074534ae7c85 Mon Sep 17 00:00:00 2001 +From: Masatake YAMATO +Date: Fri, 15 Sep 2017 13:42:18 -0500 +Subject: [PATCH] xfs_repair: don't use do_warn for normal log message + +In some case, exit status of xfs_repair -n is different even for +the same file system when -v is specified or not. This patch fixes +this behavior. + +If -v is specified, do_warn() is used in zero_log() for printing +a normal message. That makes the exit status to 1 though there +is no dirtiness in the file system. + +Signed-off-by: Masatake YAMATO +Reviewed-by: Eric Sandeen +[sandeen: edit changelog for brevity] +Signed-off-by: Eric Sandeen +--- + repair/phase2.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: xfsprogs-4.5.0/repair/phase2.c +=================================================================== +--- xfsprogs-4.5.0.orig/repair/phase2.c ++++ xfsprogs-4.5.0/repair/phase2.c +@@ -85,7 +85,7 @@ zero_log( + "attempt a repair.\n")); + } else { + if (verbose) { +- do_warn( ++ do_log( + _("zero_log: head block %" PRId64 " tail block %" PRId64 "\n"), + head_blk, tail_blk); + } diff --git a/SOURCES/xfsprogs-4.16-xfs_repair-handle-corrupt-log.patch b/SOURCES/xfsprogs-4.16-xfs_repair-handle-corrupt-log.patch new file mode 100644 index 0000000..a31f5f8 --- /dev/null +++ b/SOURCES/xfsprogs-4.16-xfs_repair-handle-corrupt-log.patch @@ -0,0 +1,28 @@ +This patch is not yet upstream; there are missing braces under +the if (!no_modify && !zap_log) case so that a repair which fails +xlog_find_tail() will not be repairable, because -L will not be +able to zero out the log. + +Reported-by: Xiao Yang +Signed-off-by: Xiao Yang +Reviewed-by: Eric Sandeen + +Index: xfsprogs-4.5.0/repair/phase2.c +=================================================================== +--- xfsprogs-4.5.0.orig/repair/phase2.c ++++ xfsprogs-4.5.0/repair/phase2.c +@@ -78,12 +78,13 @@ zero_log( + do_warn( + _("zero_log: cannot find log head/tail (xlog_find_tail=%d)\n"), + error); +- if (!no_modify && !zap_log) ++ if (!no_modify && !zap_log) { + do_warn(_( + "ERROR: The log head and/or tail cannot be discovered. Attempt to mount the\n" + "filesystem to replay the log or use the -L option to destroy the log and\n" + "attempt a repair.\n")); + exit(2); ++ } + } else { + if (verbose) { + do_log( diff --git a/SOURCES/xfsprogs-4.8.0-mkfs.xfs-clarify-ftype-defaults-in-manpage.patch b/SOURCES/xfsprogs-4.8.0-mkfs.xfs-clarify-ftype-defaults-in-manpage.patch new file mode 100644 index 0000000..0a7f2dc --- /dev/null +++ b/SOURCES/xfsprogs-4.8.0-mkfs.xfs-clarify-ftype-defaults-in-manpage.patch @@ -0,0 +1,40 @@ +From f10a5ab0b3a4cb8a7e17a4935fb33d283c3dd31f Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Tue, 20 Sep 2016 08:48:54 +1000 +Subject: [PATCH] mkfs.xfs: clarify ftype defaults in manpage + +When CRCs were made default, a few leftovers related to its +prior non-default status remained in the manpage, in the ftype +section. Clean those up, stating the correct default for this +feature. + +Reported-by: Chris Murphy +Signed-off-by: Eric Sandeen +Reviewed-by: Dave Chinner +Signed-off-by: Dave Chinner +--- + man/man8/mkfs.xfs.8 | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +Index: xfsprogs-rhel7.5/man/man8/mkfs.xfs.8 +=================================================================== +--- xfsprogs-rhel7.5.orig/man/man8/mkfs.xfs.8 ++++ xfsprogs-rhel7.5/man/man8/mkfs.xfs.8 +@@ -587,13 +587,11 @@ do not need to look up the inode to dete + + The + .I value +-is either 0 or 1, with 1 signifiying that filetype information +-will be stored in the directory structure. The default value is 0. ++is either 0 or 1, with 1 signifying that filetype information ++will be stored in the directory structure. The default value is 1. + +-When CRCs are enabled via +-.B \-m crc=1, +-the ftype functionality is always enabled. This feature can not be turned +-off for such filesystem configurations. ++When CRCs are enabled (the default), the ftype functionality is always ++enabled, and cannot be turned off. + .IP + .RE + .TP diff --git a/SOURCES/xfsprogs-4.8.0-xfs_repair-exit-with-status-2-if-log-dirtiness-is-un.patch b/SOURCES/xfsprogs-4.8.0-xfs_repair-exit-with-status-2-if-log-dirtiness-is-un.patch new file mode 100644 index 0000000..26ea812 --- /dev/null +++ b/SOURCES/xfsprogs-4.8.0-xfs_repair-exit-with-status-2-if-log-dirtiness-is-un.patch @@ -0,0 +1,35 @@ +From b04647edea32dbbce0fc12ea6f54a8da706a2265 Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Mon, 19 Sep 2016 16:01:14 +1000 +Subject: [PATCH] xfs_repair: exit with status 2 if log dirtiness is unknown + +This new case is mostly like the known dirty log case; the log +is corrupt, dirtiness cannot be determined, and a mount/umount +cycle or an xfs_repair -L is required. + +So exit with status 2 here as well. + +Signed-off-by: Eric Sandeen +Reviewed-by: Zorro Lang +Signed-off-by: Dave Chinner +--- + repair/phase2.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +Index: xfsprogs-4.5.0/repair/phase2.c +=================================================================== +--- xfsprogs-4.5.0.orig/repair/phase2.c ++++ xfsprogs-4.5.0/repair/phase2.c +@@ -79,10 +79,11 @@ zero_log( + _("zero_log: cannot find log head/tail (xlog_find_tail=%d)\n"), + error); + if (!no_modify && !zap_log) +- do_error(_( ++ do_warn(_( + "ERROR: The log head and/or tail cannot be discovered. Attempt to mount the\n" + "filesystem to replay the log or use the -L option to destroy the log and\n" + "attempt a repair.\n")); ++ exit(2); + } else { + if (verbose) { + do_log( diff --git a/SPECS/xfsprogs.spec b/SPECS/xfsprogs.spec index 01f5d56..fdbed86 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: 12%{?dist} +Release: 15%{?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 @@ -36,6 +36,17 @@ Patch12: xfsprogs-4.9.0-junk-attr-leaf-count-zero.patch Patch13: xfsprogs-4.8.0-xfs_copy-UUID.patch Patch14: xfsprogs-4.10.0-xfs_metadump-ignore-0-entries.patch Patch15: xfsprogs-4.9-xfs_io-fix-m-option.patch +# RHEL-7.5 +Patch16: xfsprogs-4.8.0-mkfs.xfs-clarify-ftype-defaults-in-manpage.patch +Patch17: xfsprogs-4.12.0-mkfs.xfs-allow-specification-of-0-data-stripe-width-.patch +Patch18: xfsprogs-4.12.0-xfs_db-update-buffer-size-when-new-type-is-set.patch +Patch19: xfsprogs-4.12.0-xfs_db-improve-argument-naming-in-set_cur-and-set_io.patch +Patch20: xfsprogs-4.12.0-xfs_db-properly-set-inode-type.patch +Patch21: xfsprogs-4.13.0-mkfs.xfs-Don-t-stagger-AG-for-a-single-disk.patch +Patch22: xfsprogs-4.13.0-xfs_repair-don-t-use-do_warn-for-normal-log-message.patch +Patch23: xfsprogs-4.11.0-xfs_repair-warn-about-dirty-log-with-n-option.patch +Patch24: xfsprogs-4.8.0-xfs_repair-exit-with-status-2-if-log-dirtiness-is-un.patch +Patch25: xfsprogs-4.16-xfs_repair-handle-corrupt-log.patch %description A set of commands to use the XFS filesystem, including mkfs.xfs. @@ -82,6 +93,16 @@ also want to install xfsprogs. %patch13 -p1 %patch14 -p1 %patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 %build export tagname=CC @@ -147,6 +168,18 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/*.so %changelog +* Tue Feb 27 2018 Eric Sandeen 4.5.0-15 +- xfs_repair: allow repair of corrupt log (#1549525) + +* Thu Jan 25 2018 Eric Sandeen 4.5.0-14 +- xfs_repair: fix incorrect exit status (#1523008) + +* Fri Oct 06 2017 Eric Sandeen 4.5.0-13 +- mkfs.xfs: clarify ftype defaults in manpage (#1488124) +- mkfs.xfs: allow specification of 0 data stripe width (#1444166) +- mkfs.xfs: Don't stagger AG for a single disk (#1492552) +- xfs_db: xfs_db-update-buffer-size-when-new-type-is-set (#1458670) + * Tue May 09 2017 Eric Sandeen 4.5.0-12 - xfs_io: Fix initial -m option (#1447270)