lkml.org 
[lkml]   [2017]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC 3/5] xfs: allow fs freeze on suspend/hibernation
Date
This also removes the freezer calls on the XFS kthread as they are
no longer needed.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
fs/xfs/xfs_super.c | 3 ++-
fs/xfs/xfs_trans_ail.c | 7 ++-----
2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 64013b2db8e0..75c3415657eb 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1775,7 +1775,8 @@ static struct file_system_type xfs_fs_type = {
.name = "xfs",
.mount = xfs_fs_mount,
.kill_sb = kill_block_super,
- .fs_flags = FS_REQUIRES_DEV,
+ .fs_flags = FS_REQUIRES_DEV |
+ FS_FREEZE_ON_SUSPEND,
};
MODULE_ALIAS_FS("xfs");

diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
index 354368a906e5..8cebda88e91a 100644
--- a/fs/xfs/xfs_trans_ail.c
+++ b/fs/xfs/xfs_trans_ail.c
@@ -512,7 +512,6 @@ xfsaild(
long tout = 0; /* milliseconds */

current->flags |= PF_MEMALLOC;
- set_freezable();

while (!kthread_should_stop()) {
if (tout && tout <= 20)
@@ -535,19 +534,17 @@ xfsaild(
if (!xfs_ail_min(ailp) &&
ailp->xa_target == ailp->xa_target_prev) {
spin_unlock(&ailp->xa_lock);
- freezable_schedule();
+ schedule();
tout = 0;
continue;
}
spin_unlock(&ailp->xa_lock);

if (tout)
- freezable_schedule_timeout(msecs_to_jiffies(tout));
+ schedule_timeout(msecs_to_jiffies(tout));

__set_current_state(TASK_RUNNING);

- try_to_freeze();
-
tout = xfsaild_push(ailp);
}

--
2.14.0
\
 
 \ /
  Last update: 2017-10-03 20:54    [W:0.155 / U:12.476 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site