Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 307702
b: refs/heads/master
c: 8a00ebe
h: refs/heads/master
v: v3
  • Loading branch information
Dave Chinner authored and Ben Myers committed Apr 17, 2012
1 parent b6f5daf commit 9c5a2fc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da5bf95e3cdca348327c82568c2860229c0daaa2
refs/heads/master: 8a00ebe4cfc90eda9ecb575ba97e22021cd8cf70
21 changes: 10 additions & 11 deletions trunk/fs/xfs/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -981,8 +981,6 @@ xfs_fs_put_super(
{
struct xfs_mount *mp = XFS_M(sb);

xfs_syncd_stop(mp);

/*
* Blow away any referenced inode in the filestreams cache.
* This can and will cause log traffic as inodes go inactive
Expand All @@ -993,6 +991,7 @@ xfs_fs_put_super(
xfs_flush_buftarg(mp->m_ddev_targp, 1);

xfs_unmountfs(mp);
xfs_syncd_stop(mp);
xfs_freesb(mp);
xfs_icsb_destroy_counters(mp);
xfs_destroy_mount_workqueues(mp);
Expand Down Expand Up @@ -1362,31 +1361,32 @@ xfs_fs_fill_super(
sb->s_time_gran = 1;
set_posix_acl_flag(sb);

error = xfs_mountfs(mp);
error = xfs_syncd_init(mp);
if (error)
goto out_filestream_unmount;

error = xfs_syncd_init(mp);
error = xfs_mountfs(mp);
if (error)
goto out_unmount;
goto out_syncd_stop;

root = igrab(VFS_I(mp->m_rootip));
if (!root) {
error = ENOENT;
goto out_syncd_stop;
goto out_unmount;
}
if (is_bad_inode(root)) {
error = EINVAL;
goto out_syncd_stop;
goto out_unmount;
}
sb->s_root = d_make_root(root);
if (!sb->s_root) {
error = ENOMEM;
goto out_syncd_stop;
goto out_unmount;
}

return 0;

out_syncd_stop:
xfs_syncd_stop(mp);
out_filestream_unmount:
xfs_filestream_unmount(mp);
out_free_sb:
Expand All @@ -1403,8 +1403,6 @@ xfs_fs_fill_super(
out:
return -error;

out_syncd_stop:
xfs_syncd_stop(mp);
out_unmount:
/*
* Blow away any referenced inode in the filestreams cache.
Expand All @@ -1416,6 +1414,7 @@ xfs_fs_fill_super(
xfs_flush_buftarg(mp->m_ddev_targp, 1);

xfs_unmountfs(mp);
xfs_syncd_stop(mp);
goto out_free_sb;
}

Expand Down
19 changes: 9 additions & 10 deletions trunk/fs/xfs/xfs_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,15 @@ xfs_sync_worker(
struct xfs_mount, m_sync_work);
int error;

if (!(mp->m_flags & XFS_MOUNT_RDONLY)) {
/*
* We shouldn't write/force the log if we are in the mount/unmount
* process or on a read only filesystem. The workqueue still needs to be
* active in both cases, however, because it is used for inode reclaim
* during these times. hence use the MS_ACTIVE flag to avoid doing
* anything in these periods.
*/
if (!(mp->m_super->s_flags & MS_ACTIVE) &&
!(mp->m_flags & XFS_MOUNT_RDONLY)) {
/* dgc: errors ignored here */
if (mp->m_super->s_frozen == SB_UNFROZEN &&
xfs_log_need_covered(mp))
Expand Down Expand Up @@ -488,14 +496,6 @@ xfs_syncd_queue_reclaim(
struct xfs_mount *mp)
{

/*
* We can have inodes enter reclaim after we've shut down the syncd
* workqueue during unmount, so don't allow reclaim work to be queued
* during unmount.
*/
if (!(mp->m_super->s_flags & MS_ACTIVE))
return;

rcu_read_lock();
if (radix_tree_tagged(&mp->m_perag_tree, XFS_ICI_RECLAIM_TAG)) {
queue_delayed_work(xfs_syncd_wq, &mp->m_reclaim_work,
Expand Down Expand Up @@ -564,7 +564,6 @@ xfs_syncd_init(
INIT_DELAYED_WORK(&mp->m_reclaim_work, xfs_reclaim_worker);

xfs_syncd_queue_sync(mp);
xfs_syncd_queue_reclaim(mp);

return 0;
}
Expand Down

0 comments on commit 9c5a2fc

Please sign in to comment.