Compare commits
48 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1cd5e80544 | ||
|
|
940e138031 | ||
|
|
0d360ede59 | ||
|
|
9914a4c60a | ||
|
|
11929a3761 | ||
|
|
5a9f1acadd | ||
|
|
e87fb43e6f | ||
|
|
2a63457c45 | ||
|
|
8a2056d72b | ||
|
|
c378aa91c6 | ||
|
|
1e1999af85 | ||
|
|
5af69c86ff | ||
|
|
05ff9d3929 | ||
|
|
56e8974ead | ||
|
|
009a3940f3 | ||
|
|
c1bedfabfa | ||
|
|
a074a7436d | ||
|
|
f0844f3308 | ||
|
|
ee35a59aa6 | ||
|
|
bcaa73a827 | ||
|
|
01606e25fc | ||
|
|
9791e7be60 | ||
|
|
a65087a00f | ||
|
|
061d248773 | ||
|
|
467059d2ea | ||
|
|
11c4e7ef47 | ||
|
|
b2747aceae | ||
|
|
a72c2fad78 | ||
|
|
a04af2238d | ||
|
|
0d73d64ad4 | ||
|
|
6eafa31975 | ||
|
|
6120ebbdbf | ||
|
|
e35859f0ef | ||
|
|
08330317c4 | ||
|
|
d1928c796c | ||
|
|
83a09d5373 | ||
|
|
c3751bb143 | ||
|
|
5447989ec9 | ||
|
|
a9525bd22d | ||
|
|
4593ae723d | ||
|
|
0b214d7cb0 | ||
|
|
8ee10a8095 | ||
|
|
6d1e4a09ae | ||
|
|
b4080e636c | ||
|
|
4f06f7e039 | ||
|
|
9b97d62de8 | ||
|
|
c9f9414bb5 | ||
|
|
6a770f893c |
15 changed files with 5880 additions and 881 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
13
.gitignore
vendored
13
.gitignore
vendored
|
|
@ -1,7 +1,6 @@
|
|||
/gfs2-utils-3.1.0.tar.gz
|
||||
/gfs2-utils-3.1.1.tar.gz
|
||||
/gfs2-utils-3.1.2.tar.gz
|
||||
/gfs2-utils-3.1.3.tar.gz
|
||||
/gfs2-utils-3.1.4.tar.gz
|
||||
/gfs2-utils-3.1.5.tar.gz
|
||||
/gfs2-utils-3.1.6.tar.gz
|
||||
/gfs2-utils-3.3.0.tar.gz
|
||||
/gfs2-utils-3.4.0.tar.gz
|
||||
/gfs2-utils-3.4.1.tar.gz
|
||||
/gfs2-utils-3.5.0.tar.gz
|
||||
/gfs2-utils-3.5.1.tar.gz
|
||||
/gfs2-utils-3.6.1.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,183 +0,0 @@
|
|||
commit 23bcbc3512a6609216b6884a3bf088684d1e7c72
|
||||
Author: Andrew Price <anprice@redhat.com>
|
||||
Date: Thu Aug 8 17:50:47 2013 +0100
|
||||
|
||||
gfs2_grow: Don't try to open an empty string
|
||||
|
||||
sdp->device_name wasn't getting set in gfs2_grow so is_gfs2() (called
|
||||
via check_for_gfs2()) fails to open "" and so we get an ENOENT.
|
||||
|
||||
This fixes the open("") by setting sdp->device_name before passing it to
|
||||
is_pathname_mounted(), which has been updated to make it more clear
|
||||
which args will be modified by it.
|
||||
|
||||
is_gfs2() and check_for_gfs2() have also been removed from libgfs2 as
|
||||
these were the only places they were being called and they aren't
|
||||
needed: superblock checking is done further along via other functions
|
||||
calling check_sb().
|
||||
|
||||
Signed-off-by: Andrew Price <anprice@redhat.com>
|
||||
|
||||
diff --git a/gfs2/fsck/initialize.c b/gfs2/fsck/initialize.c
|
||||
index b45ae08..6612fe7 100644
|
||||
--- a/gfs2/fsck/initialize.c
|
||||
+++ b/gfs2/fsck/initialize.c
|
||||
@@ -1491,7 +1491,7 @@ int initialize(struct gfs2_sbd *sdp, int force_check, int preen,
|
||||
strncpy(sdp->device_name, opts.device,
|
||||
sizeof(sdp->device_name));
|
||||
sdp->path_name = sdp->device_name; /* This gets overwritten */
|
||||
- is_mounted = is_pathname_mounted(sdp, &ro);
|
||||
+ is_mounted = is_pathname_mounted(sdp->path_name, sdp->device_name, &ro);
|
||||
/* If the device is busy, but not because it's mounted, fail.
|
||||
This protects against cases where the file system is LVM
|
||||
and perhaps mounted on a different node. */
|
||||
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
|
||||
index fe7129a..e994d3b 100644
|
||||
--- a/gfs2/libgfs2/libgfs2.h
|
||||
+++ b/gfs2/libgfs2/libgfs2.h
|
||||
@@ -716,11 +716,9 @@ extern void decrease_verbosity(void);
|
||||
extern int compute_heightsize(struct gfs2_sbd *sdp, uint64_t *heightsize,
|
||||
uint32_t *maxheight, uint32_t bsize1, int diptrs, int inptrs);
|
||||
extern int compute_constants(struct gfs2_sbd *sdp);
|
||||
-extern int is_pathname_mounted(struct gfs2_sbd *sdp, int *ro_mount);
|
||||
-extern int is_gfs2(struct gfs2_sbd *sdp);
|
||||
+extern int is_pathname_mounted(char *path_name, char *device_name, int *ro_mount);
|
||||
extern int find_gfs2_meta(struct gfs2_sbd *sdp);
|
||||
extern int dir_exists(const char *dir);
|
||||
-extern int check_for_gfs2(struct gfs2_sbd *sdp);
|
||||
extern int mount_gfs2_meta(struct gfs2_sbd *sdp);
|
||||
extern void cleanup_metafs(struct gfs2_sbd *sdp);
|
||||
extern int set_sysfs(const char *fsname, const char *filename, const char *val);
|
||||
diff --git a/gfs2/libgfs2/misc.c b/gfs2/libgfs2/misc.c
|
||||
index c05a770..6f2dbdb 100644
|
||||
--- a/gfs2/libgfs2/misc.c
|
||||
+++ b/gfs2/libgfs2/misc.c
|
||||
@@ -99,7 +99,7 @@ int compute_constants(struct gfs2_sbd *sdp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int is_pathname_mounted(struct gfs2_sbd *sdp, int *ro_mount)
|
||||
+int is_pathname_mounted(char *path_name, char *device_name, int *ro_mount)
|
||||
{
|
||||
FILE *fp;
|
||||
struct mntent *mnt;
|
||||
@@ -112,7 +112,7 @@ int is_pathname_mounted(struct gfs2_sbd *sdp, int *ro_mount)
|
||||
perror("open: /proc/mounts");
|
||||
return 0;
|
||||
}
|
||||
- if (stat(sdp->path_name, &st_buf) == 0) {
|
||||
+ if (stat(path_name, &st_buf) == 0) {
|
||||
if (S_ISBLK(st_buf.st_mode)) {
|
||||
#ifndef __GNU__ /* The GNU hurd is broken with respect to stat devices */
|
||||
file_rdev = st_buf.st_rdev;
|
||||
@@ -124,12 +124,12 @@ int is_pathname_mounted(struct gfs2_sbd *sdp, int *ro_mount)
|
||||
}
|
||||
while ((mnt = getmntent (fp)) != NULL) {
|
||||
/* Check if they specified the device instead of mnt point */
|
||||
- if (strcmp(sdp->device_name, mnt->mnt_fsname) == 0) {
|
||||
- strcpy(sdp->path_name, mnt->mnt_dir); /* fix it */
|
||||
+ if (strcmp(device_name, mnt->mnt_fsname) == 0) {
|
||||
+ strcpy(path_name, mnt->mnt_dir); /* fix it */
|
||||
break;
|
||||
}
|
||||
- if (strcmp(sdp->path_name, mnt->mnt_dir) == 0) {
|
||||
- strcpy(sdp->device_name, mnt->mnt_fsname); /* fix it */
|
||||
+ if (strcmp(path_name, mnt->mnt_dir) == 0) {
|
||||
+ strcpy(device_name, mnt->mnt_fsname); /* fix it */
|
||||
break;
|
||||
}
|
||||
if (stat(mnt->mnt_fsname, &st_buf) == 0) {
|
||||
@@ -160,36 +160,6 @@ int is_pathname_mounted(struct gfs2_sbd *sdp, int *ro_mount)
|
||||
return 1; /* mounted */
|
||||
}
|
||||
|
||||
-int is_gfs2(struct gfs2_sbd *sdp)
|
||||
-{
|
||||
- int fd, rc;
|
||||
- struct gfs2_sb sb;
|
||||
-
|
||||
- fd = open(sdp->device_name, O_RDWR);
|
||||
- if (fd < 0)
|
||||
- return 0;
|
||||
-
|
||||
- rc = 0;
|
||||
- if (lseek(fd, GFS2_SB_ADDR * GFS2_BASIC_BLOCK, SEEK_SET) >= 0 &&
|
||||
- read(fd, &sb, sizeof(sb)) == sizeof(sb) &&
|
||||
- be32_to_cpu(sb.sb_header.mh_magic) == GFS2_MAGIC &&
|
||||
- be32_to_cpu(sb.sb_header.mh_type) == GFS2_METATYPE_SB)
|
||||
- rc = 1;
|
||||
- close(fd);
|
||||
- return rc;
|
||||
-}
|
||||
-
|
||||
-int check_for_gfs2(struct gfs2_sbd *sdp)
|
||||
-{
|
||||
- int ro;
|
||||
-
|
||||
- if (!is_pathname_mounted(sdp, &ro))
|
||||
- return -1;
|
||||
- if (!is_gfs2(sdp))
|
||||
- return -1;
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
static int lock_for_admin(struct gfs2_sbd *sdp)
|
||||
{
|
||||
int error;
|
||||
diff --git a/gfs2/mkfs/main_grow.c b/gfs2/mkfs/main_grow.c
|
||||
index 73c7f84..d324af9 100644
|
||||
--- a/gfs2/mkfs/main_grow.c
|
||||
+++ b/gfs2/mkfs/main_grow.c
|
||||
@@ -323,6 +323,7 @@ main_grow(int argc, char *argv[])
|
||||
int rgcount, rindex_fd;
|
||||
char rindex_name[PATH_MAX];
|
||||
int error = EXIT_SUCCESS;
|
||||
+ int ro_mnt = 0;
|
||||
|
||||
memset(sdp, 0, sizeof(struct gfs2_sbd));
|
||||
sdp->bsize = GFS2_DEFAULT_BSIZE;
|
||||
@@ -336,17 +337,20 @@ main_grow(int argc, char *argv[])
|
||||
int sane;
|
||||
struct rgrp_tree *last_rgrp;
|
||||
|
||||
+ strncpy(sdp->device_name, argv[optind], PATH_MAX - 1);
|
||||
sdp->path_name = argv[optind++];
|
||||
- sdp->path_fd = open(sdp->path_name, O_RDONLY | O_CLOEXEC);
|
||||
- if (sdp->path_fd < 0){
|
||||
+
|
||||
+ if ((!is_pathname_mounted(sdp->path_name, sdp->device_name, &ro_mnt))) {
|
||||
perror(sdp->path_name);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
- if (check_for_gfs2(sdp)) {
|
||||
+ sdp->path_fd = open(sdp->path_name, O_RDONLY | O_CLOEXEC);
|
||||
+ if (sdp->path_fd < 0){
|
||||
perror(sdp->path_name);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
+
|
||||
sdp->device_fd = open(sdp->device_name,
|
||||
(test ? O_RDONLY : O_RDWR) | O_CLOEXEC);
|
||||
if (sdp->device_fd < 0){
|
||||
diff --git a/gfs2/mkfs/main_jadd.c b/gfs2/mkfs/main_jadd.c
|
||||
index 58fb046..2646829 100644
|
||||
--- a/gfs2/mkfs/main_jadd.c
|
||||
+++ b/gfs2/mkfs/main_jadd.c
|
||||
@@ -491,6 +491,7 @@ void main_jadd(int argc, char *argv[])
|
||||
{
|
||||
struct gfs2_sbd sbd, *sdp = &sbd;
|
||||
unsigned int total;
|
||||
+ int ro_mnt = 0;
|
||||
|
||||
memset(sdp, 0, sizeof(struct gfs2_sbd));
|
||||
sdp->jsize = GFS2_DEFAULT_JSIZE;
|
||||
@@ -506,7 +507,7 @@ void main_jadd(int argc, char *argv[])
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
- if (check_for_gfs2(sdp)) {
|
||||
+ if (!is_pathname_mounted(sdp->path_name, sdp->device_name, &ro_mnt)) {
|
||||
perror(sdp->path_name);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
@ -1,141 +0,0 @@
|
|||
commit 25c6e51bb4d083eb341bbc8541bb2ad278988f10
|
||||
Author: Andrew Price <anprice@redhat.com>
|
||||
Date: Sat Nov 16 02:10:52 2013 -0600
|
||||
|
||||
libgfs2: Add lgfs2_open_mnt* functions
|
||||
|
||||
lgfs2_open_mnt is a replacement for is_pathname_mounted which tries to reduce
|
||||
races by opening paths speculatively and passing back the open fds once they're
|
||||
known to be correct. lgfs2_open_mnt_{dev,dir} build on this to provide a
|
||||
convenient way to open just the device or mount directory relating to a path
|
||||
which could be either.
|
||||
|
||||
Signed-off-by: Andrew Price <anprice@redhat.com>
|
||||
|
||||
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
|
||||
index f864a08..3e5d09c 100644
|
||||
--- a/gfs2/libgfs2/libgfs2.h
|
||||
+++ b/gfs2/libgfs2/libgfs2.h
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <linux/limits.h>
|
||||
#include <endian.h>
|
||||
#include <byteswap.h>
|
||||
+#include <mntent.h>
|
||||
|
||||
#include <linux/gfs2_ondisk.h>
|
||||
#include "osi_list.h"
|
||||
@@ -715,6 +716,9 @@ extern int compute_heightsize(struct gfs2_sbd *sdp, uint64_t *heightsize,
|
||||
uint32_t *maxheight, uint32_t bsize1, int diptrs, int inptrs);
|
||||
extern int compute_constants(struct gfs2_sbd *sdp);
|
||||
extern int is_pathname_mounted(char *path_name, char *device_name, int *ro_mount);
|
||||
+extern int lgfs2_open_mnt(const char *path, int dirflags, int *dirfd, int devflags, int *devfd, struct mntent **mnt);
|
||||
+extern int lgfs2_open_mnt_dev(const char *path, int flags, struct mntent **mnt);
|
||||
+extern int lgfs2_open_mnt_dir(const char *path, int flags, struct mntent **mnt);
|
||||
extern int find_gfs2_meta(struct gfs2_sbd *sdp);
|
||||
extern int dir_exists(const char *dir);
|
||||
extern int mount_gfs2_meta(struct gfs2_sbd *sdp);
|
||||
diff --git a/gfs2/libgfs2/misc.c b/gfs2/libgfs2/misc.c
|
||||
index 7f500e6..195b983 100644
|
||||
--- a/gfs2/libgfs2/misc.c
|
||||
+++ b/gfs2/libgfs2/misc.c
|
||||
@@ -163,6 +163,100 @@ int is_pathname_mounted(char *path_name, char *device_name, int *ro_mount)
|
||||
return 1; /* mounted */
|
||||
}
|
||||
|
||||
+/* Returns 0 if fd1 and fd2 refer to the same device/file, 1 otherwise, or -1 on error */
|
||||
+static int fdcmp(int fd1, int fd2)
|
||||
+{
|
||||
+ struct stat st1, st2;
|
||||
+ if ((fstat(fd1, &st1) != 0) || (fstat(fd2, &st2) != 0))
|
||||
+ return -1;
|
||||
+ if (S_ISBLK(st1.st_mode) && S_ISBLK(st2.st_mode)) {
|
||||
+ if (st1.st_rdev == st2.st_rdev) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+ } else if ((st1.st_dev == st2.st_dev) && (st1.st_ino == st2.st_ino)) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+int lgfs2_open_mnt(const char *path, int dirflags, int *dirfd, int devflags, int *devfd, struct mntent **mnt)
|
||||
+{
|
||||
+ FILE *fp = setmntent("/proc/mounts", "r");
|
||||
+ if (fp == NULL) {
|
||||
+ perror("open: /proc/mounts");
|
||||
+ return 1;
|
||||
+ }
|
||||
+ /* Assume path is mount point until we know better. */
|
||||
+ *dirfd = open(path, dirflags);
|
||||
+ if (*dirfd < 0)
|
||||
+ return 1;
|
||||
+
|
||||
+ while ((*mnt = getmntent(fp)) != NULL) {
|
||||
+ int fd;
|
||||
+ if (strcmp((*mnt)->mnt_type, "gfs2") != 0)
|
||||
+ continue;
|
||||
+ *devfd = open((*mnt)->mnt_fsname, devflags);
|
||||
+ /* Defer checking *devfd until later: whether it's ok to ignore
|
||||
+ * the error depends on whether we find the mount point. */
|
||||
+
|
||||
+ if (strcmp(path, (*mnt)->mnt_dir) == 0)
|
||||
+ break;
|
||||
+ if (strcmp(path, (*mnt)->mnt_fsname) == 0 || fdcmp(*dirfd, *devfd) == 0) {
|
||||
+ /* We have a match but our above assumption was
|
||||
+ incorrect and *dirfd is actually the device. */
|
||||
+ close(*dirfd);
|
||||
+ *dirfd = open((*mnt)->mnt_dir, dirflags);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ fd = open((*mnt)->mnt_dir, dirflags);
|
||||
+ if (fd >= 0) {
|
||||
+ int diff = fdcmp(*dirfd, fd);
|
||||
+ close(fd);
|
||||
+ if (diff == 0)
|
||||
+ break;
|
||||
+ }
|
||||
+ if (*devfd >= 0)
|
||||
+ close(*devfd);
|
||||
+ }
|
||||
+ endmntent(fp);
|
||||
+ if (*mnt == NULL) {
|
||||
+ close(*dirfd);
|
||||
+ return 0; /* Success. Answer is no. Both fds closed. */
|
||||
+ }
|
||||
+ if (*dirfd < 0) {
|
||||
+ close(*devfd);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ if (*devfd < 0) {
|
||||
+ close(*dirfd);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0; /* Success. Answer is yes. Both fds open. */
|
||||
+}
|
||||
+
|
||||
+int lgfs2_open_mnt_dev(const char *path, int flags, struct mntent **mnt)
|
||||
+{
|
||||
+ int dirfd = -1;
|
||||
+ int devfd = -1;
|
||||
+ if (lgfs2_open_mnt(path, O_RDONLY, &dirfd, flags, &devfd, mnt) != 0)
|
||||
+ return -1;
|
||||
+ if (*mnt != NULL)
|
||||
+ close(dirfd);
|
||||
+ return devfd;
|
||||
+}
|
||||
+
|
||||
+int lgfs2_open_mnt_dir(const char *path, int flags, struct mntent **mnt)
|
||||
+{
|
||||
+ int dirfd = -1;
|
||||
+ int devfd = -1;
|
||||
+ if (lgfs2_open_mnt(path, flags, &dirfd, O_RDONLY, &devfd, mnt) != 0)
|
||||
+ return -1;
|
||||
+ if (*mnt != NULL)
|
||||
+ close(devfd);
|
||||
+ return dirfd;
|
||||
+}
|
||||
+
|
||||
static int lock_for_admin(struct gfs2_sbd *sdp)
|
||||
{
|
||||
int error;
|
||||
|
|
@ -1,168 +0,0 @@
|
|||
commit ad11e277ebd8d01a1b0a29ee9f697ba90c8577a4
|
||||
Author: Andrew Price <anprice@redhat.com>
|
||||
Date: Sat Nov 16 02:19:07 2013 -0600
|
||||
|
||||
Switch is_pathname_mounted callers to lgfs2_open_mnt*
|
||||
|
||||
Use the new lgfs2_open_mnt* functions in fsck.gfs2, gfs2_grow, and gfs2_jadd.
|
||||
|
||||
Signed-off-by: Andrew Price <anprice@redhat.com>
|
||||
|
||||
diff --git a/gfs2/fsck/initialize.c b/gfs2/fsck/initialize.c
|
||||
index 6612fe7..5758607 100644
|
||||
--- a/gfs2/fsck/initialize.c
|
||||
+++ b/gfs2/fsck/initialize.c
|
||||
@@ -1475,8 +1475,7 @@ int initialize(struct gfs2_sbd *sdp, int force_check, int preen,
|
||||
|
||||
sdp->device_fd = open(opts.device, open_flag);
|
||||
if (sdp->device_fd < 0) {
|
||||
- int is_mounted, ro;
|
||||
-
|
||||
+ struct mntent *mnt;
|
||||
if (open_flag == O_RDONLY || errno != EBUSY) {
|
||||
log_crit( _("Unable to open device: %s\n"),
|
||||
opts.device);
|
||||
@@ -1485,30 +1484,23 @@ int initialize(struct gfs2_sbd *sdp, int force_check, int preen,
|
||||
/* We can't open it EXCL. It may be already open rw (in which
|
||||
case we want to deny them access) or it may be mounted as
|
||||
the root file system at boot time (in which case we need to
|
||||
- allow it.) We use is_pathname_mounted here even though
|
||||
- we're specifying a device name, not a path name. The
|
||||
- function checks for device as well. */
|
||||
- strncpy(sdp->device_name, opts.device,
|
||||
- sizeof(sdp->device_name));
|
||||
- sdp->path_name = sdp->device_name; /* This gets overwritten */
|
||||
- is_mounted = is_pathname_mounted(sdp->path_name, sdp->device_name, &ro);
|
||||
- /* If the device is busy, but not because it's mounted, fail.
|
||||
+ allow it.)
|
||||
+ If the device is busy, but not because it's mounted, fail.
|
||||
This protects against cases where the file system is LVM
|
||||
- and perhaps mounted on a different node. */
|
||||
- if (!is_mounted)
|
||||
+ and perhaps mounted on a different node.
|
||||
+ Try opening without O_EXCL. */
|
||||
+ sdp->device_fd = lgfs2_open_mnt_dev(opts.device, O_RDWR, &mnt);
|
||||
+ if (sdp->device_fd < 0)
|
||||
goto mount_fail;
|
||||
/* If the device is mounted, but not mounted RO, fail. This
|
||||
protects them against cases where the file system is
|
||||
mounted RW, but still allows us to check our own root
|
||||
file system. */
|
||||
- if (!ro)
|
||||
- goto mount_fail;
|
||||
+ if (!hasmntopt(mnt, MNTOPT_RO))
|
||||
+ goto close_fail;
|
||||
/* The device is mounted RO, so it's likely our own root
|
||||
file system. We can only do so much to protect the users
|
||||
- from themselves. Try opening without O_EXCL. */
|
||||
- if ((sdp->device_fd = open(opts.device, O_RDWR)) < 0)
|
||||
- goto mount_fail;
|
||||
-
|
||||
+ from themselves. */
|
||||
was_mounted_ro = 1;
|
||||
}
|
||||
|
||||
@@ -1591,6 +1583,8 @@ int initialize(struct gfs2_sbd *sdp, int force_check, int preen,
|
||||
|
||||
return FSCK_OK;
|
||||
|
||||
+close_fail:
|
||||
+ close(sdp->device_fd);
|
||||
mount_fail:
|
||||
log_crit( _("Device %s is busy.\n"), opts.device);
|
||||
return FSCK_USAGE;
|
||||
diff --git a/gfs2/mkfs/main_grow.c b/gfs2/mkfs/main_grow.c
|
||||
index 5db91d9..541b0f2 100644
|
||||
--- a/gfs2/mkfs/main_grow.c
|
||||
+++ b/gfs2/mkfs/main_grow.c
|
||||
@@ -323,7 +323,7 @@ main_grow(int argc, char *argv[])
|
||||
int rgcount, rindex_fd;
|
||||
char rindex_name[PATH_MAX];
|
||||
int error = EXIT_SUCCESS;
|
||||
- int ro_mnt = 0;
|
||||
+ int devflags = (test ? O_RDONLY : O_RDWR) | O_CLOEXEC;
|
||||
|
||||
memset(sdp, 0, sizeof(struct gfs2_sbd));
|
||||
sdp->bsize = GFS2_DEFAULT_BSIZE;
|
||||
@@ -333,30 +333,23 @@ main_grow(int argc, char *argv[])
|
||||
sdp->md.journals = 1;
|
||||
decode_arguments(argc, argv, sdp);
|
||||
|
||||
- while ((argc - optind) > 0) {
|
||||
+ for(; (argc - optind) > 0; optind++) {
|
||||
int sane;
|
||||
+ struct mntent *mnt;
|
||||
struct rgrp_tree *last_rgrp;
|
||||
|
||||
- strncpy(sdp->device_name, argv[optind], PATH_MAX - 1);
|
||||
- sdp->path_name = argv[optind++];
|
||||
-
|
||||
- if ((!is_pathname_mounted(sdp->path_name, sdp->device_name, &ro_mnt))) {
|
||||
- perror(sdp->path_name);
|
||||
- exit(EXIT_FAILURE);
|
||||
- }
|
||||
-
|
||||
- sdp->path_fd = open(sdp->path_name, O_RDONLY | O_CLOEXEC);
|
||||
- if (sdp->path_fd < 0){
|
||||
- perror(sdp->path_name);
|
||||
+ error = lgfs2_open_mnt(argv[optind], O_RDONLY|O_CLOEXEC, &sdp->path_fd,
|
||||
+ devflags, &sdp->device_fd, &mnt);
|
||||
+ if (error != 0) {
|
||||
+ fprintf(stderr, _("Error looking up mount '%s': %s\n"), argv[optind], strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
-
|
||||
- sdp->device_fd = open(sdp->device_name,
|
||||
- (test ? O_RDONLY : O_RDWR) | O_CLOEXEC);
|
||||
- if (sdp->device_fd < 0){
|
||||
- perror(sdp->device_name);
|
||||
- exit(EXIT_FAILURE);
|
||||
+ if (mnt == NULL) {
|
||||
+ fprintf(stderr, _("%s: not a mounted gfs2 file system\n"), argv[optind]);
|
||||
+ continue;
|
||||
}
|
||||
+ sdp->path_name = mnt->mnt_dir;
|
||||
+ strncpy(sdp->device_name, mnt->mnt_fsname, PATH_MAX - 1);
|
||||
|
||||
if (lgfs2_get_dev_info(sdp->device_fd, &sdp->dinfo) < 0) {
|
||||
perror(sdp->device_name);
|
||||
diff --git a/gfs2/mkfs/main_jadd.c b/gfs2/mkfs/main_jadd.c
|
||||
index b6cd8e4..815dd52 100644
|
||||
--- a/gfs2/mkfs/main_jadd.c
|
||||
+++ b/gfs2/mkfs/main_jadd.c
|
||||
@@ -490,8 +490,8 @@ add_j(struct gfs2_sbd *sdp)
|
||||
void main_jadd(int argc, char *argv[])
|
||||
{
|
||||
struct gfs2_sbd sbd, *sdp = &sbd;
|
||||
+ struct mntent *mnt;
|
||||
unsigned int total;
|
||||
- int ro_mnt = 0;
|
||||
|
||||
memset(sdp, 0, sizeof(struct gfs2_sbd));
|
||||
sdp->jsize = GFS2_DEFAULT_JSIZE;
|
||||
@@ -500,17 +500,18 @@ void main_jadd(int argc, char *argv[])
|
||||
|
||||
decode_arguments(argc, argv, sdp);
|
||||
verify_arguments(sdp);
|
||||
-
|
||||
- sdp->path_fd = open(sdp->path_name, O_RDONLY | O_CLOEXEC);
|
||||
- if (sdp->path_fd < 0){
|
||||
- perror(sdp->path_name);
|
||||
+
|
||||
+ sbd.path_fd = lgfs2_open_mnt_dir(sbd.path_name, O_RDONLY|O_CLOEXEC, &mnt);
|
||||
+ if (sbd.path_fd < 0) {
|
||||
+ fprintf(stderr, _("Error looking up mount '%s': %s\n"), sbd.path_name, strerror(errno));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
-
|
||||
- if (!is_pathname_mounted(sdp->path_name, sdp->device_name, &ro_mnt)) {
|
||||
- perror(sdp->path_name);
|
||||
+ if (mnt == NULL) {
|
||||
+ fprintf(stderr, _("%s: not a mounted gfs2 file system\n"), sbd.path_name);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
+ sbd.path_name = mnt->mnt_dir;
|
||||
+ strncpy(sbd.device_name, mnt->mnt_fsname, PATH_MAX - 1);
|
||||
|
||||
gather_info(sdp);
|
||||
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
commit 63db4e964739673d36c430cc5c78b02d93419f8a
|
||||
Author: Andrew Price <anprice@redhat.com>
|
||||
Date: Sat Nov 16 02:21:36 2013 -0600
|
||||
|
||||
libgfs2: Remove is_pathname_mounted
|
||||
|
||||
All callers are now using lgfs2_open_mnt* instead.
|
||||
|
||||
Signed-off-by: Andrew Price <anprice@redhat.com>
|
||||
|
||||
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
|
||||
index 3e5d09c..e785017 100644
|
||||
--- a/gfs2/libgfs2/libgfs2.h
|
||||
+++ b/gfs2/libgfs2/libgfs2.h
|
||||
@@ -715,7 +715,6 @@ extern int metafs_interrupted;
|
||||
extern int compute_heightsize(struct gfs2_sbd *sdp, uint64_t *heightsize,
|
||||
uint32_t *maxheight, uint32_t bsize1, int diptrs, int inptrs);
|
||||
extern int compute_constants(struct gfs2_sbd *sdp);
|
||||
-extern int is_pathname_mounted(char *path_name, char *device_name, int *ro_mount);
|
||||
extern int lgfs2_open_mnt(const char *path, int dirflags, int *dirfd, int devflags, int *devfd, struct mntent **mnt);
|
||||
extern int lgfs2_open_mnt_dev(const char *path, int flags, struct mntent **mnt);
|
||||
extern int lgfs2_open_mnt_dir(const char *path, int flags, struct mntent **mnt);
|
||||
diff --git a/gfs2/libgfs2/misc.c b/gfs2/libgfs2/misc.c
|
||||
index 195b983..c4ed722 100644
|
||||
--- a/gfs2/libgfs2/misc.c
|
||||
+++ b/gfs2/libgfs2/misc.c
|
||||
@@ -102,67 +102,6 @@ int compute_constants(struct gfs2_sbd *sdp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int is_pathname_mounted(char *path_name, char *device_name, int *ro_mount)
|
||||
-{
|
||||
- FILE *fp;
|
||||
- struct mntent *mnt;
|
||||
- dev_t file_dev=0, file_rdev=0;
|
||||
- ino_t file_ino=0;
|
||||
- struct stat st_buf;
|
||||
-
|
||||
- *ro_mount = 0;
|
||||
- if ((fp = setmntent("/proc/mounts", "r")) == NULL) {
|
||||
- perror("open: /proc/mounts");
|
||||
- return 0;
|
||||
- }
|
||||
- if (stat(path_name, &st_buf) == 0) {
|
||||
- if (S_ISBLK(st_buf.st_mode)) {
|
||||
-#ifndef __GNU__ /* The GNU hurd is broken with respect to stat devices */
|
||||
- file_rdev = st_buf.st_rdev;
|
||||
-#endif /* __GNU__ */
|
||||
- } else {
|
||||
- file_dev = st_buf.st_dev;
|
||||
- file_ino = st_buf.st_ino;
|
||||
- }
|
||||
- }
|
||||
- while ((mnt = getmntent (fp)) != NULL) {
|
||||
- /* Check if they specified the device instead of mnt point */
|
||||
- if (strcmp(device_name, mnt->mnt_fsname) == 0) {
|
||||
- strcpy(path_name, mnt->mnt_dir); /* fix it */
|
||||
- break;
|
||||
- }
|
||||
- if (strcmp(path_name, mnt->mnt_dir) == 0) {
|
||||
- strcpy(device_name, mnt->mnt_fsname); /* fix it */
|
||||
- break;
|
||||
- }
|
||||
- if (stat(mnt->mnt_fsname, &st_buf) == 0) {
|
||||
- if (S_ISBLK(st_buf.st_mode)) {
|
||||
-#ifndef __GNU__
|
||||
- if (file_rdev && (file_rdev == st_buf.st_rdev))
|
||||
- break;
|
||||
-#endif /* __GNU__ */
|
||||
- } else {
|
||||
- if (file_dev && ((file_dev == st_buf.st_dev) &&
|
||||
- (file_ino == st_buf.st_ino)))
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- endmntent (fp);
|
||||
- if (mnt == NULL)
|
||||
- return 0;
|
||||
- if (stat(mnt->mnt_dir, &st_buf) < 0) {
|
||||
- if (errno == ENOENT)
|
||||
- return 0;
|
||||
- }
|
||||
- /* Can't trust fstype because / has "rootfs". */
|
||||
- if (file_rdev && (st_buf.st_dev != file_rdev))
|
||||
- return 0;
|
||||
- if (hasmntopt(mnt, MNTOPT_RO))
|
||||
- *ro_mount = 1;
|
||||
- return 1; /* mounted */
|
||||
-}
|
||||
-
|
||||
/* Returns 0 if fd1 and fd2 refer to the same device/file, 1 otherwise, or -1 on error */
|
||||
static int fdcmp(int fd1, int fd2)
|
||||
{
|
||||
15
gating.yaml
Normal file
15
gating.yaml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_testing
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_context: bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
478
gfs2-utils.spec
478
gfs2-utils.spec
|
|
@ -1,104 +1,235 @@
|
|||
###############################################################################
|
||||
###############################################################################
|
||||
##
|
||||
## Copyright (C) 2004-2013 Red Hat, Inc. All rights reserved.
|
||||
##
|
||||
## This copyrighted material is made available to anyone wishing to use,
|
||||
## modify, copy, or redistribute it subject to the terms and conditions
|
||||
## of the GNU General Public License v.2.
|
||||
##
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
|
||||
Name: gfs2-utils
|
||||
Version: 3.1.6
|
||||
Release: 9%{?dist}
|
||||
License: GPLv2+ and LGPLv2+
|
||||
Group: System Environment/Kernel
|
||||
Version: 3.6.1
|
||||
Release: 2%{?dist}
|
||||
# Refer to doc/README.licence in the upstream tarball
|
||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||
Summary: Utilities for managing the global file system (GFS2)
|
||||
%ifnarch %{arm}
|
||||
%{?fedora:Requires: kmod(gfs2.ko) kmod(dlm.ko)}
|
||||
%{?fedora:Recommends: kmod(gfs2.ko) kmod(dlm.ko)}
|
||||
%endif
|
||||
Obsoletes: gfs2-cluster < %{version}
|
||||
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
||||
ExcludeArch: %{ix86}
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: kernel-headers
|
||||
BuildRequires: automake
|
||||
BuildRequires: perl
|
||||
BuildRequires: libtool
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
BuildRequires: libblkid-devel
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: check-devel
|
||||
URL: https://fedorahosted.org/cluster/wiki/HomePage
|
||||
|
||||
# The source for this package was pulled from the upstream git tree.
|
||||
# Use the following commands to generate the tarball:
|
||||
# git clone git://git.fedorahosted.org/gfs2-utils.git
|
||||
# cd gfs2-utils
|
||||
# ./make-tarball.sh
|
||||
#
|
||||
Source0: https://fedorahosted.org/released/gfs2-utils/gfs2-utils-%{version}.tar.gz
|
||||
Patch0: bz1079286-0-gfs2_grow_Don_t_try_to_open_an_empty_string.patch
|
||||
Patch1: bz1079286-1-libgfs2_Add_lgfs2_open_mnt_functions.patch
|
||||
Patch2: bz1079286-2-Switch_is_pathname_mounted_callers_to_lgfs2_open_mnt.patch
|
||||
Patch3: bz1079286-3-libgfs2_Remove_is_pathname_mounted.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: bzip2-devel
|
||||
BuildRequires: make
|
||||
Source: https://releases.pagure.org/gfs2-utils/gfs2-utils-%{version}.tar.gz
|
||||
URL: https://pagure.io/gfs2-utils
|
||||
|
||||
%prep
|
||||
%setup -q -n gfs2-utils
|
||||
%patch0 -p1 -b .bz1079286-0-gfs2_grow_Don_t_try_to_open_an_empty_string
|
||||
%patch1 -p1 -b .bz1079286-1-libgfs2_Add_lgfs2_open_mnt_functions
|
||||
%patch2 -p1 -b .bz1079286-2-Switch_is_pathname_mounted_callers_to_lgfs2_open_mnt
|
||||
%patch3 -p1 -b .bz1079286-3-libgfs2_Remove_is_pathname_mounted
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
%configure
|
||||
make %{_smp_mflags}
|
||||
%make_build
|
||||
|
||||
%check
|
||||
make check
|
||||
make check || { cat tests/testsuite.log; exit 1; }
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
make -C gfs2 install DESTDIR=%{buildroot}
|
||||
%make_install
|
||||
# Don't ship gfs2_{trace,lockcapture} in this package
|
||||
rm -f %{buildroot}/sbin/gfs2_trace
|
||||
rm -f %{buildroot}/sbin/gfs2_lockcapture
|
||||
rm -f %{buildroot}%{_sbindir}/gfs2_trace
|
||||
rm -f %{buildroot}%{_sbindir}/gfs2_lockcapture
|
||||
rm -f %{buildroot}%{_mandir}/man8/gfs2_trace.8
|
||||
rm -f %{buildroot}%{_mandir}/man8/gfs2_lockcapture.8
|
||||
# Install into /usr/sbin per UsrMove
|
||||
mv %{buildroot}/sbin/fsck.gfs2 %{buildroot}/usr/sbin/
|
||||
mv %{buildroot}/sbin/mkfs.gfs2 %{buildroot}/usr/sbin/
|
||||
mv %{buildroot}/sbin/gfs2_grow %{buildroot}/usr/sbin/
|
||||
mv %{buildroot}/sbin/gfs2_jadd %{buildroot}/usr/sbin/
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
%description
|
||||
The gfs2-utils package contains a number of utilities for creating, checking,
|
||||
modifying, and correcting inconsistencies in GFS2 file systems.
|
||||
|
||||
%description -n gfs2-utils
|
||||
The gfs2-utils package contains a number of utilities for creating,
|
||||
checking, modifying, and correcting any inconsistencies in GFS2
|
||||
file systems.
|
||||
|
||||
%files -n gfs2-utils
|
||||
%defattr(-,root,root,-)
|
||||
%files
|
||||
%doc doc/COPYING.* doc/COPYRIGHT doc/*.txt
|
||||
%doc doc/README.contributing doc/README.licence
|
||||
%{_sbindir}/fsck.gfs2
|
||||
%{_sbindir}/gfs2_grow
|
||||
%{_sbindir}/gfs2_jadd
|
||||
%{_sbindir}/mkfs.gfs2
|
||||
%{_sbindir}/gfs2_convert
|
||||
%{_sbindir}/gfs2_edit
|
||||
%{_sbindir}/tunegfs2
|
||||
%{_sbindir}/glocktop
|
||||
%{_libexecdir}/gfs2_withdraw_helper
|
||||
%{_mandir}/man8/*gfs2*
|
||||
%{_mandir}/man8/glocktop*
|
||||
%{_mandir}/man5/*
|
||||
%{_prefix}/lib/udev/rules.d/82-gfs2-withdraw.rules
|
||||
|
||||
%changelog
|
||||
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Thu Feb 27 2025 Andrew Price <anprice@redhat.com> - 3.6.1-1
|
||||
- New upstream release
|
||||
|
||||
* Mon Jan 20 2025 Andrew Price <anprice@redhat.com> - 3.5.1-7
|
||||
- Don't hardcode /usr/sbin in the spec
|
||||
|
||||
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Tue Apr 11 2023 Andrew Price <anprice@redhat.com> - 3.5.1-1
|
||||
- New upstream release
|
||||
|
||||
* Thu Feb 09 2023 Andrew Price <anprice@redhat.com> - 3.5.0-1
|
||||
- New upstream release
|
||||
- Drop all patches
|
||||
- Exclude i686 for https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
||||
- Migrate to SPDX license identifier
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Thu Jun 23 2022 Andrew Price <anprice@redhat.com> - 3.4.1-4
|
||||
- gfs2/edit: always use "%s"-style format for printf()-style functions
|
||||
- Custom patch to fix a printw() call missed by the above
|
||||
Fixes a build failure due to format-security warnings being treated as errors
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Mon Mar 15 2021 Andrew Price <anprice@redhat.com> - 3.4.1-1
|
||||
- New upstream version
|
||||
|
||||
* Mon Mar 08 2021 Andrew Price <anprice@redhat.com> - 3.4.0-1
|
||||
- New upstream version
|
||||
- Update testsuite script
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Thu Sep 03 2020 Andrew Price <anprice@redhat.com> - 3.3.0-2
|
||||
- Version bump to enable gating tests
|
||||
|
||||
* Tue Sep 01 2020 Andrew Price <anprice@redhat.com> - 3.3.0-1
|
||||
- New upstream version
|
||||
- Add dependency on bzip2
|
||||
- Drop all patches
|
||||
- gfs2_withdraw_helper is now in /usr/libexec/
|
||||
|
||||
* Wed Jul 29 2020 Andrew Price <anprice@redhat.com> - 3.2.0-10
|
||||
- tests: Don't use fail_unless in unit tests
|
||||
Fixes build failures due to a regression in check-devel
|
||||
|
||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jul 21 2020 Andrew Price <anprice@redhat.com> - 3.2.0-8
|
||||
- Use make_build and make_install macros
|
||||
https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
|
||||
- Remove -C gfs2 - it's a remnant from the cluster.git days
|
||||
- Remove unnecessary header notice from spec file
|
||||
|
||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Mon Feb 04 2019 Andrew Price <anprice@redhat.com> - 3.2.0-5
|
||||
- Fix libuuid linking
|
||||
|
||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Thu Jun 21 2018 Andrew Price <anprice@redhat.com> - 3.2.0-2
|
||||
- Recommend the gfs2 and dlm kmods instead of requiring them
|
||||
Resolves: bz#1593411
|
||||
|
||||
* Thu May 24 2018 Andrew Price <anprice@redhat.com> - 3.2.0-1
|
||||
- New upstream release
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.10-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Fri Oct 13 2017 Andrew Price <anprice@redhat.com> - 3.1.10-4
|
||||
- Update URL in spec file
|
||||
|
||||
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.10-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.10-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Tue Mar 28 2017 Andrew Price <anprice@redhat.com> - 3.1.10-1
|
||||
- New upstream release
|
||||
- Make dependency on libuuid explicit
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.9-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Tue Jun 07 2016 Andrew Price <anprice@redhat.com> - 3.1.9-1
|
||||
- New upstream release
|
||||
- Drop all patches
|
||||
- Add glocktop to the package
|
||||
|
||||
* Mon Feb 15 2016 Andrew Price <anprice@redhat.com> - 3.1.8-7
|
||||
- libgfs2: Add support for dirent.de_rahead
|
||||
- gfs2_edit: Include dirent.de_rahead in directory listings
|
||||
- gfs2-utils: Add a check for the de_rahead field
|
||||
- libgfs2: Support the new dirent de_cookie field
|
||||
Resolves: bz#1307532
|
||||
|
||||
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.8-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Thu Aug 20 2015 Andrew Price <anprice@redhat.com> - 3.1.8-5
|
||||
- Add patches to install the withdraw helper script properly:
|
||||
scripts_rename_gfs2_wd_udev_sh_to_gfs2_withdraw_helper.patch
|
||||
scripts_install_the_withdraw_helper_script.patch
|
||||
scripts_install_the_withdraw_udev_rules_script.patch
|
||||
- Remove the obsolete udev script installation bits
|
||||
|
||||
* Tue Aug 11 2015 Andrew Price <anprice@redhat.com> - 3.1.8-4
|
||||
- gfs2-utils: Fix hang on withdraw
|
||||
- Install udev withdraw handler scripts
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.8-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Sat Apr 18 2015 Andrew Price <anprice@redhat.com> - 3.1.8-2
|
||||
- fsck.gfs2: replace recent i_goal fixes with simple logic
|
||||
|
||||
* Tue Apr 07 2015 Andrew Price <anprice@redhat.com> - 3.1.8-1
|
||||
- New upstream release
|
||||
- Remove perl dependency
|
||||
- Update spec per the latest packaging guidelines
|
||||
|
||||
* Mon Sep 08 2014 Andrew Price <anprice@redhat.com> - 3.1.7-1
|
||||
- New upstream release
|
||||
- Drop all patches
|
||||
- gfs2-utils tests: Build unit tests with consistent cpp flags
|
||||
|
||||
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.6-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
|
|
@ -142,230 +273,3 @@ file systems.
|
|||
|
||||
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.5-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Tue Nov 13 2012 Andrew Price <anprice@redhat.com> - 3.1.5-1
|
||||
- New upstream release
|
||||
Removes mount.gfs2, gfs2_tool, gfs2_quota
|
||||
- Remove rawhide_transition.patch - now obsolete
|
||||
- Update BuildRequires:
|
||||
Change glibc-kernheaders to kernel-headers
|
||||
Add bison and flex
|
||||
- Provide a valid url for Source0
|
||||
- Add fix_build_on_rawhide.patch to fix a circular dep introduced in
|
||||
bison 2.6, and a make -j race between libgfs2 and gfs2l
|
||||
|
||||
* Tue Aug 14 2012 Andrew Price <anprice@redhat.com> - 3.1.4-6
|
||||
- Make the kernel-modules-extra requirement Fedora-specific
|
||||
Resolves bz#847955
|
||||
|
||||
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.4-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Tue Apr 17 2012 Andrew Price <anprice@redhat.com> - 3.1.4-4
|
||||
- Remove commented-out sections
|
||||
- Clean up some lintian warnings
|
||||
- Add dependency on kernel-modules-extra as per bz#811547
|
||||
|
||||
* Wed Mar 07 2012 Andrew Price <anprice@redhat.com> - 3.1.4-3
|
||||
- Remove redundant postinstall scriptlet
|
||||
|
||||
* Thu Feb 2 2012 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.1.4-2
|
||||
- make sure to Obsolete gfs2-cluster
|
||||
|
||||
* Wed Feb 01 2012 Andrew Price <anprice@redhat.com> - 3.1.4-1
|
||||
- New upstream release
|
||||
Adds gfs2_lockgather script
|
||||
- Remove gfs2-cluster (commented out for now)
|
||||
- Remove dependency on corosynclib-devel and systemd-units
|
||||
- Add rawhide_transition.patch to stop gfs_controld from building
|
||||
|
||||
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Thu Dec 15 2011 Andrew Price <anprice@redhat.com> - 3.1.3-1
|
||||
- New upstream release
|
||||
Bugfixes and improvements to fsck.gfs2
|
||||
Fixes various other bugs
|
||||
Improve strings and translation support
|
||||
- Adds gfs2-cluster systemd unit
|
||||
- Removes gfs2* init scripts
|
||||
|
||||
* Wed Jul 06 2011 Andrew Price <anprice@redhat.com> - 3.1.2-1
|
||||
- New upstream release
|
||||
Fixes several bugs
|
||||
Improves translation support
|
||||
Adds savemeta compression
|
||||
- Add zlib-devel to BuildRequires
|
||||
- Add gettext-devel to BuildRequires
|
||||
|
||||
* Wed May 25 2011 Steven Whitehouse <swhiteho@redhat.com> - 3.1.1-3
|
||||
- Update wiki URL
|
||||
- Remove gfs2_tool and gfs2_quota from package
|
||||
|
||||
* Fri Feb 25 2011 Bob Peterson <rpeterso@redhat.com> - 3.1.1-2
|
||||
- Bumping release number to keep upgrades consistent.
|
||||
|
||||
* Wed Feb 23 2011 Bob Peterson <rpeterso@redhat.com> - 3.1.1-1
|
||||
- gfs2_edit savemeta doesn't save all leafs for big directories
|
||||
- gfs2_edit improvements
|
||||
- fsck.gfs2: can't repair rgrps resulting from gfs_grow->gfs2_convert
|
||||
- fsck.gfs2: reports master/root dinodes as unused and fixes bitmap
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Thu Jan 20 2011 Steven Whitehouse <swhiteho@redhat.com> - 3.1.0-4
|
||||
- Drop mount.gfs2 and its man page
|
||||
- Only list gfs2_tool once in the files list
|
||||
|
||||
* Wed Dec 8 2010 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.1.0-3
|
||||
- Drop circular dependency on cman
|
||||
|
||||
* Fri Dec 3 2010 Fabio M. Di Nitto <fdinitto@redhat.com> - 3.1.0-2
|
||||
- gfs2-cluster should Obsoletes/Provides gfs-pcmk
|
||||
|
||||
* Tue Sep 30 2010 Steven Whitehouse <swhiteho@redhat.com> - 3.1.0-1
|
||||
- Bringing this package back for upstream GFS2
|
||||
Addition of gfs2tune to the utils
|
||||
Merge of gfs_controld from cman
|
||||
|
||||
* Thu Jan 22 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 2.03.11-1
|
||||
- New upstream release
|
||||
Fix several bugs and drastically improve startup errors.
|
||||
|
||||
* Wed Dec 10 2008 Fabio M. Di Nitto <fdinitto@redhat.com> - 2.03.10-1
|
||||
- New upstream release
|
||||
Fix several bugs and port gfs1 code to match 2.6.27 kernel.
|
||||
|
||||
* Fri Oct 31 2008 Fabio M. Di Nitto <fdinitto@redhat.com> - 2.03.09-1
|
||||
- New upstream release
|
||||
Fix rhbz#468966
|
||||
Addresses several security issues similar to CVE-2008-4192 and
|
||||
CVE-2008-4579 after deep code audit from upstream
|
||||
- cleanup patches to match 2.6.26 kernel in F-9
|
||||
|
||||
* Tue Oct 21 2008 Fabio M. Di Nitto <fdinitto@redhat.com> - 2.03.08-1
|
||||
- New upstream release
|
||||
Fix rhbz#460376 CVE-2008-4192
|
||||
Fix rhbz#467386 CVE-2008-4579
|
||||
- cleanup/update patches to match 2.6.26 kernel in F-9
|
||||
|
||||
* Thu Aug 14 2008 Fabio M. Di Nitto <fdinitto@redhat.com> - 2.03.07-1
|
||||
- New upstream release
|
||||
- Fix rgmanager startup locking issues
|
||||
- Apply patch to include kernel headers from 2.6.26 required to build
|
||||
userland. Userland will run in 2.6.25 compatibility mode
|
||||
- Apply patch to keep kernel modules at 2.6.25 (upstream is at 2.6.26)
|
||||
(this patch is purely cosmetic since we don't build kernel modules
|
||||
but keep the source in sync is Good (tm))
|
||||
- Cleanup packaging for installed docs and file permissions
|
||||
|
||||
* Mon Jul 14 2008 Fabio M. Di Nitto <fdinitto@redhat.com> - 2.03.05-1
|
||||
- New upstream release
|
||||
- Cleanup installed doc after upstream
|
||||
|
||||
* Wed Jun 11 2008 Fabio M. Di Nitto <fdinitto@redhat.com> 2.03.04-1
|
||||
- New upstream release
|
||||
- Resolves: #446995 #318271 #447378 #445662
|
||||
- Update license tags after major upstream cleanup
|
||||
- Include COPYRIGHT file
|
||||
|
||||
* Fri May 30 2008 Fabio M. Di Nitto <fdinitto@redhat.com> 2.03.03-1
|
||||
- New upstream release
|
||||
- Fix several build warnings
|
||||
- Update spec files to use macros
|
||||
- Update Requires to use packages rather than pointing at files
|
||||
- Drop BR on kernel-devel since it's not required anymore
|
||||
- Update build section to use proper _sysconfdir, libdir and sbindir
|
||||
- Avoid abusing cd when we can ask make to do the work for us
|
||||
- Remove /usr/sbin from file section. We don't have any file there
|
||||
and we can avoid shipping stuff by mistake
|
||||
|
||||
* Mon Apr 14 2008 Steven Whitehouse <swhiteho@redhat.com> 2.03.00-3
|
||||
- Fabbione saves the day. We can get rid of the sed stuff after all
|
||||
|
||||
* Mon Apr 14 2008 Steven Whitehouse <swhiteho@redhat.com> 2.03.00-1
|
||||
- New upstream sources
|
||||
- Eric Sandeen's solution to kernel version dep
|
||||
|
||||
* Wed Apr 09 2008 Steven Whitehouse <swhiteho@redhat.com> 0.1.25.2.02.01-15
|
||||
- Remove obsolete chkconfig patch for initscript
|
||||
- Enable parallel make
|
||||
- Remove obsolete copy of gfs2_ondisk.h (this should be in glibc-kernheaders)
|
||||
|
||||
* Wed Apr 09 2008 Steven Whitehouse <swhiteho@redhat.com> 0.1.25.2.02.01-14
|
||||
- Update URL
|
||||
- Fix license spec
|
||||
|
||||
* Fri Mar 14 2008 Chris Feist <cfeist@redhat.com> 0.1.25.2.02.00-2
|
||||
- New upstream sources.
|
||||
|
||||
* Tue Jan 16 2007 Chris Feist <cfeist@redhat.com> 0.1.24-1
|
||||
- New upstream sources.
|
||||
- Resolves: rhbz#222747
|
||||
|
||||
* Wed Jan 03 2007 Chris Feist <cfeist@redhat.com> 0.1.24-1
|
||||
- Updated sources
|
||||
- Resolves: rhbz#218560
|
||||
|
||||
* Thu Dec 21 2006 Chris Feist <cfeist@redhat.com> 0.1.23-1
|
||||
- Updated sources
|
||||
- Resolves: rhbz#218560
|
||||
|
||||
* Tue Dec 19 2006 Chris Feist <cfeist@redhat.com> 0.1.22-1
|
||||
- New upstream sources.
|
||||
- Resolves: rhbz#219878
|
||||
|
||||
* Tue Dec 04 2006 Chris Feist <cfeist@redhat.com> 0.1.21-1
|
||||
- New upstream sources.
|
||||
- Resolves: rhbz#218134 rhbz#215962
|
||||
|
||||
* Thu Nov 30 2006 Chris Feist <cfeist@redhat.com> 0.1.19-1
|
||||
- New upstream sources.
|
||||
- Resolves: rhbz#217798
|
||||
|
||||
* Wed Nov 29 2006 Chris Feist <cfeist@redhat.com> 0.1.18-1
|
||||
- New upstream sources.
|
||||
- Resolves: rhbz#217460
|
||||
|
||||
* Thu Oct 26 2006 Chris Feist <cfeist@redhat.com> 0.1.14-1
|
||||
- New upstream sources.
|
||||
|
||||
* Fri Oct 13 2006 Chris Feist <cfeist@redhat.com> 0.1.12-1
|
||||
- New Upstream sources.
|
||||
|
||||
* Fri Oct 13 2006 Chris Feist <cfeist@redhat.com> 0.1.10-1
|
||||
- New Upstream sources.
|
||||
|
||||
* Mon Oct 09 2006 Chris Feist <cfeist@redhat.com> 0.1.9-1
|
||||
- New Upstream sources.
|
||||
|
||||
* Mon Sep 25 2006 Chris Feist <cfeist@redhat.com> 0.1.8-1
|
||||
- New Upstream sources.
|
||||
|
||||
* Wed Sep 13 2006 Chris Feist <cfeist@redhat.com> 0.1.7-1
|
||||
- New Upstream sources.
|
||||
|
||||
* Thu Sep 07 2006 Chris Feist <cfeist@redhat.com> 0.1.6-2
|
||||
- Fix typo in uninstall script (turn off gfs2 instead of gfs)
|
||||
|
||||
* Mon Aug 28 2006 Chris Feist <cfeist@redhat.com> 0.1.6-1
|
||||
- New Upstream sources.
|
||||
|
||||
* Tue Aug 22 2006 Chris Feist <cfeist@redhat.com> 0.1.5-1
|
||||
- New Upstream sources.
|
||||
|
||||
* Mon Aug 14 2006 Chris Feist <cfeist@redhat.com> 0.1.3-0
|
||||
- New Upstream sources, use dist tag.
|
||||
|
||||
* Fri Jul 14 2006 Chris Feist <cfeist@redhat.com>
|
||||
- Rebuild with updated sources
|
||||
|
||||
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com>
|
||||
- rebuild
|
||||
|
||||
* Tue Jun 27 2006 Florian La Roche <laroche@redhat.com>
|
||||
- fix typo in preun script
|
||||
|
||||
* Fri Jun 09 2006 Chris Feist <cfeist@redhat.com> - 0.1.0-1.fc6.3
|
||||
- Initial build of gfs-utils.
|
||||
|
|
|
|||
5
plans/testsuite.fmf
Normal file
5
plans/testsuite.fmf
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
summary: Run testsuite
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
9d47c272298c62868dd49c7b1f4bcefc gfs2-utils-3.1.6.tar.gz
|
||||
SHA512 (gfs2-utils-3.6.1.tar.gz) = c620cd7cac29af927a6325ffe024f3090285083f8a094935f318026e7fadb9b63cdbccc4962141ff93a2994fe32d138bf1ff999a58dfe268c034156132785346
|
||||
|
|
|
|||
8
tests/atlocal
Normal file
8
tests/atlocal
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
GFS_TGT="../../testvol"
|
||||
GFS_TGT_SZ=10
|
||||
GFS_MKFS="mkfs.gfs2 -O -D"
|
||||
|
||||
gfs_max_blocks()
|
||||
{
|
||||
printf $((GFS_TGT_SZ*1073741824/$1))
|
||||
}
|
||||
20
tests/rgrifieldscheck.sh
Executable file
20
tests/rgrifieldscheck.sh
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
dev=$1
|
||||
i=0
|
||||
gfs2_edit -p rg 0 $dev | grep rg_data0 > /dev/null 2>&1
|
||||
# New fields not present in /usr/include/linux/gfs2_ondisk.h
|
||||
test $? = 0 || exit 0
|
||||
gfs2_edit -p rindex $dev | while read field rival unused
|
||||
do
|
||||
test $field = ri_data0 -o $field = ri_data -o $field = ri_bitbytes || continue
|
||||
rgfield=$(echo $field | sed 's/ri/rg/')
|
||||
rgval=$(gfs2_edit -p rg $i $dev | grep " $rgfield " | awk '{print $2}')
|
||||
|
||||
if test "$rival" != "$rgval"
|
||||
then
|
||||
echo "Bad $rgfield in rg $i: $rgval (expected: $rival)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test $field = ri_bitbytes && i=$((i+1))
|
||||
done
|
||||
19
tests/rgskipcheck.sh
Executable file
19
tests/rgskipcheck.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
dev=$1
|
||||
rgcount=$(gfs2_edit -p rgcount $dev | cut -f1 -d' ')
|
||||
prevaddr=$(gfs2_edit -p rg 0 $dev | grep ^RG | awk '{print $5}')
|
||||
prevskip=0
|
||||
for i in `seq 0 $(($rgcount - 1))`; do
|
||||
addr=$(gfs2_edit -p rg $i $dev | grep ^RG | awk '{print $5}')
|
||||
expected=$(($addr - $prevaddr))
|
||||
|
||||
if test $prevskip != $expected; then
|
||||
echo "Bad rg_skip in rg $(($i - 1)): $prevskip (expected: $expected)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
prevskip=$(gfs2_edit -p rg $i $dev | grep rg_skip | awk '{print $2}')
|
||||
prevaddr=$addr
|
||||
done
|
||||
|
||||
5612
tests/testsuite
Executable file
5612
tests/testsuite
Executable file
File diff suppressed because it is too large
Load diff
2
tests/testsuite.fmf
Normal file
2
tests/testsuite.fmf
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
summary: Upstream testsuite
|
||||
test: ./testsuite
|
||||
Loading…
Add table
Add a link
Reference in a new issue