Permalink
Browse files

added forcestop feature

  • Loading branch information...
1 parent 5ae471a commit b702b44af0b2a596f327bd1bdcc15e790edec08c @boopathi boopathi committed Sep 22, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 utils/flashcache
View
@@ -67,7 +67,10 @@ start() {
stop() {
#unmount
/bin/umount $MOUNTPOINT
- /sbin/sysctl -w dev.flashcache.$FLASHCACHE_NAME.fast_remove=0
+ #check for force flag
+ FLAG=0
+ [ "$1" == '--force' ] && FLAG=1
+ /sbin/sysctl -w dev.flashcache.$FLASHCACHE_NAME.fast_remove=$FLAG
echo "Flushing flashcache: Flushes to $BACKEND_DISK"
$DMSETUP remove $CACHEDEV_NAME
#unlock subsys
@@ -90,6 +93,9 @@ case $1 in
status)
status
;;
+ forcestop)
+ stop --force
+ ;;
*)
echo "Usage: $0 {start|stop|status}"
exit 1

0 comments on commit b702b44

Please sign in to comment.