Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package xfsprogs for openSUSE:Factory checked in at 2023-03-28 17:48:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xfsprogs (Old) and /work/SRC/openSUSE:Factory/.xfsprogs.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xfsprogs" Tue Mar 28 17:48:37 2023 rev:78 rq:1074472 version:6.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/xfsprogs/xfsprogs.changes 2023-01-20 17:37:21.932084934 +0100 +++ /work/SRC/openSUSE:Factory/.xfsprogs.new.31432/xfsprogs.changes 2023-03-28 17:48:39.142768462 +0200 @@ -1,0 +2,15 @@ +Fri Mar 24 13:45:04 UTC 2023 - Anthony Iliopoulos <ail...@suse.com> + +- update to 6.2.0: + - xfs_repair: fix incorrect dabtree hashval comparison + - mkfs: protofile can now create directories with spaces in their names + - mkfs: check dirent names when reading protofile + - xfs_io: fix bmap command not detecting realtime files with xattrs + - xfs_io: set fs_path when opening files on foreign filesystems + - xfs_scrub: fix broken realtime free blocks unit conversions + - xfs_spaceman: fix broken -g behavior in freesp command + - xfs_admin: correctly parse IO_OPTS parameters + - Fix autoconf during debian package builds + - xfs_admin: fsuuid cmd can now retrive UUID of mounted filesystems + +------------------------------------------------------------------- Old: ---- xfsprogs-6.1.1.tar.sign xfsprogs-6.1.1.tar.xz New: ---- xfsprogs-6.2.0.tar.sign xfsprogs-6.2.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xfsprogs.spec ++++++ --- /var/tmp/diff_new_pack.vdraLa/_old 2023-03-28 17:48:39.702771164 +0200 +++ /var/tmp/diff_new_pack.vdraLa/_new 2023-03-28 17:48:39.706771183 +0200 @@ -25,7 +25,7 @@ %endif %define libname libhandle1 Name: xfsprogs -Version: 6.1.1 +Version: 6.2.0 Release: 0 Summary: Utilities for managing the XFS file system License: GPL-2.0-or-later ++++++ xfsprogs-6.1.1.tar.xz -> xfsprogs-6.2.0.tar.xz ++++++ ++++ 3793 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/.gitcensus new/xfsprogs-6.2.0/.gitcensus --- old/xfsprogs-6.1.1/.gitcensus 2023-01-13 19:38:55.000000000 +0100 +++ new/xfsprogs-6.2.0/.gitcensus 2023-03-24 13:16:47.000000000 +0100 @@ -183,6 +183,7 @@ io/file.c io/freeze.c io/fsmap.c +io/fsuuid.c io/fsync.c io/getrusage.c io/imap.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/Makefile new/xfsprogs-6.2.0/Makefile --- old/xfsprogs-6.1.1/Makefile 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/Makefile 2023-03-24 10:21:29.000000000 +0100 @@ -73,14 +73,6 @@ TOOL_SUBDIRS += po endif -# If we are on OS X, use glibtoolize from MacPorts, as OS X doesn't have -# libtoolize binary itself. -LIBTOOLIZE_TEST=$(shell libtoolize --version >/dev/null 2>&1 && echo found) -LIBTOOLIZE_BIN=libtoolize -ifneq ("$(LIBTOOLIZE_TEST)","found") -LIBTOOLIZE_BIN=glibtoolize -endif - # include is listed last so it is processed last in clean rules. SUBDIRS = $(LIBFROG_SUBDIR) $(LIB_SUBDIRS) $(TOOL_SUBDIRS) include @@ -115,14 +107,8 @@ clean: # if configure hasn't run, nothing to clean endif - -# Recent versions of libtool require the -i option for copying auxiliary -# files (config.sub, config.guess, install-sh, ltmain.sh), while older -# versions will copy those files anyway, and don't understand -i. -LIBTOOLIZE_INSTALL = `$(LIBTOOLIZE_BIN) -n -i >/dev/null 2>/dev/null && echo -i` - configure: configure.ac - $(LIBTOOLIZE_BIN) -c $(LIBTOOLIZE_INSTALL) -f + libtoolize -c -i -f cp include/install-sh . aclocal -I m4 autoconf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/VERSION new/xfsprogs-6.2.0/VERSION --- old/xfsprogs-6.1.1/VERSION 2023-01-13 19:02:36.000000000 +0100 +++ new/xfsprogs-6.2.0/VERSION 2023-03-24 10:23:12.000000000 +0100 @@ -2,6 +2,6 @@ # This file is used by configure to get version information # PKG_MAJOR=6 -PKG_MINOR=1 -PKG_REVISION=1 +PKG_MINOR=2 +PKG_REVISION=0 PKG_BUILD=1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/configure.ac new/xfsprogs-6.2.0/configure.ac --- old/xfsprogs-6.1.1/configure.ac 2023-01-13 19:02:53.000000000 +0100 +++ new/xfsprogs-6.2.0/configure.ac 2023-03-24 10:23:22.000000000 +0100 @@ -1,4 +1,4 @@ -AC_INIT([xfsprogs],[6.1.1],[linux-...@vger.kernel.org]) +AC_INIT([xfsprogs],[6.2.0],[linux-...@vger.kernel.org]) AC_PREREQ([2.69]) AC_CONFIG_AUX_DIR([.]) AC_CONFIG_MACRO_DIR([m4]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/db/crc.c new/xfsprogs-6.2.0/db/crc.c --- old/xfsprogs-6.1.1/db/crc.c 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/db/crc.c 2023-03-24 10:21:29.000000000 +0100 @@ -114,7 +114,7 @@ } /* Search for a CRC field */ - fl = flist_find_ftyp(fields, FLDT_CRC); + fl = flist_find_ftyp(fields, FLDT_CRC, iocur_top->data, 0); if (!fl) { dbprintf(_("No CRC field found for type %s\n"), cur_typ->name); return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/db/flist.c new/xfsprogs-6.2.0/db/flist.c --- old/xfsprogs-6.1.1/db/flist.c 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/db/flist.c 2023-03-24 10:21:29.000000000 +0100 @@ -408,11 +408,14 @@ */ flist_t * flist_find_ftyp( - const field_t *fields, - fldt_t type) + const field_t *fields, + fldt_t type, + void *obj, + int startoff) { flist_t *fl; const field_t *f; + int count; const ftattr_t *fa; for (f = fields; f->name; f++) { @@ -420,11 +423,14 @@ fl->fld = f; if (f->ftyp == type) return fl; + count = fcount(f, obj, startoff); + if (!count) + continue; fa = &ftattrtab[f->ftyp]; if (fa->subfld) { flist_t *nfl; - nfl = flist_find_ftyp(fa->subfld, type); + nfl = flist_find_ftyp(fa->subfld, type, obj, startoff); if (nfl) { fl->child = nfl; return fl; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/db/flist.h new/xfsprogs-6.2.0/db/flist.h --- old/xfsprogs-6.1.1/db/flist.h 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/db/flist.h 2023-03-24 10:21:29.000000000 +0100 @@ -38,4 +38,5 @@ int startoff); extern void flist_print(flist_t *fl); extern flist_t *flist_scan(char *name); -extern flist_t *flist_find_ftyp(const field_t *fields, fldt_t type); +extern flist_t *flist_find_ftyp(const field_t *fields, fldt_t type, void *obj, + int startoff); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/db/namei.c new/xfsprogs-6.2.0/db/namei.c --- old/xfsprogs-6.1.1/db/namei.c 2022-12-23 10:30:01.000000000 +0100 +++ new/xfsprogs-6.2.0/db/namei.c 2023-03-24 10:21:29.000000000 +0100 @@ -98,7 +98,7 @@ for (i = 0; i < dirpath->depth; i++) { struct xfs_name xname = { - .name = dirpath->path[i], + .name = (unsigned char *)dirpath->path[i], .len = strlen(dirpath->path[i]), }; @@ -250,7 +250,7 @@ uint8_t dtype) { char *display_name; - struct xfs_name xname = { .name = name }; + struct xfs_name xname = { .name = (unsigned char *)name }; const char *dstr = get_dstr(mp, dtype); xfs_dahash_t hash; bool good; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/db/xfs_admin.sh new/xfsprogs-6.2.0/db/xfs_admin.sh --- old/xfsprogs-6.1.1/db/xfs_admin.sh 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/db/xfs_admin.sh 2023-03-24 10:21:29.000000000 +0100 @@ -5,8 +5,11 @@ # status=0 +require_offline="" +require_online="" DB_OPTS="" REPAIR_OPTS="" +IO_OPTS="" REPAIR_DEV_OPTS="" LOG_OPTS="" USAGE="Usage: xfs_admin [-efjlpuV] [-c 0|1] [-L label] [-O v5_feature] [-r rtdev] [-U uuid] device [logdev]" @@ -14,17 +17,39 @@ while getopts "c:efjlL:O:pr:uU:V" c do case $c in - c) REPAIR_OPTS=$REPAIR_OPTS" -c lazycount="$OPTARG;; - e) DB_OPTS=$DB_OPTS" -c 'version extflg'";; - f) DB_OPTS=$DB_OPTS" -f";; - j) DB_OPTS=$DB_OPTS" -c 'version log2'";; - l) DB_OPTS=$DB_OPTS" -r -c label";; - L) DB_OPTS=$DB_OPTS" -c 'label "$OPTARG"'";; - O) REPAIR_OPTS=$REPAIR_OPTS" -c $OPTARG";; - p) DB_OPTS=$DB_OPTS" -c 'version projid32bit'";; - r) REPAIR_DEV_OPTS=" -r '$OPTARG'";; - u) DB_OPTS=$DB_OPTS" -r -c uuid";; - U) DB_OPTS=$DB_OPTS" -c 'uuid "$OPTARG"'";; + c) REPAIR_OPTS=$REPAIR_OPTS" -c lazycount="$OPTARG + require_offline=1 + ;; + e) DB_OPTS=$DB_OPTS" -c 'version extflg'" + require_offline=1 + ;; + f) DB_OPTS=$DB_OPTS" -f" + require_offline=1 + ;; + j) DB_OPTS=$DB_OPTS" -c 'version log2'" + require_offline=1 + ;; + l) DB_OPTS=$DB_OPTS" -r -c label" + IO_OPTS=$IO_OPTS" -r -c label" + ;; + L) DB_OPTS=$DB_OPTS" -c 'label "$OPTARG"'" + IO_OPTS=$IO_OPTS" -c 'label -s "$OPTARG"'" + ;; + O) REPAIR_OPTS=$REPAIR_OPTS" -c $OPTARG" + require_offline=1 + ;; + p) DB_OPTS=$DB_OPTS" -c 'version projid32bit'" + require_offline=1 + ;; + r) REPAIR_DEV_OPTS=" -r '$OPTARG'" + require_offline=1 + ;; + u) DB_OPTS=$DB_OPTS" -r -c uuid" + IO_OPTS=$IO_OPTS" -r -c fsuuid" + ;; + U) DB_OPTS=$DB_OPTS" -c 'uuid "$OPTARG"'" + require_offline=1 + ;; V) xfs_db -p xfs_admin -V status=$? exit $status @@ -38,6 +63,25 @@ shift $OPTIND case $# in 1|2) + if mntpt="$(findmnt -t xfs -f -n -o TARGET "$1" 2>/dev/null)"; then + # filesystem is mounted + if [ -n "$require_offline" ]; then + echo "$1: filesystem is mounted." + exit 2 + fi + + if [ -n "$IO_OPTS" ]; then + eval xfs_io -p xfs_admin $IO_OPTS "$mntpt" + exit $? + fi + fi + + # filesystem is not mounted + if [ -n "$require_online" ]; then + echo "$1: filesystem is not mounted" + exit 2 + fi + # Pick up the log device, if present if [ -n "$2" ]; then LOG_OPTS=" -l '$2'" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/debian/changelog new/xfsprogs-6.2.0/debian/changelog --- old/xfsprogs-6.1.1/debian/changelog 2023-01-13 19:03:46.000000000 +0100 +++ new/xfsprogs-6.2.0/debian/changelog 2023-03-24 10:29:42.000000000 +0100 @@ -1,3 +1,9 @@ +xfsprogs (6.2.0-1) unstable; urgency=low + + * New upstream release + + -- Nathan Scott <nath...@debian.org> Fri, 24 Mar 2023 10:30:00 -0400 + xfsprogs (6.1.1-1) unstable; urgency=low * New upstream release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/doc/CHANGES new/xfsprogs-6.2.0/doc/CHANGES --- old/xfsprogs-6.1.1/doc/CHANGES 2023-01-13 19:05:35.000000000 +0100 +++ new/xfsprogs-6.2.0/doc/CHANGES 2023-03-24 11:24:29.000000000 +0100 @@ -1,3 +1,15 @@ +xfsprogs-6.2.0 (24 Mar 2023) + xfs_repair: fix incorrect dabtree hashval comparison (Darrick J. Wong) + mkfs: protofile can now create directories with spaces in their names (Darrick J. Wong) + mkfs: check dirent names when reading protofile (Darrick J. Wong) + xfs_io: fix bmap command not detecting realtime files with xattrs (Darrick J. Wong) + xfs_io: set fs_path when opening files on foreign filesystems (Darrick J. Wong) + xfs_scrub: fix broken realtime free blocks unit conversions (Darrick J. Wong) + xfs_spaceman: fix broken -g behavior in freesp command (Darrick J. Wong) + xfs_admin: correctly parse IO_OPTS parameters (Catherine Hoang) + Fix autoconf during debian package builds (Dave Chinner) + xfs_admin: fsuuid cmd can now retrive UUID of mounted filesystems (Catherine Hoang) + xfsprogs-6.1.1 (13 Jan 2023) - scrub: fix warnings/errors due to missing include (Holger Hoffstatte) - debian: Add missing pkg version to the changelog (Carlos Maiolino) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/io/Makefile new/xfsprogs-6.2.0/io/Makefile --- old/xfsprogs-6.1.1/io/Makefile 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/io/Makefile 2023-03-24 10:21:29.000000000 +0100 @@ -10,12 +10,12 @@ HFILES = init.h io.h CFILES = init.c \ attr.c bmap.c bulkstat.c crc32cselftest.c cowextsize.c encrypt.c \ - file.c freeze.c fsync.c getrusage.c imap.c inject.c label.c link.c \ - mmap.c open.c parent.c pread.c prealloc.c pwrite.c reflink.c \ + file.c freeze.c fsuuid.c fsync.c getrusage.c imap.c inject.c label.c \ + link.c mmap.c open.c parent.c pread.c prealloc.c pwrite.c reflink.c \ resblks.c scrub.c seek.c shutdown.c stat.c swapext.c sync.c \ truncate.c utimes.c -LLDLIBS = $(LIBXCMD) $(LIBHANDLE) $(LIBFROG) $(LIBPTHREAD) +LLDLIBS = $(LIBXCMD) $(LIBHANDLE) $(LIBFROG) $(LIBPTHREAD) $(LIBUUID) LTDEPENDENCIES = $(LIBXCMD) $(LIBHANDLE) $(LIBFROG) LLDFLAGS = -static-libtool-libs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/io/bmap.c new/xfsprogs-6.2.0/io/bmap.c --- old/xfsprogs-6.1.1/io/bmap.c 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/io/bmap.c 2023-03-24 10:21:29.000000000 +0100 @@ -118,7 +118,7 @@ return 0; } - if (fsx.fsx_xflags == FS_XFLAG_REALTIME) { + if (fsx.fsx_xflags & FS_XFLAG_REALTIME) { /* * ag info not applicable to rt, continue * without ag output. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/io/fsuuid.c new/xfsprogs-6.2.0/io/fsuuid.c --- old/xfsprogs-6.1.1/io/fsuuid.c 1970-01-01 01:00:00.000000000 +0100 +++ new/xfsprogs-6.2.0/io/fsuuid.c 2023-03-24 10:21:29.000000000 +0100 @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2023 Oracle. + * All Rights Reserved. + */ + +#include "libxfs.h" +#include "command.h" +#include "init.h" +#include "io.h" +#include "libfrog/fsgeom.h" +#include "libfrog/logging.h" + +static cmdinfo_t fsuuid_cmd; + +static int +fsuuid_f( + int argc, + char **argv) +{ + struct xfs_fsop_geom fsgeo; + int ret; + char bp[40]; + + ret = -xfrog_geometry(file->fd, &fsgeo); + + if (ret) { + xfrog_perror(ret, "XFS_IOC_FSGEOMETRY"); + exitcode = 1; + } else { + platform_uuid_unparse((uuid_t *)fsgeo.uuid, bp); + printf("UUID = %s\n", bp); + } + + return 0; +} + +void +fsuuid_init(void) +{ + fsuuid_cmd.name = "fsuuid"; + fsuuid_cmd.cfunc = fsuuid_f; + fsuuid_cmd.argmin = 0; + fsuuid_cmd.argmax = 0; + fsuuid_cmd.flags = CMD_FLAG_ONESHOT | CMD_NOMAP_OK; + fsuuid_cmd.oneline = _("get mounted filesystem UUID"); + + add_command(&fsuuid_cmd); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/io/init.c new/xfsprogs-6.2.0/io/init.c --- old/xfsprogs-6.1.1/io/init.c 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/io/init.c 2023-03-24 10:21:29.000000000 +0100 @@ -56,6 +56,7 @@ flink_init(); freeze_init(); fsmap_init(); + fsuuid_init(); fsync_init(); getrusage_init(); help_init(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/io/inject.c new/xfsprogs-6.2.0/io/inject.c --- old/xfsprogs-6.1.1/io/inject.c 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/io/inject.c 2023-03-24 10:21:29.000000000 +0100 @@ -61,6 +61,8 @@ { XFS_ERRTAG_LARP, "larp" }, { XFS_ERRTAG_DA_LEAF_SPLIT, "da_leaf_split" }, { XFS_ERRTAG_ATTR_LEAF_TO_NODE, "attr_leaf_to_node" }, + { XFS_ERRTAG_WB_DELAY_MS, "wb_delay_ms" }, + { XFS_ERRTAG_WRITE_DELAY_MS, "write_delay_ms" }, { XFS_ERRTAG_MAX, NULL } }; int count; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/io/io.h new/xfsprogs-6.2.0/io/io.h --- old/xfsprogs-6.1.1/io/io.h 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/io/io.h 2023-03-24 10:21:29.000000000 +0100 @@ -94,6 +94,7 @@ extern void file_init(void); extern void flink_init(void); extern void freeze_init(void); +extern void fsuuid_init(void); extern void fsync_init(void); extern void getrusage_init(void); extern void help_init(void); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/io/open.c new/xfsprogs-6.2.0/io/open.c --- old/xfsprogs-6.1.1/io/open.c 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/io/open.c 2023-03-24 10:21:29.000000000 +0100 @@ -116,7 +116,7 @@ } if (!geom || !platform_test_xfs_fd(fd)) - return fd; + goto set_fspath; if (flags & IO_PATH) { /* Can't call ioctl() on O_PATH fds */ @@ -150,6 +150,7 @@ } } +set_fspath: if (fs_path) { fsp = fs_table_lookup(path, FS_MOUNT_POINT); if (!fsp) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/libxfs/libxfs_priv.h new/xfsprogs-6.2.0/libxfs/libxfs_priv.h --- old/xfsprogs-6.1.1/libxfs/libxfs_priv.h 2022-12-23 10:30:01.000000000 +0100 +++ new/xfsprogs-6.2.0/libxfs/libxfs_priv.h 2023-03-24 10:21:29.000000000 +0100 @@ -68,7 +68,7 @@ /* fake up iomap, (not) used in xfs_bmap.[ch] */ #define IOMAP_F_SHARED 0x04 -#define xfs_bmbt_to_iomap(a, b, c, d, e) ((void) 0) +#define xfs_bmbt_to_iomap(a, b, c, d, e, f) ((void) 0) /* CRC stuff, buffer API dependent on it */ #define crc32c(c,p,l) crc32c_le((c),(unsigned char const *)(p),(l)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/libxfs/xfs_alloc.c new/xfsprogs-6.2.0/libxfs/xfs_alloc.c --- old/xfsprogs-6.1.1/libxfs/xfs_alloc.c 2022-12-23 10:30:01.000000000 +0100 +++ new/xfsprogs-6.2.0/libxfs/xfs_alloc.c 2023-03-24 10:21:29.000000000 +0100 @@ -1512,7 +1512,7 @@ #ifdef DEBUG /* Randomly don't execute the first algorithm. */ - if (prandom_u32_max(2)) + if (get_random_u32_below(2)) return 0; #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/libxfs/xfs_bmap.c new/xfsprogs-6.2.0/libxfs/xfs_bmap.c --- old/xfsprogs-6.1.1/libxfs/xfs_bmap.c 2022-12-23 10:30:01.000000000 +0100 +++ new/xfsprogs-6.2.0/libxfs/xfs_bmap.c 2023-03-24 10:21:29.000000000 +0100 @@ -4051,7 +4051,7 @@ * the busy list. */ bma->datatype = XFS_ALLOC_NOBUSY; - if (whichfork == XFS_DATA_FORK) { + if (whichfork == XFS_DATA_FORK || whichfork == XFS_COW_FORK) { bma->datatype |= XFS_ALLOC_USERDATA; if (bma->offset == 0) bma->datatype |= XFS_ALLOC_INITIAL_USER_DATA; @@ -4544,7 +4544,8 @@ * the extent. Just return the real extent at this offset. */ if (!isnullstartblock(bma.got.br_startblock)) { - xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags); + xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags, + xfs_iomap_inode_sequence(ip, flags)); *seq = READ_ONCE(ifp->if_seq); goto out_trans_cancel; } @@ -4592,7 +4593,8 @@ XFS_STATS_INC(mp, xs_xstrat_quick); ASSERT(!isnullstartblock(bma.got.br_startblock)); - xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags); + xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags, + xfs_iomap_inode_sequence(ip, flags)); *seq = READ_ONCE(ifp->if_seq); if (whichfork == XFS_COW_FORK) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/libxfs/xfs_btree.c new/xfsprogs-6.2.0/libxfs/xfs_btree.c --- old/xfsprogs-6.1.1/libxfs/xfs_btree.c 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/libxfs/xfs_btree.c 2023-03-24 10:21:29.000000000 +0100 @@ -4663,7 +4663,12 @@ const unsigned int *limits, unsigned long long leaf_blocks) { - unsigned long long node_blocks = limits[1]; + /* + * The root btree block can have fewer than minrecs pointers in it + * because the tree might not be big enough to require that amount of + * fanout. Hence it has a minimum size of 2 pointers, not limits[1]. + */ + unsigned long long node_blocks = 2; unsigned long long blocks_left = leaf_blocks - 1; unsigned int height = 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/libxfs/xfs_btree.h new/xfsprogs-6.2.0/libxfs/xfs_btree.h --- old/xfsprogs-6.1.1/libxfs/xfs_btree.h 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/libxfs/xfs_btree.h 2023-03-24 10:21:29.000000000 +0100 @@ -556,7 +556,6 @@ struct xfs_buf *bp; block = xfs_btree_get_block(cur, level, &bp); - ASSERT(block && xfs_btree_check_block(cur, block, level, bp) == 0); if (cur->bc_flags & XFS_BTREE_LONG_PTRS) return block->bb_u.l.bb_rightsib == cpu_to_be64(NULLFSBLOCK); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/libxfs/xfs_errortag.h new/xfsprogs-6.2.0/libxfs/xfs_errortag.h --- old/xfsprogs-6.1.1/libxfs/xfs_errortag.h 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/libxfs/xfs_errortag.h 2023-03-24 10:21:29.000000000 +0100 @@ -40,13 +40,12 @@ #define XFS_ERRTAG_REFCOUNT_FINISH_ONE 25 #define XFS_ERRTAG_BMAP_FINISH_ONE 26 #define XFS_ERRTAG_AG_RESV_CRITICAL 27 + /* - * DEBUG mode instrumentation to test and/or trigger delayed allocation - * block killing in the event of failed writes. When enabled, all - * buffered writes are silenty dropped and handled as if they failed. - * All delalloc blocks in the range of the write (including pre-existing - * delalloc blocks!) are tossed as part of the write failure error - * handling sequence. + * Drop-writes support removed because write error handling cannot trash + * pre-existing delalloc extents in any useful way anymore. We retain the + * definition so that we can reject it as an invalid value in + * xfs_errortag_valid(). */ #define XFS_ERRTAG_DROP_WRITES 28 #define XFS_ERRTAG_LOG_BAD_CRC 29 @@ -62,7 +61,9 @@ #define XFS_ERRTAG_LARP 39 #define XFS_ERRTAG_DA_LEAF_SPLIT 40 #define XFS_ERRTAG_ATTR_LEAF_TO_NODE 41 -#define XFS_ERRTAG_MAX 42 +#define XFS_ERRTAG_WB_DELAY_MS 42 +#define XFS_ERRTAG_WRITE_DELAY_MS 43 +#define XFS_ERRTAG_MAX 44 /* * Random factors for above tags, 1 means always, 2 means 1/2 time, etc. @@ -95,7 +96,6 @@ #define XFS_RANDOM_REFCOUNT_FINISH_ONE 1 #define XFS_RANDOM_BMAP_FINISH_ONE 1 #define XFS_RANDOM_AG_RESV_CRITICAL 4 -#define XFS_RANDOM_DROP_WRITES 1 #define XFS_RANDOM_LOG_BAD_CRC 1 #define XFS_RANDOM_LOG_ITEM_PIN 1 #define XFS_RANDOM_BUF_LRU_REF 2 @@ -109,5 +109,7 @@ #define XFS_RANDOM_LARP 1 #define XFS_RANDOM_DA_LEAF_SPLIT 1 #define XFS_RANDOM_ATTR_LEAF_TO_NODE 1 +#define XFS_RANDOM_WB_DELAY_MS 3000 +#define XFS_RANDOM_WRITE_DELAY_MS 3000 #endif /* __XFS_ERRORTAG_H_ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/libxfs/xfs_ialloc.c new/xfsprogs-6.2.0/libxfs/xfs_ialloc.c --- old/xfsprogs-6.1.1/libxfs/xfs_ialloc.c 2022-12-23 10:30:01.000000000 +0100 +++ new/xfsprogs-6.2.0/libxfs/xfs_ialloc.c 2023-03-24 10:21:29.000000000 +0100 @@ -631,7 +631,7 @@ /* randomly do sparse inode allocations */ if (xfs_has_sparseinodes(tp->t_mountp) && igeo->ialloc_min_blks < igeo->ialloc_blks) - do_sparse = prandom_u32_max(2); + do_sparse = get_random_u32_below(2); #endif /* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/libxfs/xfs_refcount.c new/xfsprogs-6.2.0/libxfs/xfs_refcount.c --- old/xfsprogs-6.1.1/libxfs/xfs_refcount.c 2022-12-23 10:30:01.000000000 +0100 +++ new/xfsprogs-6.2.0/libxfs/xfs_refcount.c 2023-03-24 10:21:29.000000000 +0100 @@ -814,11 +814,136 @@ /* Is this extent valid? */ static inline bool xfs_refc_valid( - struct xfs_refcount_irec *rc) + const struct xfs_refcount_irec *rc) { return rc->rc_startblock != NULLAGBLOCK; } +static inline xfs_nlink_t +xfs_refc_merge_refcount( + const struct xfs_refcount_irec *irec, + enum xfs_refc_adjust_op adjust) +{ + /* Once a record hits MAXREFCOUNT, it is pinned there forever */ + if (irec->rc_refcount == MAXREFCOUNT) + return MAXREFCOUNT; + return irec->rc_refcount + adjust; +} + +static inline bool +xfs_refc_want_merge_center( + const struct xfs_refcount_irec *left, + const struct xfs_refcount_irec *cleft, + const struct xfs_refcount_irec *cright, + const struct xfs_refcount_irec *right, + bool cleft_is_cright, + enum xfs_refc_adjust_op adjust, + unsigned long long *ulenp) +{ + unsigned long long ulen = left->rc_blockcount; + xfs_nlink_t new_refcount; + + /* + * To merge with a center record, both shoulder records must be + * adjacent to the record we want to adjust. This is only true if + * find_left and find_right made all four records valid. + */ + if (!xfs_refc_valid(left) || !xfs_refc_valid(right) || + !xfs_refc_valid(cleft) || !xfs_refc_valid(cright)) + return false; + + /* There must only be one record for the entire range. */ + if (!cleft_is_cright) + return false; + + /* The shoulder record refcounts must match the new refcount. */ + new_refcount = xfs_refc_merge_refcount(cleft, adjust); + if (left->rc_refcount != new_refcount) + return false; + if (right->rc_refcount != new_refcount) + return false; + + /* + * The new record cannot exceed the max length. ulen is a ULL as the + * individual record block counts can be up to (u32 - 1) in length + * hence we need to catch u32 addition overflows here. + */ + ulen += cleft->rc_blockcount + right->rc_blockcount; + if (ulen >= MAXREFCEXTLEN) + return false; + + *ulenp = ulen; + return true; +} + +static inline bool +xfs_refc_want_merge_left( + const struct xfs_refcount_irec *left, + const struct xfs_refcount_irec *cleft, + enum xfs_refc_adjust_op adjust) +{ + unsigned long long ulen = left->rc_blockcount; + xfs_nlink_t new_refcount; + + /* + * For a left merge, the left shoulder record must be adjacent to the + * start of the range. If this is true, find_left made left and cleft + * contain valid contents. + */ + if (!xfs_refc_valid(left) || !xfs_refc_valid(cleft)) + return false; + + /* Left shoulder record refcount must match the new refcount. */ + new_refcount = xfs_refc_merge_refcount(cleft, adjust); + if (left->rc_refcount != new_refcount) + return false; + + /* + * The new record cannot exceed the max length. ulen is a ULL as the + * individual record block counts can be up to (u32 - 1) in length + * hence we need to catch u32 addition overflows here. + */ + ulen += cleft->rc_blockcount; + if (ulen >= MAXREFCEXTLEN) + return false; + + return true; +} + +static inline bool +xfs_refc_want_merge_right( + const struct xfs_refcount_irec *cright, + const struct xfs_refcount_irec *right, + enum xfs_refc_adjust_op adjust) +{ + unsigned long long ulen = right->rc_blockcount; + xfs_nlink_t new_refcount; + + /* + * For a right merge, the right shoulder record must be adjacent to the + * end of the range. If this is true, find_right made cright and right + * contain valid contents. + */ + if (!xfs_refc_valid(right) || !xfs_refc_valid(cright)) + return false; + + /* Right shoulder record refcount must match the new refcount. */ + new_refcount = xfs_refc_merge_refcount(cright, adjust); + if (right->rc_refcount != new_refcount) + return false; + + /* + * The new record cannot exceed the max length. ulen is a ULL as the + * individual record block counts can be up to (u32 - 1) in length + * hence we need to catch u32 addition overflows here. + */ + ulen += cright->rc_blockcount; + if (ulen >= MAXREFCEXTLEN) + return false; + + return true; +} + /* * Try to merge with any extents on the boundaries of the adjustment range. */ @@ -860,23 +985,15 @@ (cleft.rc_blockcount == cright.rc_blockcount); /* Try to merge left, cleft, and right. cleft must == cright. */ - ulen = (unsigned long long)left.rc_blockcount + cleft.rc_blockcount + - right.rc_blockcount; - if (xfs_refc_valid(&left) && xfs_refc_valid(&right) && - xfs_refc_valid(&cleft) && xfs_refc_valid(&cright) && cequal && - left.rc_refcount == cleft.rc_refcount + adjust && - right.rc_refcount == cleft.rc_refcount + adjust && - ulen < MAXREFCEXTLEN) { + if (xfs_refc_want_merge_center(&left, &cleft, &cright, &right, cequal, + adjust, &ulen)) { *shape_changed = true; return xfs_refcount_merge_center_extents(cur, &left, &cleft, &right, ulen, aglen); } /* Try to merge left and cleft. */ - ulen = (unsigned long long)left.rc_blockcount + cleft.rc_blockcount; - if (xfs_refc_valid(&left) && xfs_refc_valid(&cleft) && - left.rc_refcount == cleft.rc_refcount + adjust && - ulen < MAXREFCEXTLEN) { + if (xfs_refc_want_merge_left(&left, &cleft, adjust)) { *shape_changed = true; error = xfs_refcount_merge_left_extent(cur, &left, &cleft, agbno, aglen); @@ -892,10 +1009,7 @@ } /* Try to merge cright and right. */ - ulen = (unsigned long long)right.rc_blockcount + cright.rc_blockcount; - if (xfs_refc_valid(&right) && xfs_refc_valid(&cright) && - right.rc_refcount == cright.rc_refcount + adjust && - ulen < MAXREFCEXTLEN) { + if (xfs_refc_want_merge_right(&cright, &right, adjust)) { *shape_changed = true; return xfs_refcount_merge_right_extent(cur, &right, &cright, aglen); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/m4/package_libcdev.m4 new/xfsprogs-6.2.0/m4/package_libcdev.m4 --- old/xfsprogs-6.1.1/m4/package_libcdev.m4 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/m4/package_libcdev.m4 2023-03-24 10:21:29.000000000 +0100 @@ -117,6 +117,7 @@ #define _GNU_SOURCE #include <linux/fs.h> #include <linux/fiemap.h> +#include <sys/ioctl.h> ]], [[ struct fiemap *fiemap; ioctl(0, FS_IOC_FIEMAP, (unsigned long)fiemap); @@ -153,7 +154,7 @@ [ AC_MSG_CHECKING([for pwritev2]) AC_LINK_IFELSE( [ AC_LANG_PROGRAM([[ -#define _BSD_SOURCE +#define _GNU_SOURCE #include <sys/uio.h> ]], [[ pwritev2(0, 0, 0, 0, 0); @@ -454,6 +455,7 @@ AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM([[ #include <scsi/sg.h> +#include <sys/ioctl.h> ]], [[ struct sg_io_hdr hdr; ioctl(0, SG_IO, &hdr); @@ -471,7 +473,8 @@ [ AC_MSG_CHECKING([for struct hd_geometry ]) AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM([[ -#include <linux/hdreg.h>, +#include <linux/hdreg.h> +#include <sys/ioctl.h> ]], [[ struct hd_geometry hdr; ioctl(0, HDIO_GETGEO, &hdr); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/man/man8/mkfs.xfs.8.in new/xfsprogs-6.2.0/man/man8/mkfs.xfs.8.in --- old/xfsprogs-6.1.1/man/man8/mkfs.xfs.8.in 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/man/man8/mkfs.xfs.8.in 2023-03-24 10:21:29.000000000 +0100 @@ -28,7 +28,7 @@ .I naming_options ] [ .B \-p -.I protofile +.I protofile_options ] [ .B \-q ] [ @@ -834,12 +834,29 @@ enabled, and cannot be turned off. .IP In other words, this option is only tunable on the deprecated V4 format. -.IP .RE +.PP +.PD 0 +.TP +.BI \-p " protofile_options" +.TP +.BI "Section Name: " [proto] +.PD +These options specify the protofile parameters for populating the filesystem. +The valid +.I protofile_options +are: +.RS 1.2i .TP -.BI \-p " protofile" +.BI [file=] protofile +The +.B file= +prefix is not required for this CLI argument for legacy reasons. +If specified as a config file directive, the prefix is required. + If the optional -.BI \-p " protofile" +.PD +.I protofile argument is given, .B mkfs.xfs uses @@ -980,6 +997,13 @@ .B $ ) token. .TP +.BI slashes_are_spaces= value +If set to 1, slashes ("/") in the first token of each line of the protofile +are converted to spaces. +This enables the creation of a filesystem containing filenames with spaces. +By default, this is set to 0. +.RE +.TP .B \-q Quiet option. Normally .B mkfs.xfs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/man/man8/xfs_io.8 new/xfsprogs-6.2.0/man/man8/xfs_io.8 --- old/xfsprogs-6.1.1/man/man8/xfs_io.8 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/man/man8/xfs_io.8 2023-03-24 10:21:29.000000000 +0100 @@ -1455,6 +1455,9 @@ flag. .RE .PD +.TP +.B fsuuid +Print the mounted filesystem UUID. .SH OTHER COMMANDS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/mkfs/proto.c new/xfsprogs-6.2.0/mkfs/proto.c --- old/xfsprogs-6.1.1/mkfs/proto.c 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/mkfs/proto.c 2023-03-24 10:21:29.000000000 +0100 @@ -21,6 +21,7 @@ static char *newregfile(char **pp, int *len); static void rtinit(xfs_mount_t *mp); static long filesize(int fd); +static int slashes_are_spaces; /* * Use this for block reservations needed for mkfs's conditions @@ -171,6 +172,30 @@ return NULL; } +/* Extract directory entry name from a protofile. */ +static char * +getdirentname( + char **pp) +{ + char *p = getstr(pp); + char *c = p; + + if (!p) + return NULL; + + if (!slashes_are_spaces) + return p; + + /* Replace slash with space because slashes aren't allowed. */ + while (*c) { + if (*c == '/') + *c = ' '; + c++; + } + + return p; +} + static void rsvfile( xfs_mount_t *mp, @@ -326,6 +351,12 @@ int error; int rsv; + if (!libxfs_dir2_namecheck(name->name, name->len)) { + fprintf(stderr, _("%.*s: invalid directory entry name\n"), + name->len, name->name); + exit(1); + } + rsv = XFS_DIRENTER_SPACE_RES(mp, name->len); error = -libxfs_dir_createname(tp, pip, name, inum, rsv); @@ -580,7 +611,7 @@ rtinit(mp); tp = NULL; for (;;) { - name = getstr(pp); + name = getdirentname(pp); if (!name) break; if (strcmp(name, "$") == 0) @@ -606,8 +637,10 @@ parse_proto( xfs_mount_t *mp, struct fsxattr *fsx, - char **pp) + char **pp, + int proto_slashes_are_spaces) { + slashes_are_spaces = proto_slashes_are_spaces; parseproto(mp, NULL, fsx, pp, NULL); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/mkfs/proto.h new/xfsprogs-6.2.0/mkfs/proto.h --- old/xfsprogs-6.1.1/mkfs/proto.h 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/mkfs/proto.h 2023-03-24 10:21:29.000000000 +0100 @@ -7,7 +7,8 @@ #define MKFS_PROTO_H_ char *setup_proto(char *fname); -void parse_proto(struct xfs_mount *mp, struct fsxattr *fsx, char **pp); +void parse_proto(struct xfs_mount *mp, struct fsxattr *fsx, char **pp, + int proto_slashes_are_spaces); void res_failed(int err); #endif /* MKFS_PROTO_H_ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/mkfs/xfs_mkfs.c new/xfsprogs-6.2.0/mkfs/xfs_mkfs.c --- old/xfsprogs-6.1.1/mkfs/xfs_mkfs.c 2022-12-23 10:30:01.000000000 +0100 +++ new/xfsprogs-6.2.0/mkfs/xfs_mkfs.c 2023-03-24 10:21:29.000000000 +0100 @@ -114,6 +114,12 @@ }; enum { + P_FILE = 0, + P_SLASHES, + P_MAX_OPTS, +}; + +enum { R_EXTSIZE = 0, R_SIZE, R_DEV, @@ -641,6 +647,28 @@ }, }; +static struct opt_params popts = { + .name = 'p', + .ini_section = "proto", + .subopts = { + [P_FILE] = "file", + [P_SLASHES] = "slashes_are_spaces", + [P_MAX_OPTS] = NULL, + }, + .subopt_params = { + { .index = P_FILE, + .conflicts = { { NULL, LAST_CONFLICT } }, + .defaultval = SUBOPT_NEEDS_VAL, + }, + { .index = P_SLASHES, + .conflicts = { { NULL, LAST_CONFLICT } }, + .minval = 0, + .maxval = 1, + .defaultval = 1, + }, + }, +}; + static struct opt_params ropts = { .name = 'r', .ini_section = "realtime", @@ -841,6 +869,7 @@ int blocksize; char *cfgfile; + char *protofile; /* parameters that depend on sector/block size being validated. */ char *dsize; @@ -860,6 +889,7 @@ int loginternal; int lsunit; int is_supported; + int proto_slashes_are_spaces; /* parameters where 0 is not a valid value */ int64_t agcount; @@ -1751,6 +1781,36 @@ } static int +proto_opts_parser( + struct opt_params *opts, + int subopt, + const char *value, + struct cli_params *cli) +{ + switch (subopt) { + case P_SLASHES: + cli->proto_slashes_are_spaces = getnum(value, opts, subopt); + break; + case P_FILE: + fallthrough; + default: + if (cli->protofile) { + if (subopt < 0) + subopt = P_FILE; + respec(opts->name, opts->subopts, subopt); + } + cli->protofile = strdup(value); + if (!cli->protofile) { + fprintf(stderr, + _("Out of memory while saving protofile option.\n")); + exit(1); + } + break; + } + return 0; +} + +static int rtdev_opts_parser( struct opt_params *opts, int subopt, @@ -1813,6 +1873,7 @@ { &lopts, log_opts_parser }, { &mopts, meta_opts_parser }, { &nopts, naming_opts_parser }, + { &popts, proto_opts_parser }, { &ropts, rtdev_opts_parser }, { &sopts, sector_opts_parser }, { NULL, NULL }, @@ -4013,7 +4074,6 @@ int discard = 1; int force_overwrite = 0; int quiet = 0; - char *protofile = NULL; char *protostring = NULL; int worst_freelist = 0; @@ -4119,6 +4179,7 @@ case 'l': case 'm': case 'n': + case 'p': case 'r': case 's': parse_subopts(c, optarg, &cli); @@ -4134,11 +4195,6 @@ case 'K': discard = 0; break; - case 'p': - if (protofile) - respec('p', NULL, 0); - protofile = optarg; - break; case 'q': quiet = 1; break; @@ -4165,7 +4221,7 @@ */ cfgfile_parse(&cli); - protostring = setup_proto(protofile); + protostring = setup_proto(cli.protofile); /* * Extract as much of the valid config as we can from the CLI input @@ -4324,7 +4380,7 @@ /* * Allocate the root inode and anything else in the proto file. */ - parse_proto(mp, &cli.fsx, &protostring); + parse_proto(mp, &cli.fsx, &protostring, cli.proto_slashes_are_spaces); /* * Protect ourselves against possible stupidity diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/repair/da_util.c new/xfsprogs-6.2.0/repair/da_util.c --- old/xfsprogs-6.1.1/repair/da_util.c 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/repair/da_util.c 2023-03-24 10:21:29.000000000 +0100 @@ -330,7 +330,7 @@ /* * hash values monotonically increasing ??? */ - if (cursor->level[this_level].hashval >= + if (cursor->level[this_level].hashval > be32_to_cpu(nodehdr.btree[entry].hashval)) { do_warn( _("%s block hashvalue inconsistency, expected > %u / saw %u\n"), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/scrub/fscounters.c new/xfsprogs-6.2.0/scrub/fscounters.c --- old/xfsprogs-6.1.1/scrub/fscounters.c 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/scrub/fscounters.c 2023-03-24 10:21:29.000000000 +0100 @@ -138,7 +138,7 @@ *d_blocks = ctx->mnt.fsgeom.datablocks; *d_bfree = fc.freedata; *r_blocks = ctx->mnt.fsgeom.rtblocks; - *r_bfree = fc.freertx; + *r_bfree = fc.freertx * ctx->mnt.fsgeom.rtextsize; *f_files_used = fc.allocino - fc.freeino; return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xfsprogs-6.1.1/spaceman/freesp.c new/xfsprogs-6.2.0/spaceman/freesp.c --- old/xfsprogs-6.1.1/spaceman/freesp.c 2022-09-19 11:10:22.000000000 +0200 +++ new/xfsprogs-6.2.0/spaceman/freesp.c 2023-03-24 10:21:29.000000000 +0100 @@ -284,7 +284,6 @@ speced = 1; break; case 'g': - histcount = 0; gflag++; break; case 'h':