public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: lhh@sourceware.org To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com Subject: Cluster Project branch, STABLE2, updated. cluster-2.02.00-12-ge50f432 Date: Tue, 11 Mar 2008 20:21:00 -0000 [thread overview] Message-ID: <20080311202142.2181.qmail@sourceware.org> (raw) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project". http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=e50f43228b1da237524eaea2bf0ae345c20c6104 The branch, STABLE2 has been updated via e50f43228b1da237524eaea2bf0ae345c20c6104 (commit) from ad6789072de8bc98e5ec439f2160f330be0f9730 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e50f43228b1da237524eaea2bf0ae345c20c6104 Author: Lon Hohberger <lhh@redhat.com> Date: Tue Mar 11 10:44:19 2008 -0400 [rgmanager] Don't call quotaoff if quotas are not used ----------------------------------------------------------------------- Summary of changes: rgmanager/src/resources/fs.sh | 51 ++++++++++++++++++++++++++++++---------- 1 files changed, 38 insertions(+), 13 deletions(-) diff --git a/rgmanager/src/resources/fs.sh b/rgmanager/src/resources/fs.sh index 10a167f..1de57d3 100755 --- a/rgmanager/src/resources/fs.sh +++ b/rgmanager/src/resources/fs.sh @@ -797,21 +797,14 @@ activeMonitor() { # -# Enable quotas on the mount point if the user requested them +# Decide which quota options are enabled and return a string +# which we can pass to quotaon # -enable_fs_quotas() +quota_opts() { - declare -i need_check=0 - declare -i rv declare quotaopts="" - declare mopt declare opts=$1 - declare mp=$2 - - if [ -z "`which quotaon`" ]; then - ocf_log err "quotaon not found in $PATH" - return $OCF_ERR_GENERIC - fi + declare mopt for mopt in `echo $opts | sed -e s/,/\ /g`; do case $mopt in @@ -830,6 +823,33 @@ enable_fs_quotas() esac done + echo $quotaopts + return 0 +} + + + +# +# Enable quotas on the mount point if the user requested them +# +enable_fs_quotas() +{ + declare -i need_check=0 + declare -i rv + declare quotaopts="" + declare mopt + declare opts=$1 + declare mp=$2 + + if [ -z "`which quotaon`" ]; then + ocf_log err "quotaon not found in $PATH" + return $OCF_ERR_GENERIC + fi + + quotaopts=$(quota_opts $opts) + + ocf_log info "quotaopts = $quotaopts" + [ -z "$quotaopts" ] && return 0 # Ok, create quota files if they don't exist @@ -1089,6 +1109,7 @@ stopFilesystem() { typeset force_umount="" typeset self_fence="" typeset fstype="" + typeset quotaopts="" # @@ -1154,11 +1175,15 @@ stop: Could not match $OCF_RESKEY_device with a real device" ;; $YES) sync; sync; sync - ocf_log info "unmounting $mp" + quotaopts=$(quota_opts $OCF_RESKEY_options) + if [ -n "$quotaopts" ]; then + ocf_log debug "Turning off quotas for $mp" + quotaoff -$quotaopts $mp &> /dev/null + fi activeMonitor stop || return $OCF_ERR_GENERIC - quotaoff -gu $mp &> /dev/null + ocf_log info "unmounting $mp" umount $mp if [ $? -eq 0 ]; then umount_failed= hooks/post-receive -- Cluster Project
reply other threads:[~2008-03-11 20:21 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080311202142.2181.qmail@sourceware.org \ --to=lhh@sourceware.org \ --cc=cluster-cvs@sources.redhat.com \ --cc=cluster-devel@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).