From: Abhijith Das <[email protected]> The kernel threads in gfs2, namely gfs2_scand, gfs2_logd, gfs2_quotad, gfs2_glockd, gfs2_recoverd weren't doing anything when the suspend mechanism was trying to freeze them. I put in calls to refrigerator() in the loops for all the daemons and suspend works as expected. Signed-off-by: Abhijith Das <[email protected]> Signed-off-by: Steven Whitehouse <[email protected]> diff --git a/fs/gfs2/daemon.c b/fs/gfs2/daemon.c index 683cb5b..3548d9f 100644 --- a/fs/gfs2/daemon.c +++ b/fs/gfs2/daemon.c @@ -16,6 +16,7 @@ #include <linux/delay.h> #include <linux/gfs2_ondisk.h> #include <linux/lm_interface.h> +#include <linux/freezer.h> #include "gfs2.h" #include "incore.h" @@ -49,6 +50,8 @@ int gfs2_scand(void *data) while (!kthread_should_stop()) { gfs2_scand_internal(sdp); t = gfs2_tune_get(sdp, gt_scand_secs) * HZ; + if (freezing(current)) + refrigerator(); schedule_timeout_interruptible(t); } @@ -74,6 +77,8 @@ int gfs2_glockd(void *data) wait_event_interruptible(sdp->sd_reclaim_wq, (atomic_read(&sdp->sd_reclaim_count) || kthread_should_stop())); + if (freezing(current)) + refrigerator(); } return 0; @@ -93,6 +98,8 @@ int gfs2_recoverd(void *data) while (!kthread_should_stop()) { gfs2_check_journals(sdp); t = gfs2_tune_get(sdp, gt_recoverd_secs) * HZ; + if (freezing(current)) + refrigerator(); schedule_timeout_interruptible(t); } @@ -141,6 +148,8 @@ int gfs2_logd(void *data) } t = gfs2_tune_get(sdp, gt_logd_secs) * HZ; + if (freezing(current)) + refrigerator(); schedule_timeout_interruptible(t); } @@ -191,6 +200,8 @@ int gfs2_quotad(void *data) gfs2_quota_scan(sdp); t = gfs2_tune_get(sdp, gt_quotad_secs) * HZ; + if (freezing(current)) + refrigerator(); schedule_timeout_interruptible(t); } -- 1.5.1.2 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- [GFS2/DLM] Pre-pull Patch Posting
- From: [email protected]
- [PATCH] [GFS2] flush the glock completely in inode_go_sync
- From: [email protected]
- [PATCH] [DLM] fix a couple of races
- From: [email protected]
- [PATCH] [GFS2] kernel changes to support new gfs2_grow command
- From: [email protected]
- [PATCH] [GFS2] Kernel changes to support new gfs2_grow command (part 2)
- From: [email protected]
- [PATCH] [GFS2] use zero_user_page
- From: [email protected]
- [PATCH] [GFS2] Addendum patch 2 for gfs2_grow
- From: [email protected]
- [PATCH] [GFS2] Reduce size of struct gdlm_lock
- From: [email protected]
- [PATCH] [GFS2] Clean up inode number handling
- From: [email protected]
- [PATCH] [GFS2] Quotas non-functional - fix bug
- From: [email protected]
- [PATCH] [DLM] keep dlm from panicing when traversing rsb list in debugfs
- From: [email protected]
- [PATCH] [DLM] block scand during recovery [1/6]
- From: [email protected]
- [PATCH] [DLM] add lock timeouts and warnings [2/6]
- From: [email protected]
- [PATCH] [DLM] dlm_device interface changes [3/6]
- From: [email protected]
- [PATCH] [DLM] cancel in conversion deadlock [4/6]
- From: [email protected]
- [PATCH] [DLM] fix new_lockspace error exit [5/6]
- From: [email protected]
- [PATCH] [DLM] wait for config check during join [6/6]
- From: [email protected]
- [PATCH] [DLM] fix compile breakage
- From: [email protected]
- [PATCH] [GFS2] latest gfs2-nmw headers break userland build
- From: [email protected]
- [PATCH] [DLM] Compile fix
- From: [email protected]
- [PATCH] [DLM] timeout fixes
- From: [email protected]
- [PATCH] [DLM] canceling deadlocked lock
- From: [email protected]
- [PATCH] [DLM] dumping master locks
- From: [email protected]
- [PATCH] [DLM] show default protocol
- From: [email protected]
- [PATCH] [GFS2] Quotas non-functional - fix another bug
- From: [email protected]
- [PATCH] [GFS2] Make the log reserved blocks depend on block size
- From: [email protected]
- [PATCH] [DLM] fix socket shutdown
- From: [email protected]
- [PATCH] [GFS2] fix jdata issues
- From: [email protected]
- [PATCH] [GFS2] Fix sign problem in quota/statfs and cleanup _host structures
- From: [email protected]
- [PATCH] [GFS2] Add nanosecond timestamp feature
- From: [email protected]
- [PATCH] [DLM] fix reference counting
- From: [email protected]
- [PATCH] [DLM] variable allocation
- From: [email protected]
- [PATCH] [GFS2] Fix typo in rename of directories
- From: [email protected]
- [PATCH] [GFS2] Fix bug in error path of inode
- From: [email protected]
- [PATCH] [GFS2] Can't mount GFS2 file system on AoE device
- From: [email protected]
- [PATCH] [GFS2] Recovery for lost unlinked inodes
- From: [email protected]
- [PATCH] [GFS2] gfs2_lookupi() uninitialised var fix
- From: [email protected]
- [PATCH] [GFS2] set plock owner in GETLK info
- From: [email protected]
- [PATCH] [GFS2] return conflicts for GETLK
- From: [email protected]
- [PATCH] [GFS2] Fix deallocation issues
- From: [email protected]
- [PATCH] [DLM] don't require FS flag on all nodes
- From: [email protected]
- [PATCH] [GFS2] Journaled file write/unstuff bug
- From: [email protected]
- [PATCH] [GFS2] Remove bogus '\0' in rgrp.c
- From: [email protected]
- [PATCH] [GFS2] Use zero_user_page() in stuffed_readpage()
- From: [email protected]
- [PATCH] [GFS2] assertion failure after writing to journaled file, umount
- From: [email protected]
- [PATCH] [GFS2] Simplify multiple glock aquisition
- From: [email protected]
- [PATCH] [GFS2] Addendum to the journaled file/unmount patch
- From: [email protected]
- [PATCH] [GFS2] Fix gfs2_block_truncate_page err return
- From: [email protected]
- [PATCH] [DLM] Telnet to port 21064 can stop all lockspaces
- From: [email protected]
- [PATCH] [GFS2] inode size inconsistency
- From: [email protected]
- [PATCH] [GFS2] remounting w/o acl option leaves acls enabled
- From: [email protected]
- [GFS2/DLM] Pre-pull Patch Posting
- Prev by Date: [PATCH] [GFS2] remounting w/o acl option leaves acls enabled
- Next by Date: [PATCH] [GFS2] git-gfs2-nmw-build-fix
- Previous by thread: [PATCH] [GFS2] remounting w/o acl option leaves acls enabled
- Next by thread: [PATCH] [GFS2] git-gfs2-nmw-build-fix
- Index(es):