Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=36…
Commit: 36a3625f67fd9a223d5e2db5e3ef3f02d37ee772
Parent: 081fb6f7ee25d39560e15f5a2d3cd6adc80ee698
Author: Benjamin Marzinski <bmarzins(a)redhat.com>
AuthorDate: Mon May 30 01:51:16 2011 -0500
Committer: Benjamin Marzinski <bmarzins(a)redhat.com>
CommitterDate: Mon May 30 01:51:16 2011 -0500
gfs2_grow: write one rindex entry and then the rest
There is a problem with gfs2_grow when the rindex file is stuffed, or the
filesystem blocksize is smaller than the pagesize. When gfs2_grow writes
out all the rindex entries at once, there needs to be enough space left for
it to be able to write the first page of data without doing any allocations.
If there isn't gfs2_grow will fail, even though there is space for
additional resrouce groups in the last block of the rindex file. This patch
makes gfs2_grow write one rindex entry frist, to grow the filesystem by
one resource group's worth of space. Then it writes the rest. Since
the code guarantees that there will always be enough space in the rindex
file for one more rindex entry, the first write will never require an
allocation.
Signed-off-by: Benjamin Marzinski <bmarzins(a)redhat.com>
---
gfs2/mkfs/main_grow.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/gfs2/mkfs/main_grow.c b/gfs2/mkfs/main_grow.c
index f194443..e5c0466 100644
--- a/gfs2/mkfs/main_grow.c
+++ b/gfs2/mkfs/main_grow.c
@@ -234,8 +234,18 @@ static void fix_rindex(struct gfs2_sbd *sdp, int rindex_fd, int old_rg_count)
}
/* Now write the new RGs to the end of the rindex */
lseek(rindex_fd, 0, SEEK_END);
- count = write(rindex_fd, buf, writelen);
- if (count != writelen) {
+ count = write(rindex_fd, buf, sizeof(struct gfs2_rindex));
+ if (count != sizeof(struct gfs2_rindex)) {
+ log_crit( _("Error writing first new rindex entry;"
+ "aborted.\n"));
+ if (count > 0)
+ goto trunc;
+ else
+ goto out;
+ }
+ count = write(rindex_fd, buf + sizeof(struct gfs2_rindex),
+ writelen - sizeof(struct gfs2_rindex));
+ if (count != writelen - sizeof(struct gfs2_rindex)) {
log_crit( _("Error writing new rindex entries;"
"aborted.\n"));
if (count > 0)
Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdif…
Commit: 7e5fb224c89fc3d638dfc1e31e6e372ddfba8eae
Parent: c00b77a022ec3f420307364be75bb8a126b1e4c0
Author: Benjamin Marzinski <bmarzins(a)redhat.com>
AuthorDate: Thu May 26 15:46:22 2011 -0500
Committer: Benjamin Marzinski <bmarzins(a)redhat.com>
CommitterDate: Thu May 26 15:46:22 2011 -0500
gfs2_grow: write one rindex entry and then the rest
There is a problem with gfs2_grow when the rindex file is stuffed, or the
filesystem blocksize is smaller than the pagesize. When gfs2_grow writes
out all the rindex entries at once, there needs to be enough space left for
it to be able to write the first page of data without doing any allocations.
If there isn't gfs2_grow will fail, even though there is space for
additional resrouce groups in the last block of the rindex file. This patch
makes gfs2_grow write one rindex entry frist, to grow the filesystem by
one resource group's worth of space. Then it writes the rest. Since
the code guarantees that there will always be enough space in the rindex
file for one more rindex entry, the first write will never require an
allocation.
Signed-off-by: Benjamin Marzinski <bmarzins(a)redhat.com>
---
gfs2/mkfs/main_grow.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/gfs2/mkfs/main_grow.c b/gfs2/mkfs/main_grow.c
index 03eb57b..81f492b 100644
--- a/gfs2/mkfs/main_grow.c
+++ b/gfs2/mkfs/main_grow.c
@@ -244,8 +244,18 @@ static void fix_rindex(struct gfs2_sbd *sdp, int rindex_fd, int old_rg_count)
}
/* Now write the new RGs to the end of the rindex */
lseek(rindex_fd, 0, SEEK_END);
- count = write(rindex_fd, buf, writelen);
- if (count != writelen) {
+ count = write(rindex_fd, buf, sizeof(struct gfs2_rindex));
+ if (count != sizeof(struct gfs2_rindex)) {
+ log_crit("Error writing first new rindex entry;"
+ "aborted.\n");
+ if (count > 0)
+ goto trunc;
+ else
+ goto out;
+ }
+ count = write(rindex_fd, buf + sizeof(struct gfs2_rindex),
+ writelen - sizeof(struct gfs2_rindex));
+ if (count != writelen - sizeof(struct gfs2_rindex)) {
log_crit("Error writing new rindex entries;"
"aborted.\n");
if (count > 0)
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=9a…
Commit: 9ac7b91248041ba1f5fbf8bb025d6426c3f30e17
Parent: 0000000000000000000000000000000000000000
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: 2011-05-27 06:42 +0000
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: 2011-05-27 06:42 +0000
annotated tag: cluster-3.0.12.1 has been created
at 9ac7b91248041ba1f5fbf8bb025d6426c3f30e17 (tag)
tagging 3a8ef438e9649737c07dc5355d84afffa650dbdd (commit)
replaces cluster-3.0.12
cluster-3.0.12.1 release
Abhijith Das (5):
gfs2 manual pages: gfs2_convert manpage and documentation updates
gfs2_convert: gfs2_convert doesn't resume after interrupted conversion
gfs2_convert: corrupts file system when directory has di_height 3
gfs2_convert: exits with success without doing anything
gfs2_convert exits with success without doing anything
Benjamin Marzinski (1):
gfs2-utils: enable gfs2_grow on completely full filesystems
Bob Peterson (36):
Fix device name and mount point in utils
gfs2_edit restoremeta should not return 0 on failure
fsck.gfs2: unaligned access on ia64
GFS2: libgfs2 bitfit algorithm using wrong shift point
gfs2-utils: mkfs can't fsync device with 32MB RGs
fsck.gfs2 deletes directories if they get too big
fsck.gfs2 segfaults if journals are missing
Updating /proc/mounts and /etc/mtab with mount args for GFS2 fs
fsck.gfs2 truncates directories with more than 100,000 entries
GFS2: fsck.gfs2 seems to process large files twice
gfs2_edit: better printing of directory leaf information
gfs2_edit: print hex numbers in lower-case
gfs2_edit: negative block numbers don't jump a negative amount
gfs2_edit: tiny (stuffed) files had user data saved with savemeta
gfs2_edit: give meaningful feedback for savemeta and restoremeta
gfs2_edit: Fix memory leak in savemeta option
gfs2_edit: Split extended display functions into extended.c
gfs2_edit: Move more functions to extended.c
gfs2_edit: Extend individual field printing/editing
gfs2_edit: fix page down on rindex
gfs2_edit: print field names in right column
gfs2_edit: display block allocation on rgrps and bitmaps
gfs2_edit: fix extended.h to not double-include
mkfs.gfs2 should support discard request generation
GFS2: mkfs.gfs2 segfaults with 18.55TB and -b512
fsck.gfs2: reports master/root dinodes as unused and fixes the bitmap
fsck.gfs2: can't repair rgrps resulting from gfs_grow->gfs2_convert
gfs2_edit: handle corrupt file systems better
gfs2_edit: print large block numbers better
gfs2_edit: has problems printing gfs1 journals
gfs2_edit: add -d option for printing journal details
gfs2_edit: Fix error message on blockalloc when outside bitmap
gfs2_edit: fix careless compiler warning
gfs2_edit: fix segfault in set_bitmap when block is in rgrp
Reported UUID from 'gfs2_edit -p sb' should be lower-case
gfs2_edit savemeta doesn't save all leaf blocks for large dirs
Brandon Perkins (1):
fence-agents: Fence_rhevm needs to change "RUNNING" status to "UP" status as the REST-API has changed.
Chris Feist (2):
cman: Added checkquorum script for self fencing
cman: Minor fixes for checkquorum script
Christine Caulfield (6):
cman: only load ckpt service by default
config: Fix ccs_tool create -n
cman: fix quorum recalculation when a node is externally killed
cman: Recalculate expected_votes on a config reload.
cman: Mention cman_tool version -S in man page
cman: Calculate expected_votes correctly after leave remove
David Teigland (16):
fenced: use cpg ringid
dlm_controld: wrong fencing time comparison
dlm_controld: wrong fencing time comparison (2)
dlm_controld/gfs_controld: make default plock_ownership 0
dlm_controld: fix plock checkpoint signatures
dlm_controld: fix plock owner in checkpoints
dlm_controld: fix save_plocks initialization
dlm_controld: fix plock owner syncing
dlm_controld: fix plock signature in stored message
Revert "dlm_controld: fix save_plocks initialization"
dlm_controld: ignore plocks until checkpoint time
gfs_controld: fix plock owner syncing
fenced: use post_join_delay after cluster join
gfs_controld: fix plock owner in unmount
fenced: don't ignore victim_done messages for reduced victims
dlm_controld: always return error if the daemon is not ready to operate
Fabio M. Di Nitto (47):
cluster: disable ldap loader support
cluster: support only xmlconfig loader
resource-agents: drop support for drbd and smb resource agents
cluster: remove fence_xvmd support
cman: use hash_cluster_id by default
Revert "halvm: Fix bug 506587: lvm agent incorrectly reports vg is in volume_list"
cman init: wait for corosync daemon to exit on stop
add missing man pages
cman init: more LSB compliance
rgmanger init: more LSB complaint bits
cman: add default config snippet for cman init script
cman init defaults: support only xmlconfig loader
gfs2 init: make the init script LSB compliant
Merge branch 'RHEL6' of ssh://git.fedorahosted.org/git/cluster into rhel6
cman config: copy all logging objects to the top level tree
fence: rename ibmblade to bladecenter_snmp
fence agents: add compatibility symlink for ibmblade / bladecenter_snmp
cman: allow init script to pass options to fenced
config: fix several issues with reload operation
config: free new config if we cannot find the config_version
config: more cman_tool config reload cleanup
cman: simply message broadcasting handling
config: better error report when autodetecting config version errors
cman-preconfig: better handle of logging reload operation
cman-preconfig: better handle of logging reload operation (part 2)
cman: fix consensus calculation
cman: do not propagate old configurations around
cman init: fix "stop remove" operation
cman: fix startup race condition when configs are different across nodes
ccs_tool: completely remove references to update/upgrades
cman init: add support for "nocluster" kernel cmdline to not start cman at boot
cman init: do not include wrong default file
ccs_tool: deprecate editing capabilities
build: allow dbus notification code to be disabled
config: stop leaking memory on config reload
cman-preconfig: allow cman to configure corosync multicast ttl
fs-lib: fix do_monitor device mapping
cman init: increse the default timeout waiting for quorum
cman init: wait for dlm_controld to be fully operational before proceeding
Revert "fence_scsi_check: watchdog script for fence_scsi"
Revert "fence_scsi: create /var/run/cluster if necessary"
Revert "fence_scsi: write devices to tmp file on unfence"
Revert "fence_scsi: move key file to /var/run/cluster"
Revert "gfs2-utils: enable gfs2_grow on completely full filesystems"
Revert "gfs2_edit savemeta doesn't save all leaf blocks for large dirs"
Revert "Reported UUID from 'gfs2_edit -p sb' should be lower-case"
Major tree cleanup
Federico Simoncelli (1):
config: Add missing cman_label
Guido Günther (1):
fence_rsb: Raise exceptions not strings
Jan Friesse (6):
cman: check for new config only once per second
Cman: Add support for udpu and rdma transport
Cman: Handle corosync exit codes
Cman: Handle "another instance running" error code
Cman: test that corosync is not already running
Cman: Handle INT and TERM signals correctly
Jeremy Miller (1):
qdisk: Informational syslog message indicating label overrides device
Jim Ramsay (1):
Allow fence_scsi to use any valid hexadecimal key
Jonathan Brassow (3):
halvm: Fix bug 506587: lvm agent incorrectly reports vg is in volume_list
halvm: Fix bug 593108: lvm agent incorrectly reports vg is in volume_list
Fix bug 683213 - mirror dev failure in HA LVM can cause service failure
Lon Hohberger (86):
resource-agents: Resolve incorrect default
config: Add missing resource docs to cluster.rng
config: Clean up recursion and documentation
config: Add documentation for interface tag
Revert "config: Clean up recursion and documentation"
Revert "config: Add missing resource docs to cluster.rng"
resource-agents: Add missing resource docs
config: Add missing resource docs to cluster.rng
config: Clean up recursion and documentation
resource-agents: Clean up recursion and documentation
rgmanager: Pass timeouts to resource agents
rgmanager: Use sysrq-b to reboot
resource-agents: Make vm.sh use stop/start timeouts
rgmanager: fix staged upgrade compatibility
resource-agents: fix incorrect link resolution in fs-lib
resource-agents: Add NFSv4 support
resource-agents: Add NFSv4 agent to installation
config: Update cluster schema
doc: Add auto-generated cluster.conf reference
doc: Install cluster.conf reference
resource-agents: Add RHEVM status program
rgmanager: Make clulog filter correctly
rgmanager: Man page improvements
resource-agents: Allow other values for "yes"
config: Add doc for cman_label attribute
cman: Recalculate quorum on config change
config: Add tomcat-6 resource agent to schema
doc: Add tomcat-6 to cluster_conf.html
config: Allow multiple logging_daemon tags
resource-agents: Drop tomcat-5 from build
cman: Recalculate quorum on quorum device vote changes
cman: Deprecate specifying config version to cman_tool
cman: Clarify man page on config distribution
config: Fix broken fence_egenera options
resource-agents: Stop using '-' as 1st char of log messages
cman: Make qdiskd exit if removed from configuration
cman: Update cman_tool version section in man page
config: Add missing qdiskd options
qdisk: Assume 1 vote if not specified in cluster.conf
Revert "Revert "config: Fix broken fence_egenera options""
cman: Make qdiskd heuristics time out
rgmanager: Fix clustat return code
rgmanager: Honor restricted FDs during migrations
resource-agents: Add multi-instance Oracle database agents
rgmanager: Present flags in clustat output
rgmanager: Make clufindhostname -i predictable
resource-agents: Fix migrateuriopt setting
resource-agents: Use literal quotes for tr calls
rgmanager: Add non-critical flag to resources
rgmanager: Add non-critical base behavior
rgmanager: Header cleanup
rgmanager: Use rg_strings.c for flags
rgmanager: Present all flags in clustat output
rgmanager: Mark non-critical resources disabled
rgmanager: Add convalesce operation
rgmanager: Allow restart,disable recovery policy
rgmanager: Ensure state is preserved across config changes
rgmanager: Fix handling of independent subtrees
rgmanager: Do not fail service if non-critical resources fail to stop
rgmanager: Support convalesce w/ central_processing
rgmanager: Add -c option to man page & clusvcadm -h
rgmanager: Add independent subtree restart thresholds
rgmanager: Add failure tolerances to resources.rng
rgmanager: clean up independent subtree restart handling
rgmanager: Fix corner case in critical/non-critical handling
Revert "rgmanager: Support convalesce w/ central_processing"
resource-agents: Support convalesce w/ central_processing
rgmanager: Support convalesce w/ central_processing
rgmanager: DBus notifications for service state changes
rgmanager: Clean up dbus notifications
rgmanager: Retry dbus if we get disconnected
rgmanager: minor dbus cleanups
rgmanager: Match fenced's option to disable DBus
config: Update schema
doc: Update cluster_conf.html to match schema
qdiskd: Fix auto-vote calculation loop
qdiskd: Fix bad timer check
fence-agents: Accept other values for "true"
config: Add DRBD 0.8.3 metadata back to schema
resource-agents: Fix nfs mount contexts
rgmanager: Make clustat -f not query CCS/objdb
rgmanager: Fix clustat help & version operations
rgmanager: Fix reference count handling
rgmanager: Add resource-defaults section
rgmanager: Pause during exit if we stopped services
rgmanager: fix compiler warning in clulog.c
Marek 'marx' Grac (32):
fence_wti: Add direct support for WTI VMR
fence_wti: support non-default TCP ports
fence_apc: fence_apc fails for some port numbers
resource-agents: Use SIGQUIT if SIGTERM was not fast enough
resource-agents: new agent for tomcat 6
resource-agents: change build system to include tomcat6 RA
fence_ilo: will throw exception if user does not have power priviledges
resource-agents: RA for psql does not work correctly with netmask
resource-agents: fix utility to obtain data from ccs_tool
fence_rhevm: New fence agent for RHEV-M REST API
fence-agents: Add power_wait to fence_ipmilan
fence_drac5: make "port" a synonym of "module_name" for drac5
fencing: Not all parameters appear in metadata (1/2)
fencing: Not all parameters appear in metadata (2/2)
fence_egenera: Missing -u / user in manual page
fence_cisco_ucs: New fence agent for Cisco UCS
fencing: Method to cause one node to delay fencing
fencing: Method to cause one node to delay fencing [2]
fencing: Method to cause one node to delay fencing - drac, egenera
fencing: Method to cause one node to delay fencing - ipmilan
Revert "config: Fix broken fence_egenera options"
resource-agents: fix resource agent for named
fence_ipmilan: Add "diag" option to support "ipmitool chassis power diag"
fence_ipmilan: Fix manual page to describe usage with HP iLO 3
library: Metadata are not correct if agent does not support on/off
resource-agents: Add option disable_rdisc to ip.sh
fence_wti: Unable to parse output when splitted into several screens
fence_wti: Unable to parse output when splitted into several screens (2/2)
fence_rhevm: Update URL to RHEV-M REST API
fence_cisco_ucs: Support for sub-organization
fence_cisco_ucs: Fix for support for sub-organization
fence_ipmilan: Correct return code for diag operation
Masahiro Matsuya (1):
resource-agents: Fix migration mapping behavior w/ virsh
Ryan O'Hara (19):
Fix open flags so that logfile won't be truncated each time we open it.
Fix syntax error in code that opens logfile.
fence_scsi: identify dm-multipath devices correctly
fence_scsi: fix regular expression for grep
fence_scsi: always do sg_turs before registration
fence_scsi: always do sg_turs for dm-mp devices
fence_scsi: verify that on/off actions succeed
fence_scsi: properly log errors for all commands
fenced: send dbus signal when node is fenced
fenced: update fenced man page with -q option
fence_scsi: move key file to /var/run/cluster
fence_scsi: write devices to tmp file on unfence
fence_scsi: create /var/run/cluster if necessary
fence_scsi_check: watchdog script for fence_scsi
fence_scsi: grep for keys should be case insensitive
fence_scsi: move key file to /var/run/cluster
fence_scsi: write devices to tmp file on unfence
fence_scsi: create /var/run/cluster if necessary
fence_scsi_check: watchdog script for fence_scsi
Shane Bradley (1):
rgmanager: Fix nofailback when service is in 'starting' state
Steven Whitehouse (1):
gfs2_edit: Fix bitmap editing function
igor (1):
rgmanager: Update last_owner on failover