import xfsprogs-5.0.0-3.el8
This commit is contained in:
commit
ca1f0b927c
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
SOURCES/xfsprogs-5.0.0.tar.xz
|
1
.xfsprogs.metadata
Normal file
1
.xfsprogs.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
1a3d7ce8ebf75e001463162e4a44c0f5bf0beab7 SOURCES/xfsprogs-5.0.0.tar.xz
|
74
SOURCES/xfsprogs-4.17.0-reflink-default.patch
Normal file
74
SOURCES/xfsprogs-4.17.0-reflink-default.patch
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
Index: xfsprogs-4.19.0/mkfs/xfs_mkfs.c
|
||||||
|
===================================================================
|
||||||
|
--- xfsprogs-4.19.0.orig/mkfs/xfs_mkfs.c
|
||||||
|
+++ xfsprogs-4.19.0/mkfs/xfs_mkfs.c
|
||||||
|
@@ -1973,15 +1973,15 @@ _("Directory ftype field always enabled
|
||||||
|
usage();
|
||||||
|
}
|
||||||
|
|
||||||
|
- } else {
|
||||||
|
+ } else { /* !crcs_enabled */
|
||||||
|
/*
|
||||||
|
- * The kernel doesn't currently support crc=0,finobt=1
|
||||||
|
- * filesystems. If crcs are not enabled and the user has not
|
||||||
|
- * explicitly turned finobt on, then silently turn it off to
|
||||||
|
- * avoid an unnecessary warning.
|
||||||
|
+ * The kernel doesn't support crc=0,finobt=1 filesystems.
|
||||||
|
+ * If crcs are not enabled and the user has not explicitly
|
||||||
|
+ * turned finobt on, then silently turn it off to avoid an
|
||||||
|
+ * unnecessary warning.
|
||||||
|
* If the user explicitly tried to use crc=0,finobt=1,
|
||||||
|
* then issue an error.
|
||||||
|
- * The same is also for sparse inodes.
|
||||||
|
+ * The same is also true for sparse inodes and reflink.
|
||||||
|
*/
|
||||||
|
if (cli->sb_feat.finobt && cli_opt_set(&mopts, M_FINOBT)) {
|
||||||
|
fprintf(stderr,
|
||||||
|
@@ -2004,7 +2004,7 @@ _("rmapbt not supported without CRC supp
|
||||||
|
}
|
||||||
|
cli->sb_feat.rmapbt = false;
|
||||||
|
|
||||||
|
- if (cli->sb_feat.reflink) {
|
||||||
|
+ if (cli->sb_feat.reflink && cli_opt_set(&mopts, M_REFLINK)) {
|
||||||
|
fprintf(stderr,
|
||||||
|
_("reflink not supported without CRC support\n"));
|
||||||
|
usage();
|
||||||
|
@@ -3788,7 +3788,7 @@ main(
|
||||||
|
.finobt = true,
|
||||||
|
.spinodes = true,
|
||||||
|
.rmapbt = false,
|
||||||
|
- .reflink = false,
|
||||||
|
+ .reflink = true,
|
||||||
|
.parent_pointers = false,
|
||||||
|
.nodalign = false,
|
||||||
|
.nortalign = false,
|
||||||
|
Index: xfsprogs-4.19.0/man/man8/mkfs.xfs.8
|
||||||
|
===================================================================
|
||||||
|
--- xfsprogs-4.19.0.orig/man/man8/mkfs.xfs.8
|
||||||
|
+++ xfsprogs-4.19.0/man/man8/mkfs.xfs.8
|
||||||
|
@@ -229,9 +229,9 @@ mapping will be changed to the new block
|
||||||
|
enables the creation of per-file snapshots and deduplication. It is only
|
||||||
|
available for the data forks of regular files.
|
||||||
|
.IP
|
||||||
|
-By default,
|
||||||
|
+By default in Red Hat Enterprise Linux 8,
|
||||||
|
.B mkfs.xfs
|
||||||
|
-will not create reference count btrees and therefore will not enable the
|
||||||
|
+will create reference count btrees and therefore will enable the
|
||||||
|
reflink feature. This feature is only available for filesystems created with
|
||||||
|
the (default)
|
||||||
|
.B \-m crc=1
|
||||||
|
@@ -239,6 +239,13 @@ option set. When the option
|
||||||
|
.B \-m crc=0
|
||||||
|
is used, the reference count btree feature is not supported and reflink is
|
||||||
|
disabled.
|
||||||
|
+.IP
|
||||||
|
+Note: the filesystem DAX mount option (
|
||||||
|
+.B \-o dax
|
||||||
|
+) is incompatible with
|
||||||
|
+reflink-enabled XFS filesystems. To use filesystem DAX with XFS, specify the
|
||||||
|
+.B \-m reflink=0
|
||||||
|
+option to mkfs.xfs to disable the reflink feature.
|
||||||
|
.RE
|
||||||
|
.TP
|
||||||
|
.BI \-d " data_section_options"
|
@ -0,0 +1,60 @@
|
|||||||
|
From 9c726ef0d2d829ae83756d3817f271e9c2c8777a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Eric Sandeen <sandeen@redhat.com>
|
||||||
|
Date: Wed, 10 Jul 2019 11:35:07 -0400
|
||||||
|
Subject: [PATCH] mkfs: don't use xfs_verify_fsbno() before m_sb is fully set
|
||||||
|
up
|
||||||
|
|
||||||
|
Commit 8da5298 mkfs: validate start and end of aligned logs stopped
|
||||||
|
open-coding log end block checks, and used xfs_verify_fsbno() instead.
|
||||||
|
It also used xfs_verify_fsbno() to validate the log start. This
|
||||||
|
seemed to make sense, but then xfs/306 started failing on 4k sector
|
||||||
|
filesystems, which leads to a log striep unite being set on a single
|
||||||
|
AG filesystem.
|
||||||
|
|
||||||
|
As it turns out, if xfs_verify_fsbno() is testing a block in the
|
||||||
|
last AG, it needs to have mp->m_sb.sb_dblocks set, which isn't done
|
||||||
|
until later. With sb_dblocks unset we can't know how many blocks
|
||||||
|
are in the last AG, and hence can't validate it.
|
||||||
|
|
||||||
|
To fix all this, go back to open-coding the checks; note that this
|
||||||
|
/does/ rely on m_sb.sb_agblklog being set, but that /is/ already
|
||||||
|
done in the early call to start_superblock_setup().
|
||||||
|
|
||||||
|
Fixes: 8da5298 ("mkfs: validate start and end of aligned logs")
|
||||||
|
Reported-by: Dave Chinner <david@fromorbit.com>
|
||||||
|
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
|
||||||
|
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
|
||||||
|
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
|
||||||
|
---
|
||||||
|
mkfs/xfs_mkfs.c | 7 +++----
|
||||||
|
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
|
||||||
|
index 468b8fde..4e576a5c 100644
|
||||||
|
--- a/mkfs/xfs_mkfs.c
|
||||||
|
+++ b/mkfs/xfs_mkfs.c
|
||||||
|
@@ -3040,7 +3040,7 @@ align_internal_log(
|
||||||
|
cfg->logstart = ((cfg->logstart + (sunit - 1)) / sunit) * sunit;
|
||||||
|
|
||||||
|
/* If our log start overlaps the next AG's metadata, fail. */
|
||||||
|
- if (!xfs_verify_fsbno(mp, cfg->logstart)) {
|
||||||
|
+ if (XFS_FSB_TO_AGBNO(mp, cfg->logstart) <= XFS_AGFL_BLOCK(mp)) {
|
||||||
|
fprintf(stderr,
|
||||||
|
_("Due to stripe alignment, the internal log start (%lld) cannot be aligned\n"
|
||||||
|
"within an allocation group.\n"),
|
||||||
|
@@ -3051,10 +3051,9 @@ _("Due to stripe alignment, the internal log start (%lld) cannot be aligned\n"
|
||||||
|
/* round up/down the log size now */
|
||||||
|
align_log_size(cfg, sunit);
|
||||||
|
|
||||||
|
- /* check the aligned log still fits in an AG. */
|
||||||
|
+ /* check the aligned log still starts and ends in the same AG. */
|
||||||
|
logend = cfg->logstart + cfg->logblocks - 1;
|
||||||
|
- if (XFS_FSB_TO_AGNO(mp, cfg->logstart) != XFS_FSB_TO_AGNO(mp, logend) ||
|
||||||
|
- !xfs_verify_fsbno(mp, logend)) {
|
||||||
|
+ if (XFS_FSB_TO_AGNO(mp, cfg->logstart) != XFS_FSB_TO_AGNO(mp, logend)) {
|
||||||
|
fprintf(stderr,
|
||||||
|
_("Due to stripe alignment, the internal log size (%lld) is too large.\n"
|
||||||
|
"Must fit within an allocation group.\n"),
|
||||||
|
--
|
||||||
|
2.17.0
|
||||||
|
|
@ -0,0 +1,52 @@
|
|||||||
|
From 8da52988ad210958f21c178620bb1e44f1188cd0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Darrick J. Wong" <darrick.wong@oracle.com>
|
||||||
|
Date: Tue, 25 Jun 2019 17:04:42 -0400
|
||||||
|
Subject: [PATCH] mkfs: validate start and end of aligned logs
|
||||||
|
|
||||||
|
Validate that the start and end of the log stay within a single AG if
|
||||||
|
we adjust either end to align to stripe units.
|
||||||
|
|
||||||
|
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
||||||
|
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
|
||||||
|
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
|
||||||
|
---
|
||||||
|
mkfs/xfs_mkfs.c | 15 ++++++++++++++-
|
||||||
|
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
|
||||||
|
index ddb25ecc..468b8fde 100644
|
||||||
|
--- a/mkfs/xfs_mkfs.c
|
||||||
|
+++ b/mkfs/xfs_mkfs.c
|
||||||
|
@@ -3033,15 +3033,28 @@ align_internal_log(
|
||||||
|
struct xfs_mount *mp,
|
||||||
|
int sunit)
|
||||||
|
{
|
||||||
|
+ uint64_t logend;
|
||||||
|
+
|
||||||
|
/* round up log start if necessary */
|
||||||
|
if ((cfg->logstart % sunit) != 0)
|
||||||
|
cfg->logstart = ((cfg->logstart + (sunit - 1)) / sunit) * sunit;
|
||||||
|
|
||||||
|
+ /* If our log start overlaps the next AG's metadata, fail. */
|
||||||
|
+ if (!xfs_verify_fsbno(mp, cfg->logstart)) {
|
||||||
|
+ fprintf(stderr,
|
||||||
|
+_("Due to stripe alignment, the internal log start (%lld) cannot be aligned\n"
|
||||||
|
+ "within an allocation group.\n"),
|
||||||
|
+ (long long) cfg->logstart);
|
||||||
|
+ usage();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/* round up/down the log size now */
|
||||||
|
align_log_size(cfg, sunit);
|
||||||
|
|
||||||
|
/* check the aligned log still fits in an AG. */
|
||||||
|
- if (cfg->logblocks > cfg->agsize - XFS_FSB_TO_AGBNO(mp, cfg->logstart)) {
|
||||||
|
+ logend = cfg->logstart + cfg->logblocks - 1;
|
||||||
|
+ if (XFS_FSB_TO_AGNO(mp, cfg->logstart) != XFS_FSB_TO_AGNO(mp, logend) ||
|
||||||
|
+ !xfs_verify_fsbno(mp, logend)) {
|
||||||
|
fprintf(stderr,
|
||||||
|
_("Due to stripe alignment, the internal log size (%lld) is too large.\n"
|
||||||
|
"Must fit within an allocation group.\n"),
|
||||||
|
--
|
||||||
|
2.17.0
|
||||||
|
|
@ -0,0 +1,42 @@
|
|||||||
|
From 59cf967983f6aaff4ce33a50135ae57032ebd8f2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Allison Collins <allison.henderson@oracle.com>
|
||||||
|
Date: Wed, 10 Jul 2019 11:38:04 -0400
|
||||||
|
Subject: [PATCH] xfsprogs: Fix uninitialized cfg->lsunit
|
||||||
|
|
||||||
|
While investigating another mkfs bug, noticed that cfg->lsunit is sometimes
|
||||||
|
left uninitialized when it should not. This is because calc_stripe_factors
|
||||||
|
in some cases needs cfg->loginternal to be set first. This is done in
|
||||||
|
validate_logdev. So move calc_stripe_factors below validate_logdev while
|
||||||
|
parsing configs.
|
||||||
|
|
||||||
|
Signed-off-by: Allison Collins <allison.henderson@oracle.com>
|
||||||
|
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
|
||||||
|
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
|
||||||
|
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
|
||||||
|
---
|
||||||
|
mkfs/xfs_mkfs.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
|
||||||
|
index 79377b12..65cf1e0f 100644
|
||||||
|
--- a/mkfs/xfs_mkfs.c
|
||||||
|
+++ b/mkfs/xfs_mkfs.c
|
||||||
|
@@ -4007,7 +4007,6 @@ main(
|
||||||
|
cfg.rtblocks = calc_dev_size(cli.rtsize, &cfg, &ropts, R_SIZE, "rt");
|
||||||
|
|
||||||
|
validate_rtextsize(&cfg, &cli, &ft);
|
||||||
|
- calc_stripe_factors(&cfg, &cli, &ft);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Open and validate the device configurations
|
||||||
|
@@ -4017,6 +4016,7 @@ main(
|
||||||
|
validate_datadev(&cfg, &cli);
|
||||||
|
validate_logdev(&cfg, &cli, &logfile);
|
||||||
|
validate_rtdev(&cfg, &cli, &rtfile);
|
||||||
|
+ calc_stripe_factors(&cfg, &cli, &ft);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* At this point when know exactly what size all the devices are,
|
||||||
|
--
|
||||||
|
2.17.0
|
||||||
|
|
@ -0,0 +1,70 @@
|
|||||||
|
From 7e8275f8939988f18f9a4a596381ca215fde2270 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Eric Sandeen <sandeen@redhat.com>
|
||||||
|
Date: Mon, 4 Nov 2019 15:35:49 -0500
|
||||||
|
Subject: [PATCH] xfs_growfs: allow mounted device node as argument
|
||||||
|
|
||||||
|
Up until:
|
||||||
|
|
||||||
|
b97815a0 xfs_growfs: ensure target path is an active xfs mountpoint
|
||||||
|
|
||||||
|
xfs_growfs actually accepted a mounted block device name as the
|
||||||
|
primary argument, because it could be found in the mount table.
|
||||||
|
|
||||||
|
It turns out that Ansible was making use of this undocumented behavior,
|
||||||
|
and it's trivial to allow it, so put it back in place and document
|
||||||
|
it this time.
|
||||||
|
|
||||||
|
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
|
||||||
|
Reviewed-by: Christoph Hellwig <hch@lst.de>
|
||||||
|
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
|
||||||
|
---
|
||||||
|
growfs/xfs_growfs.c | 3 +++
|
||||||
|
man/man8/xfs_growfs.8 | 10 +++++++++-
|
||||||
|
2 files changed, 12 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/growfs/xfs_growfs.c b/growfs/xfs_growfs.c
|
||||||
|
index eab15984..6c62833b 100644
|
||||||
|
--- a/growfs/xfs_growfs.c
|
||||||
|
+++ b/growfs/xfs_growfs.c
|
||||||
|
@@ -141,6 +141,9 @@ main(int argc, char **argv)
|
||||||
|
}
|
||||||
|
|
||||||
|
fs = fs_table_lookup_mount(rpath);
|
||||||
|
+ if (!fs)
|
||||||
|
+ fs = fs_table_lookup_blkdev(rpath);
|
||||||
|
+
|
||||||
|
if (!fs) {
|
||||||
|
fprintf(stderr, _("%s: %s is not a mounted XFS filesystem\n"),
|
||||||
|
progname, argv[optind]);
|
||||||
|
diff --git a/man/man8/xfs_growfs.8 b/man/man8/xfs_growfs.8
|
||||||
|
index 7e6a387c..60a88189 100644
|
||||||
|
--- a/man/man8/xfs_growfs.8
|
||||||
|
+++ b/man/man8/xfs_growfs.8
|
||||||
|
@@ -35,7 +35,12 @@ xfs_growfs \- expand an XFS filesystem
|
||||||
|
.B \-R
|
||||||
|
.I size
|
||||||
|
]
|
||||||
|
+[
|
||||||
|
.I mount-point
|
||||||
|
+|
|
||||||
|
+.I block-device
|
||||||
|
+]
|
||||||
|
+
|
||||||
|
.br
|
||||||
|
.B xfs_growfs \-V
|
||||||
|
.SH DESCRIPTION
|
||||||
|
@@ -45,7 +50,10 @@ expands an existing XFS filesystem (see
|
||||||
|
The
|
||||||
|
.I mount-point
|
||||||
|
argument is the pathname of the directory where the filesystem
|
||||||
|
-is mounted. The filesystem must be mounted to be grown (see
|
||||||
|
+is mounted. The
|
||||||
|
+.I block-device
|
||||||
|
+argument is the device name of a mounted XFS filesystem.
|
||||||
|
+The filesystem must be mounted to be grown (see
|
||||||
|
.BR mount (8)).
|
||||||
|
The existing contents of the filesystem are undisturbed, and the added space
|
||||||
|
becomes available for additional file storage.
|
||||||
|
--
|
||||||
|
2.17.0
|
||||||
|
|
@ -0,0 +1,112 @@
|
|||||||
|
From 9d6023a856a1c4f84415dff59b0d5459cc8768db Mon Sep 17 00:00:00 2001
|
||||||
|
From: Eric Sandeen <sandeen@redhat.com>
|
||||||
|
Date: Thu, 27 Feb 2020 15:05:48 -0500
|
||||||
|
Subject: [PATCH] libxfs: use FALLOC_FL_ZERO_RANGE in libxfs_device_zero
|
||||||
|
|
||||||
|
I had a request from someone who cared about mkfs speed over
|
||||||
|
a slower network block device to look into using faster zeroing
|
||||||
|
methods, particularly for the log, during mkfs.
|
||||||
|
|
||||||
|
Using FALLOC_FL_ZERO_RANGE is faster in this case than writing
|
||||||
|
a bunch of zeros across a wire.
|
||||||
|
|
||||||
|
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
|
||||||
|
Reviewed-by: Christoph Hellwig <hch@lst.de>
|
||||||
|
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
|
||||||
|
---
|
||||||
|
include/builddefs.in | 3 +++
|
||||||
|
include/linux.h | 22 ++++++++++++++++++++++
|
||||||
|
libxfs/rdwr.c | 15 +++++++++++----
|
||||||
|
3 files changed, 36 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/include/builddefs.in b/include/builddefs.in
|
||||||
|
index 4700b52..1dd27f7 100644
|
||||||
|
--- a/include/builddefs.in
|
||||||
|
+++ b/include/builddefs.in
|
||||||
|
@@ -144,6 +144,9 @@ endif
|
||||||
|
ifeq ($(HAVE_GETFSMAP),yes)
|
||||||
|
PCFLAGS+= -DHAVE_GETFSMAP
|
||||||
|
endif
|
||||||
|
+ifeq ($(HAVE_FALLOCATE),yes)
|
||||||
|
+PCFLAGS += -DHAVE_FALLOCATE
|
||||||
|
+endif
|
||||||
|
|
||||||
|
LIBICU_LIBS = @libicu_LIBS@
|
||||||
|
LIBICU_CFLAGS = @libicu_CFLAGS@
|
||||||
|
diff --git a/include/linux.h b/include/linux.h
|
||||||
|
index 8f3c32b..57726bb 100644
|
||||||
|
--- a/include/linux.h
|
||||||
|
+++ b/include/linux.h
|
||||||
|
@@ -20,6 +20,10 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <asm/types.h>
|
||||||
|
#include <mntent.h>
|
||||||
|
+#include <fcntl.h>
|
||||||
|
+#if defined(HAVE_FALLOCATE)
|
||||||
|
+#include <linux/falloc.h>
|
||||||
|
+#endif
|
||||||
|
#ifdef OVERRIDE_SYSTEM_FSXATTR
|
||||||
|
# define fsxattr sys_fsxattr
|
||||||
|
#endif
|
||||||
|
@@ -164,6 +168,24 @@ static inline void platform_mntent_close(struct mntent_cursor * cursor)
|
||||||
|
endmntent(cursor->mtabp);
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if defined(FALLOC_FL_ZERO_RANGE)
|
||||||
|
+static inline int
|
||||||
|
+platform_zero_range(
|
||||||
|
+ int fd,
|
||||||
|
+ xfs_off_t start,
|
||||||
|
+ size_t len)
|
||||||
|
+{
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ ret = fallocate(fd, FALLOC_FL_ZERO_RANGE, start, len);
|
||||||
|
+ if (!ret)
|
||||||
|
+ return 0;
|
||||||
|
+ return -errno;
|
||||||
|
+}
|
||||||
|
+#else
|
||||||
|
+#define platform_zero_range(fd, s, l) (-EOPNOTSUPP)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Check whether we have to define FS_IOC_FS[GS]ETXATTR ourselves. These
|
||||||
|
* are a copy of the definitions moved to linux/uapi/fs.h in the 4.5 kernel,
|
||||||
|
diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
|
||||||
|
index 0d9d720..e2d9d79 100644
|
||||||
|
--- a/libxfs/rdwr.c
|
||||||
|
+++ b/libxfs/rdwr.c
|
||||||
|
@@ -61,8 +61,18 @@ libxfs_device_zero(struct xfs_buftarg *btp, xfs_daddr_t start, uint len)
|
||||||
|
{
|
||||||
|
xfs_off_t start_offset, end_offset, offset;
|
||||||
|
ssize_t zsize, bytes;
|
||||||
|
+ size_t len_bytes;
|
||||||
|
char *z;
|
||||||
|
- int fd;
|
||||||
|
+ int error, fd;
|
||||||
|
+
|
||||||
|
+ fd = libxfs_device_to_fd(btp->dev);
|
||||||
|
+ start_offset = LIBXFS_BBTOOFF64(start);
|
||||||
|
+
|
||||||
|
+ /* try to use special zeroing methods, fall back to writes if needed */
|
||||||
|
+ len_bytes = LIBXFS_BBTOOFF64(len);
|
||||||
|
+ error = platform_zero_range(fd, start_offset, len_bytes);
|
||||||
|
+ if (!error)
|
||||||
|
+ return 0;
|
||||||
|
|
||||||
|
zsize = min(BDSTRAT_SIZE, BBTOB(len));
|
||||||
|
if ((z = memalign(libxfs_device_alignment(), zsize)) == NULL) {
|
||||||
|
@@ -73,9 +83,6 @@ libxfs_device_zero(struct xfs_buftarg *btp, xfs_daddr_t start, uint len)
|
||||||
|
}
|
||||||
|
memset(z, 0, zsize);
|
||||||
|
|
||||||
|
- fd = libxfs_device_to_fd(btp->dev);
|
||||||
|
- start_offset = LIBXFS_BBTOOFF64(start);
|
||||||
|
-
|
||||||
|
if ((lseek(fd, start_offset, SEEK_SET)) < 0) {
|
||||||
|
fprintf(stderr, _("%s: %s seek to offset %llu failed: %s\n"),
|
||||||
|
progname, __FUNCTION__,
|
||||||
|
--
|
||||||
|
2.9.5
|
||||||
|
|
249
SPECS/xfsprogs.spec
Normal file
249
SPECS/xfsprogs.spec
Normal file
@ -0,0 +1,249 @@
|
|||||||
|
Summary: Utilities for managing the XFS filesystem
|
||||||
|
Name: xfsprogs
|
||||||
|
Version: 5.0.0
|
||||||
|
Release: 3%{?dist}
|
||||||
|
License: GPL+ and LGPLv2+
|
||||||
|
Group: System Environment/Base
|
||||||
|
URL: https://xfs.wiki.kernel.org
|
||||||
|
Source0: http://kernel.org/pub/linux/utils/fs/xfs/xfsprogs/%{name}-%{version}.tar.xz
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: libtool, gettext, libattr-devel, libuuid-devel
|
||||||
|
BuildRequires: readline-devel, libblkid-devel >= 2.17-0.1.git5e51568
|
||||||
|
BuildRequires: lvm2-devel, libicu-devel >= 4.6
|
||||||
|
Provides: xfs-cmds
|
||||||
|
Obsoletes: xfs-cmds <= %{version}
|
||||||
|
Provides: xfsprogs-qa-devel
|
||||||
|
Obsoletes: xfsprogs-qa-devel <= %{version}
|
||||||
|
Conflicts: xfsdump < 3.0.1
|
||||||
|
|
||||||
|
# reflink is not yet default upstream, but we enabled it as such
|
||||||
|
Patch0: xfsprogs-4.17.0-reflink-default.patch
|
||||||
|
Patch1: xfsprogs-5.1.0-mkfs-validate-start-and-end-of-aligned-logs.patch
|
||||||
|
Patch2: xfsprogs-5.1.0-mkfs-don-t-use-xfs_verify_fsbno-before-m_sb-is-fully.patch
|
||||||
|
Patch3: xfsprogs-5.1.0-xfsprogs-Fix-uninitialized-cfg-lsunit.patch
|
||||||
|
Patch4: xfsprogs-5.3.0-xfs_growfs-allow-mounted-device-node-as-argument.patch
|
||||||
|
Patch5: xfsprogs-5.5.0-libxfs-use-FALLOC_FL_ZERO_RANGE-in-libxfs_device_zer.patch
|
||||||
|
|
||||||
|
%description
|
||||||
|
A set of commands to use the XFS filesystem, including mkfs.xfs.
|
||||||
|
|
||||||
|
XFS is a high performance journaling filesystem which originated
|
||||||
|
on the SGI IRIX platform. It is completely multi-threaded, can
|
||||||
|
support large files and large filesystems, extended attributes,
|
||||||
|
variable block sizes, is extent based, and makes extensive use of
|
||||||
|
Btrees (directories, extents, free space) to aid both performance
|
||||||
|
and scalability.
|
||||||
|
|
||||||
|
This implementation is on-disk compatible with the IRIX version
|
||||||
|
of XFS.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: XFS filesystem-specific headers
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: xfsprogs = %{version}-%{release}, libuuid-devel
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
xfsprogs-devel contains the header files needed to develop XFS
|
||||||
|
filesystem-specific programs.
|
||||||
|
|
||||||
|
You should install xfsprogs-devel if you want to develop XFS
|
||||||
|
filesystem-specific programs, If you install xfsprogs-devel, you'll
|
||||||
|
also want to install xfsprogs.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
export tagname=CC
|
||||||
|
|
||||||
|
%configure \
|
||||||
|
--enable-readline=yes \
|
||||||
|
--enable-blkid=yes \
|
||||||
|
--enable-lto=no \
|
||||||
|
--enable-scrub=no
|
||||||
|
|
||||||
|
# NOTE scrub manpages manually removed below as well
|
||||||
|
|
||||||
|
make V=1 %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
make DIST_ROOT=$RPM_BUILD_ROOT install install-dev \
|
||||||
|
PKG_ROOT_SBIN_DIR=%{_sbindir} PKG_ROOT_LIB_DIR=%{_libdir}
|
||||||
|
|
||||||
|
# nuke .la files, etc
|
||||||
|
rm -f $RPM_BUILD_ROOT/{%{_lib}/*.{la,a,so},%{_libdir}/*.{la,a}}
|
||||||
|
|
||||||
|
# remove non-versioned docs location
|
||||||
|
rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/xfsprogs/
|
||||||
|
|
||||||
|
# Remove scrub manpages
|
||||||
|
rm -rf $RPM_BUILD_ROOT/%{_mandir}/man8/xfs_scrub*
|
||||||
|
|
||||||
|
%find_lang %{name}
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files -f %{name}.lang
|
||||||
|
%doc doc/CHANGES README
|
||||||
|
%{_libdir}/*.so.*
|
||||||
|
%{_mandir}/man5/*
|
||||||
|
%{_mandir}/man8/*
|
||||||
|
%{_sbindir}/*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_mandir}/man2/*
|
||||||
|
%{_mandir}/man3/*
|
||||||
|
%dir %{_includedir}/xfs
|
||||||
|
%{_includedir}/xfs/handle.h
|
||||||
|
%{_includedir}/xfs/jdm.h
|
||||||
|
%{_includedir}/xfs/linux.h
|
||||||
|
%{_includedir}/xfs/xfs.h
|
||||||
|
%{_includedir}/xfs/xfs_arch.h
|
||||||
|
%{_includedir}/xfs/xfs_fs.h
|
||||||
|
%{_includedir}/xfs/xfs_types.h
|
||||||
|
%{_includedir}/xfs/xfs_format.h
|
||||||
|
%{_includedir}/xfs/xfs_da_format.h
|
||||||
|
%{_includedir}/xfs/xfs_log_format.h
|
||||||
|
%{_includedir}/xfs/xqm.h
|
||||||
|
|
||||||
|
%{_libdir}/*.so
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Apr 20 2020 Eric Sandeen <sandeen@redhat.com> 5.0.0-3
|
||||||
|
- mkfs.xfs: use faster log zeroing on supported devices (#1755046)
|
||||||
|
|
||||||
|
* Sat Dec 14 2019 Eric Sandeen <sandeen@redhat.com> 5.0.0-2
|
||||||
|
- mkfs.xfs: validate log stripe unit alignment (#1632596)
|
||||||
|
- xfs_growfs: allow mounted device node as argument (#1765217)
|
||||||
|
|
||||||
|
* Tue May 21 2019 Eric Sandeen <sandeen@redhat.com> 5.0.0-1
|
||||||
|
- New upstream version (#1712147)
|
||||||
|
- mkfs.xfs: validate extent size hint parameters (#1683007)
|
||||||
|
- mkfs.xfs: null-terminate symlinks created via protofile (#1640503)
|
||||||
|
- xfs_repair: allow '/' in attribute names (#1667354)
|
||||||
|
- xfs_info: allow device name as parameter (#1679840)
|
||||||
|
- xfs_quota: fix project inheritance flag handling (#1664105)
|
||||||
|
- xfs_metadump: handle symlinks correctly (#1693074)
|
||||||
|
- xfs_db: fix finobt record decoding with sparse inodes (#1690245)
|
||||||
|
|
||||||
|
* Mon Feb 04 2019 Eric Sandeen <sandeen@redhat.com> 4.19.0-2
|
||||||
|
- xfs_repair: initialize non-leaf finobt blocks with correct magic (#1670153)
|
||||||
|
|
||||||
|
* Tue Nov 27 2018 Eric Sandeen <sandeen@redhat.com> 4.19.0-1
|
||||||
|
- New upstream release (#1652248)
|
||||||
|
- Note reflink default in mkfs.xfs manpage (#1641698)
|
||||||
|
- Fix xfs_db sign extension in agi freecount (#1640090)
|
||||||
|
- Fix xfs_repair hang on large filesystem (#1630674)
|
||||||
|
|
||||||
|
* Tue Sep 25 2018 Eric Sandeen <sandeen@redhat.com> 4.18.0-3
|
||||||
|
- Remove experimental xfs_scrub utility (#1623301)
|
||||||
|
|
||||||
|
* Wed Sep 19 2018 Eric Sandeen <sandeen@redhat.com> 4.18.0-2
|
||||||
|
- Fix annobin checks (#1630641)
|
||||||
|
|
||||||
|
* Tue Aug 28 2018 Eric Sandeen <sandeen@redhat.com> 4.18.0-1
|
||||||
|
- New upstream release (#1623695)
|
||||||
|
|
||||||
|
* Mon Aug 13 2018 Eric Sandeen <sandeen@redhat.com> 4.17.0-4
|
||||||
|
- Disable reflink automatically if crcs are disabled (#1600610)
|
||||||
|
|
||||||
|
* Wed Aug 01 2018 Charalampos Stratakis <cstratak@redhat.com> - 4.17.0-3
|
||||||
|
- Rebuild for platform-python
|
||||||
|
|
||||||
|
* Thu Jun 28 2018 Eric Sandeen <sandeen@redhat.com> 4.17.0-2
|
||||||
|
- Default mkfs to reflink enabled (#1494028)
|
||||||
|
|
||||||
|
* Thu Jun 28 2018 Eric Sandeen <sandeen@redhat.com> 4.17.0-1
|
||||||
|
- New upstream release
|
||||||
|
- Clean up spec file
|
||||||
|
|
||||||
|
* Mon Feb 26 2018 Eric Sandeen <sandeen@redhat.com> 4.15.1-1
|
||||||
|
- New upstream release
|
||||||
|
- Update Polish translation
|
||||||
|
|
||||||
|
* Mon Feb 26 2018 Eric Sandeen <sandeen@redhat.com> 4.15.0-2
|
||||||
|
- BuildRequires: gcc
|
||||||
|
|
||||||
|
* Sat Feb 24 2018 Eric Sandeen <sandeen@redhat.com> 4.15.0-1
|
||||||
|
- New upstream release
|
||||||
|
- Adds new xfs_scrub utility and services
|
||||||
|
|
||||||
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.14.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Nov 27 2017 Eric Sandeen <sandeen@redhat.com> 4.14.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Wed Sep 27 2017 Eric Sandeen <sandeen@redhat.com> 4.13.1-1
|
||||||
|
- New upstream release
|
||||||
|
- Trim ancient changelog
|
||||||
|
|
||||||
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.0-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Jul 30 2017 Florian Weimer <fweimer@redhat.com> - 4.12.0-3
|
||||||
|
- Rebuild with binutils fix for ppc64le (#1475636)
|
||||||
|
|
||||||
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jul 24 2017 Eric Sandeen <sandeen@redhat.com> 4.12.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Fri May 05 2017 Eric Sandeen <sandeen@redhat.com> 4.11.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Sun Feb 26 2017 Eric Sandeen <sandeen@redhat.com> 4.10.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.9.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 4.9.0-2
|
||||||
|
- Rebuild for readline 7.x
|
||||||
|
|
||||||
|
* Thu Jan 05 2017 Eric Sandeen <sandeen@redhat.com> 4.9.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Tue Oct 18 2016 Eric Sandeen <sandeen@redhat.com> 4.8.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Tue Sep 06 2016 Eric Sandeen <sandeen@redhat.com> 4.7.0-2
|
||||||
|
- Add libattr-devel build dependency to fix xfs_fsr
|
||||||
|
|
||||||
|
* Sun Sep 04 2016 Eric Sandeen <sandeen@redhat.com> 4.7.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Tue Mar 15 2016 Eric Sandeen <sandeen@redhat.com> 4.5.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Thu Mar 10 2016 Eric Sandeen <sandeen@redhat.com> 4.3.0-3
|
||||||
|
- Fix build w/ new kernels which have [sg]etxattr promotion
|
||||||
|
|
||||||
|
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Nov 30 2015 Eric Sandeen <sandeen@redhat.com> 4.3.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Wed Sep 09 2015 Eric Sandeen <sandeen@redhat.com> 4.2.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Thu Jul 30 2015 Eric Sandeen <sandeen@redhat.com> 3.2.4-1
|
||||||
|
- New upstream release
|
||||||
|
- Addresses CVE-2012-2150 for xfs_metadump
|
||||||
|
|
||||||
|
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.3-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jun 10 2015 Eric Sandeen <sandeen@redhat.com> 3.2.3-1
|
||||||
|
- New upstream release
|
Loading…
Reference in New Issue
Block a user