diff --git a/bug-470741-debug_start_failures.patch b/bug-470741-debug_start_failures.patch index e05aa27..2c2ea41 100644 --- a/bug-470741-debug_start_failures.patch +++ b/bug-470741-debug_start_failures.patch @@ -1,7 +1,7 @@ Index: ocfs2-tools/libo2cb/o2cb_err.et =================================================================== ---- ocfs2-tools.orig/libo2cb/o2cb_err.et -+++ ocfs2-tools/libo2cb/o2cb_err.et +--- ocfs2-tools.orig/libo2cb/o2cb_err.et 2012-08-24 10:22:54.000000000 -0500 ++++ ocfs2-tools/libo2cb/o2cb_err.et 2012-08-24 10:23:03.000000000 -0500 @@ -33,6 +33,12 @@ ec O2CB_ET_IO, ec O2CB_ET_SERVICE_UNAVAILABLE, "Unable to access cluster service" @@ -17,9 +17,9 @@ Index: ocfs2-tools/libo2cb/o2cb_err.et Index: ocfs2-tools/libo2cb/o2cb_abi.c =================================================================== ---- ocfs2-tools.orig/libo2cb/o2cb_abi.c -+++ ocfs2-tools/libo2cb/o2cb_abi.c -@@ -2095,7 +2095,7 @@ static errcode_t o2cb_control_handshake( +--- ocfs2-tools.orig/libo2cb/o2cb_abi.c 2012-08-24 10:22:54.000000000 -0500 ++++ ocfs2-tools/libo2cb/o2cb_abi.c 2012-08-24 10:23:03.000000000 -0500 +@@ -2367,7 +2367,7 @@ static errcode_t o2cb_control_handshake( if (ret != 0) err = O2CB_ET_IO; else if (!found) @@ -28,7 +28,7 @@ Index: ocfs2-tools/libo2cb/o2cb_abi.c break; } -@@ -2152,7 +2152,7 @@ errcode_t o2cb_control_open(unsigned int +@@ -2424,7 +2424,7 @@ errcode_t o2cb_control_open(unsigned int case ENOTDIR: case ENOENT: case EISDIR: diff --git a/bug-543119-o2dlm.patch b/bug-543119-o2dlm.patch index ffaf551..a02f115 100644 --- a/bug-543119-o2dlm.patch +++ b/bug-543119-o2dlm.patch @@ -1,7 +1,8 @@ -diff -rup ocfs2-tools.orig//libo2dlm/o2dlm.c ocfs2-tools/libo2dlm/o2dlm.c ---- ocfs2-tools.orig//libo2dlm/o2dlm.c 2008-10-27 01:10:50.000000000 +0800 -+++ ocfs2-tools/libo2dlm/o2dlm.c 2009-11-03 16:49:38.000000000 +0800 -@@ -713,7 +713,7 @@ static errcode_t load_fsdlm(struct o2dlm +Index: ocfs2-tools/libo2dlm/o2dlm.c +=================================================================== +--- ocfs2-tools.orig/libo2dlm/o2dlm.c 2012-08-24 10:22:54.000000000 -0500 ++++ ocfs2-tools/libo2dlm/o2dlm.c 2012-08-24 10:23:20.000000000 -0500 +@@ -802,7 +802,7 @@ static errcode_t load_fsdlm(struct o2dlm goto out; } diff --git a/extra-debug.patch b/extra-debug.patch index 1ecb28f..f825c43 100644 --- a/extra-debug.patch +++ b/extra-debug.patch @@ -6,11 +6,11 @@ ocfs2_controld/pacemaker.c | 2 - 5 files changed, 51 insertions(+), 9 deletions(-) -Index: ocfs2_controld/ckpt.c +Index: ocfs2-tools/ocfs2_controld/ckpt.c =================================================================== ---- a/ocfs2_controld/ckpt.c.orig -+++ b/ocfs2_controld/ckpt.c -@@ -381,7 +381,7 @@ static int call_section_read(struct ckpt +--- ocfs2-tools.orig/ocfs2_controld/ckpt.c 2012-08-24 10:02:19.000000000 -0500 ++++ ocfs2-tools/ocfs2_controld/ckpt.c 2012-08-24 10:14:42.000000000 -0500 +@@ -413,7 +413,7 @@ static int call_section_read(struct ckpt /* -ENOENT is a clean error for the caller to handle */ if (rc == -ENOENT) { @@ -19,11 +19,11 @@ Index: ocfs2_controld/ckpt.c "section named \"%s\"", handle->ch_name.length, handle->ch_name.value, name); -Index: ocfs2_controld/main.c +Index: ocfs2-tools/ocfs2_controld/main.c =================================================================== ---- a/ocfs2_controld/main.c.orig -+++ b/ocfs2_controld/main.c -@@ -73,7 +73,7 @@ static int time_to_die = 0; +--- ocfs2-tools.orig/ocfs2_controld/main.c 2012-08-24 10:02:19.000000000 -0500 ++++ ocfs2-tools/ocfs2_controld/main.c 2012-08-24 10:14:42.000000000 -0500 +@@ -74,7 +74,7 @@ static int time_to_die = 0; static int sigpipe_write_fd; char *prog_name; @@ -32,7 +32,7 @@ Index: ocfs2_controld/main.c char daemon_debug_buf[1024]; char dump_buf[DUMP_SIZE]; int dump_point; -@@ -994,8 +994,7 @@ static void lockfile(void) +@@ -1030,8 +1030,7 @@ static void lockfile(void) fd = open(LOCKFILE_NAME, O_CREAT|O_WRONLY, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); if (fd < 0) { @@ -42,7 +42,7 @@ Index: ocfs2_controld/main.c exit(EXIT_FAILURE); } -@@ -1006,13 +1005,13 @@ static void lockfile(void) +@@ -1042,13 +1041,13 @@ static void lockfile(void) error = fcntl(fd, F_SETLK, &lock); if (error) { @@ -58,7 +58,7 @@ Index: ocfs2_controld/main.c exit(EXIT_FAILURE); } -@@ -1020,7 +1019,7 @@ static void lockfile(void) +@@ -1056,7 +1055,7 @@ static void lockfile(void) error = write(fd, buf, strlen(buf)); if (error <= 0) { @@ -67,7 +67,7 @@ Index: ocfs2_controld/main.c exit(EXIT_FAILURE); } } -@@ -1030,13 +1029,13 @@ static void daemonize(void) +@@ -1066,13 +1065,13 @@ static void daemonize(void) int fd; pid_t pid = fork(); if (pid < 0) { @@ -82,7 +82,7 @@ Index: ocfs2_controld/main.c umask(0); close(0); close(1); -@@ -1107,6 +1106,7 @@ static void decode_arguments(int argc, c +@@ -1143,6 +1142,7 @@ static void decode_arguments(int argc, c break; default: @@ -90,7 +90,7 @@ Index: ocfs2_controld/main.c fprintf(stderr, "unknown option: %c\n", optchar); exit(EXIT_FAILURE); break; -@@ -1144,12 +1144,53 @@ static void set_scheduler(void) +@@ -1180,12 +1180,53 @@ static void set_scheduler(void) } } @@ -144,7 +144,7 @@ Index: ocfs2_controld/main.c init_mounts(); initialize_o2cb_error_table(); -@@ -1165,13 +1206,11 @@ int main(int argc, char **argv) +@@ -1201,13 +1242,11 @@ int main(int argc, char **argv) return 1; } if (strcmp(stack, stackname)) { @@ -160,10 +160,10 @@ Index: ocfs2_controld/main.c if (!daemon_debug_opt) daemonize(); -Index: ocfs2_controld/mount.c +Index: ocfs2-tools/ocfs2_controld/mount.c =================================================================== ---- a/ocfs2_controld/mount.c.orig -+++ b/ocfs2_controld/mount.c +--- ocfs2-tools.orig/ocfs2_controld/mount.c 2012-08-24 10:02:19.000000000 -0500 ++++ ocfs2-tools/ocfs2_controld/mount.c 2012-08-24 10:14:42.000000000 -0500 @@ -176,6 +176,8 @@ static void notify_mount_client(struct m else mg->mg_mount_notified = 1; @@ -173,10 +173,10 @@ Index: ocfs2_controld/mount.c /* * XXX If we failed to notify the client, what can we do? I'm * guessing that our main loop will get POLLHUP and we'll clean -Index: ocfs2_controld/ocfs2_controld.h +Index: ocfs2-tools/ocfs2_controld/ocfs2_controld.h =================================================================== ---- a/ocfs2_controld/ocfs2_controld.h.orig -+++ b/ocfs2_controld/ocfs2_controld.h +--- ocfs2-tools.orig/ocfs2_controld/ocfs2_controld.h 2012-08-24 10:14:40.000000000 -0500 ++++ ocfs2-tools/ocfs2_controld/ocfs2_controld.h 2012-08-24 10:14:42.000000000 -0500 @@ -60,6 +60,7 @@ do { \ #define log_error(fmt, args...) \ do { \ diff --git a/fix-configure-check-libs.patch b/fix-configure-check-libs.patch index 5fe2df0..0b3ddd1 100644 --- a/fix-configure-check-libs.patch +++ b/fix-configure-check-libs.patch @@ -1,8 +1,8 @@ Index: ocfs2-tools/configure.in =================================================================== ---- ocfs2-tools.orig/configure.in -+++ ocfs2-tools/configure.in -@@ -255,9 +255,12 @@ if test "x$cpg_found" = "xyes"; then +--- ocfs2-tools.orig/configure.in 2012-08-24 10:22:47.000000000 -0500 ++++ ocfs2-tools/configure.in 2012-08-24 10:23:24.000000000 -0500 +@@ -276,9 +276,12 @@ if test "x$cpg_found" = "xyes"; then # TRY="$TRY" saved_LDFLAGS="$LDFLAGS" @@ -16,7 +16,7 @@ Index: ocfs2-tools/configure.in LDFLAGS="$saved_LDFLAGS" if test "x$cpg_found" = "xyes"; then -@@ -294,9 +297,12 @@ if test "x$ckpt_found" = "xyes"; then +@@ -320,9 +323,12 @@ if test "x$ckpt_found" = "xyes"; then # TRY="$TRY" saved_LDFLAGS="$LDFLAGS" diff --git a/fix-indexed-dirs.patch b/fix-indexed-dirs.patch new file mode 100644 index 0000000..518e269 --- /dev/null +++ b/fix-indexed-dirs.patch @@ -0,0 +1,70 @@ +commit 1a5af4e8a91e106261e1552821b19b425d6adfd3 +Author: Goldwyn Rodrigues +Date: Thu Jul 5 11:41:14 2012 -0500 + + fsck.ocfs2 fix indexed dirs + +diff --git a/fsck.ocfs2/fsck.ocfs2.checks.8.in b/fsck.ocfs2/fsck.ocfs2.checks.8.in +index 45f9336..788c89b 100644 +--- a/fsck.ocfs2/fsck.ocfs2.checks.8.in ++++ b/fsck.ocfs2/fsck.ocfs2.checks.8.in +@@ -1149,6 +1149,17 @@ possible data for a particular offset for the file. + + Answering yes will serialize the extents. + ++.SS "DX_TREE_CORRUPT" ++The index tree of the directory is corrupt. ++ ++Answering yes will rebuild the directory index, in pass 2. ++ ++ ++.SS "DX_TREE_MISSING" ++The index of this directory is missing. ++ ++Answering yes will rebuild the directory index. ++ + .SH "SEE ALSO" + .BR debugfs.ocfs2(8) + .BR fsck.ocfs2(8) +diff --git a/fsck.ocfs2/pass1.c b/fsck.ocfs2/pass1.c +index 3590a2d..c076e28 100644 +--- a/fsck.ocfs2/pass1.c ++++ b/fsck.ocfs2/pass1.c +@@ -917,10 +917,14 @@ static errcode_t o2fsck_check_blocks(ocfs2_filesys *fs, o2fsck_state *ost, + } + + ret = o2fsck_check_dx_dir(ost, di); +- if (ret) { +- com_err(whoami, ret, "while iterating over the dir indexed " +- "tree for directory inode %"PRIu64, (uint64_t)di->i_blkno); +- goto out; ++ if (ret && prompt(ost, PY, PR_DX_TREE_CORRUPT, ++ "Inode %"PRIu64" has invalid dx tree. " ++ "Reset for later rebuild?", (uint64_t)di->i_blkno)) { ++ ocfs2_dx_dir_truncate(fs, di->i_blkno); ++ di->i_dx_root = 0ULL; ++ di->i_dyn_features &= ~OCFS2_INDEXED_DIR_FL; ++ o2fsck_write_inode(ost, di->i_blkno, di); ++ ret = 0; + } + + if (S_ISLNK(di->i_mode)) +diff --git a/fsck.ocfs2/pass2.c b/fsck.ocfs2/pass2.c +index 96c4eaf..681e817 100644 +--- a/fsck.ocfs2/pass2.c ++++ b/fsck.ocfs2/pass2.c +@@ -735,9 +735,11 @@ static unsigned pass2_dir_block_iterate(o2fsck_dirblock_entry *dbe, + /* Set the flag for index rebuilding */ + if (ocfs2_supports_indexed_dirs(OCFS2_RAW_SB(dd->fs->fs_super)) + && !(di->i_dyn_features & OCFS2_INLINE_DATA_FL) +- && !(di->i_dyn_features & OCFS2_INDEXED_DIR_FL)) { +- ret_flags |= OCFS2_DIRENT_CHANGED; +- } ++ && !(di->i_dyn_features & OCFS2_INDEXED_DIR_FL) ++ && prompt(dd->ost, PY, PR_DX_TREE_MISSING, ++ "Directory %"PRIu64" is missing index. " ++ "Rebuild?", dbe->e_ino)) ++ ret_flags |= OCFS2_DIRENT_CHANGED; + + } + diff --git a/fix-ocfs2_controld-crmcommon-link.patch b/fix-ocfs2_controld-crmcommon-link.patch deleted file mode 100644 index 2a2eb76..0000000 --- a/fix-ocfs2_controld-crmcommon-link.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: ocfs2-tools/ocfs2_controld/Makefile -=================================================================== ---- ocfs2-tools.orig/ocfs2_controld/Makefile -+++ ocfs2-tools/ocfs2_controld/Makefile -@@ -67,7 +67,7 @@ DIST_FILES = \ - ocfs2_controld.pcmk: $(PCMK_DAEMON_OBJS) $(LIBO2CB_DEPS) - $(LINK) $(GLIB_LIBS) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) \ - $(OPENAIS_LIBS) $(COROSYNC_LIBS) \ -- $(DLMCONTROL_LIBS) -lcrmcluster -lstonithd -+ $(DLMCONTROL_LIBS) -lcrmcluster -lstonithd -lcrmcommon - - ocfs2_controld.cman: $(CMAN_DAEMON_OBJS) $(LIBO2CB_DEPS) - $(LINK) $(LIBO2CB_LIBS) $(COM_ERR_LIBS) $(OPENAIS_LIBS) \ diff --git a/ocfs2-devel.diff b/ocfs2-devel.diff index 727ab22..98bd242 100644 --- a/ocfs2-devel.diff +++ b/ocfs2-devel.diff @@ -1,7 +1,7 @@ Index: ocfs2-tools/vendor/common/o2cb.init.sh =================================================================== ---- ocfs2-tools.orig/vendor/common/o2cb.init.sh -+++ ocfs2-tools/vendor/common/o2cb.init.sh +--- ocfs2-tools.orig/vendor/common/o2cb.init.sh 2012-08-24 10:22:54.000000000 -0500 ++++ ocfs2-tools/vendor/common/o2cb.init.sh 2012-08-24 10:23:09.000000000 -0500 @@ -8,7 +8,8 @@ # Provides: o2cb # Required-Start: $network @@ -12,7 +12,7 @@ Index: ocfs2-tools/vendor/common/o2cb.init.sh # Default-Start: 2 3 5 # Default-Stop: # Short-Description: Load O2CB cluster services at system boot. -@@ -653,7 +654,7 @@ status_filesystem() +@@ -671,7 +672,7 @@ status_filesystem() status_daemon() { @@ -21,7 +21,7 @@ Index: ocfs2-tools/vendor/common/o2cb.init.sh echo -n "Checking for control daemon: " if [ -n "$(pidofproc "$DAEMON")" ] then -@@ -682,6 +683,7 @@ bringup_daemon() +@@ -700,6 +701,7 @@ bringup_daemon() fi sleep 1 done @@ -29,7 +29,7 @@ Index: ocfs2-tools/vendor/common/o2cb.init.sh return 0 } -@@ -689,7 +691,7 @@ bringup_daemon() +@@ -707,7 +709,7 @@ bringup_daemon() kill_daemon() { SIGNAL="$1" @@ -40,8 +40,8 @@ Index: ocfs2-tools/vendor/common/o2cb.init.sh Index: ocfs2-tools/vendor/common/ocfs2.init =================================================================== ---- ocfs2-tools.orig/vendor/common/ocfs2.init -+++ ocfs2-tools/vendor/common/ocfs2.init +--- ocfs2-tools.orig/vendor/common/ocfs2.init 2012-08-24 10:22:54.000000000 -0500 ++++ ocfs2-tools/vendor/common/ocfs2.init 2012-08-24 10:23:09.000000000 -0500 @@ -8,9 +8,9 @@ ### BEGIN INIT INFO # Provides: ocfs2 diff --git a/ocfs2-tools-kernel33.patch b/ocfs2-tools-kernel33.patch index 01ff17b..ef96601 100644 --- a/ocfs2-tools-kernel33.patch +++ b/ocfs2-tools-kernel33.patch @@ -1,8 +1,8 @@ Index: ocfs2-tools/include/ocfs2-kernel/ocfs2_fs.h =================================================================== ---- ocfs2-tools.orig/include/ocfs2-kernel/ocfs2_fs.h -+++ ocfs2-tools/include/ocfs2-kernel/ocfs2_fs.h -@@ -316,6 +316,9 @@ +--- ocfs2-tools.orig/include/ocfs2-kernel/ocfs2_fs.h 2012-08-24 10:22:41.000000000 -0500 ++++ ocfs2-tools/include/ocfs2-kernel/ocfs2_fs.h 2012-08-24 10:23:30.000000000 -0500 +@@ -329,6 +329,9 @@ */ #define OCFS2_CLUSTER_O2CB_GLOBAL_HEARTBEAT (0x01) diff --git a/ocfs2-tools.changes b/ocfs2-tools.changes index ad86b3e..986659d 100644 --- a/ocfs2-tools.changes +++ b/ocfs2-tools.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Aug 24 12:12:32 CDT 2012 - rgoldwyn@suse.de + +- Updated to 1.8.2 + - o2cluster: change cluster stack stamped on ocfs2 filesystem + - added man pages ocfs2, ocfs2.cluster.conf, o2hbmonitor + - fsck: faster fsck times because of aio; progress +- fix-indexed-dirs.patch: Fix corrupt indexed directories through + fsck + ------------------------------------------------------------------- Sat Jul 28 14:27:46 UTC 2012 - aj@suse.de diff --git a/ocfs2-tools.spec b/ocfs2-tools.spec index 6060360..8fc146e 100644 --- a/ocfs2-tools.spec +++ b/ocfs2-tools.spec @@ -20,6 +20,7 @@ Name: ocfs2-tools BuildRequires: autoconf BuildRequires: e2fsprogs-devel BuildRequires: glib2-devel +BuildRequires: libaio-devel BuildRequires: libcorosync-devel BuildRequires: libdlm-devel BuildRequires: libopenais-devel @@ -33,7 +34,7 @@ BuildRequires: update-desktop-files Summary: Oracle Cluster File System 2 Core Tools License: GPL-2.0+ Group: System/Filesystems -Version: 1.8.0 +Version: 1.8.2 Release: 0 Source: ocfs2-tools.tar.bz2 Source1: o2cb.ocf @@ -47,10 +48,10 @@ Patch106: ocfs2-devel.diff Patch107: reflink-no-syscall.patch Patch201: bug-543119-o2dlm.patch Patch202: fix-configure-check-libs.patch -Patch203: fix-ocfs2_controld-crmcommon-link.patch Patch204: dont-use-var-lock-subsys.patch Patch205: ocfs2-tools-kernel33.patch Patch206: ocfs2-tools-resource.patch +Patch207: fix-indexed-dirs.patch Url: http://oss.oracle.com/projects/ocfs2-tools/ Requires: /sbin/chkconfig Requires: e2fsprogs @@ -124,10 +125,10 @@ managing the file system. %patch107 -p0 %patch201 -p1 %patch202 -p1 -%patch203 -p1 %patch204 -p1 %patch205 -p1 %patch206 -p1 +%patch207 -p1 %build export CFLAGS="${CFLAGS} ${RPM_OPT_FLAGS}" @@ -198,6 +199,7 @@ fi /sbin/tunefs.ocfs2 /sbin/mount.ocfs2 /sbin/ocfs2_hb_ctl +/sbin/o2cluster %{_sbindir}/o2image %{_sbindir}/debugfs.ocfs2 %{_sbindir}/ocfs2_controld.pcmk @@ -214,6 +216,11 @@ fi %{_mandir}/man8/ocfs2_hb_ctl.8* %{_mandir}/man8/mount.ocfs2.8* %{_mandir}/man8/o2image.8.gz +%{_mandir}/man8/o2cluster.8.gz +%{_mandir}/man8/o2hbmonitor.8.gz +%{_mandir}/man5/o2cb.sysconfig.5.gz +%{_mandir}/man5/ocfs2.cluster.conf.5.gz +%{_mandir}/man7/ocfs2.7.gz %{_mandir}/man1/o2info.1.gz %doc COPYING CREDITS MAINTAINERS %doc documentation/users_guide.txt diff --git a/ocfs2-tools.tar.bz2 b/ocfs2-tools.tar.bz2 index 0ec0c00..ab29b0b 100644 --- a/ocfs2-tools.tar.bz2 +++ b/ocfs2-tools.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:98bb639816d4ff6e0e77185d1aa860baca073de8e7cedd59e3db19d2c97d9636 -size 1263265 +oid sha256:a66c14aa2e505099784dd5f2378a6a817265dd7fb637f853abb682d60a7b5cb7 +size 1125613 diff --git a/ocfs2_controld-pacemaker.diff b/ocfs2_controld-pacemaker.diff index 3752c80..99632fa 100644 --- a/ocfs2_controld-pacemaker.diff +++ b/ocfs2_controld-pacemaker.diff @@ -1,24 +1,13 @@ Index: ocfs2-tools/ocfs2_controld/pacemaker.c =================================================================== ---- ocfs2-tools.orig/ocfs2_controld/pacemaker.c -+++ ocfs2-tools/ocfs2_controld/pacemaker.c -@@ -30,7 +30,9 @@ +--- ocfs2-tools.orig/ocfs2_controld/pacemaker.c 2012-08-24 10:17:33.000000000 -0500 ++++ ocfs2-tools/ocfs2_controld/pacemaker.c 2012-08-24 10:19:13.000000000 -0500 +@@ -30,7 +30,7 @@ #include #include #include -#include +#include -+#include -+#include - - #include "ocfs2-kernel/kernel-list.h" - #include "o2cb/o2cb.h" -@@ -155,7 +157,7 @@ int setup_stack(void) - crm_log_init("ocfs2_controld", LOG_INFO, FALSE, TRUE, 0, NULL); - - if(init_ais_connection(NULL, NULL, NULL, &local_node_uname, &our_nodeid) == FALSE) { -- log_error("Connection to our AIS plugin (%d) failed", CRM_SERVICE); -+ log_error("Connection to our AIS plugin (CRM) failed"); - return -1; - } + #include + #include