diff options
Diffstat (limited to 'fs/xfs/xfs_super.c')
| -rw-r--r-- | fs/xfs/xfs_super.c | 41 | 
1 files changed, 19 insertions, 22 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index f093ea244849..b56c6e585ece 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -66,7 +66,7 @@ static struct xfs_kobj xfs_dbg_kobj;	/* global debug sysfs attrs */  enum {  	Opt_logbufs, Opt_logbsize, Opt_logdev, Opt_rtdev, Opt_biosize,  	Opt_wsync, Opt_noalign, Opt_swalloc, Opt_sunit, Opt_swidth, Opt_nouuid, -	Opt_mtpt, Opt_grpid, Opt_nogrpid, Opt_bsdgroups, Opt_sysvgroups, +	Opt_grpid, Opt_nogrpid, Opt_bsdgroups, Opt_sysvgroups,  	Opt_allocsize, Opt_norecovery, Opt_inode64, Opt_inode32, Opt_ikeep,  	Opt_noikeep, Opt_largeio, Opt_nolargeio, Opt_attr2, Opt_noattr2,  	Opt_filestreams, Opt_quota, Opt_noquota, Opt_usrquota, Opt_grpquota, @@ -87,7 +87,6 @@ static const match_table_t tokens = {  	{Opt_sunit,	"sunit=%u"},	/* data volume stripe unit */  	{Opt_swidth,	"swidth=%u"},	/* data volume stripe width */  	{Opt_nouuid,	"nouuid"},	/* ignore filesystem UUID */ -	{Opt_mtpt,	"mtpt"},	/* filesystem mount point */  	{Opt_grpid,	"grpid"},	/* group-ID from parent directory */  	{Opt_nogrpid,	"nogrpid"},	/* group-ID from current process */  	{Opt_bsdgroups,	"bsdgroups"},	/* group-ID from parent directory */ @@ -236,9 +235,6 @@ xfs_parseargs(  			if (!mp->m_logname)  				return -ENOMEM;  			break; -		case Opt_mtpt: -			xfs_warn(mp, "%s option not allowed on this system", p); -			return -EINVAL;  		case Opt_rtdev:  			kfree(mp->m_rtname);  			mp->m_rtname = match_strdup(args); @@ -448,7 +444,7 @@ struct proc_xfs_info {  	char		*str;  }; -STATIC int +STATIC void  xfs_showargs(  	struct xfs_mount	*mp,  	struct seq_file		*m) @@ -527,9 +523,8 @@ xfs_showargs(  	if (!(mp->m_qflags & XFS_ALL_QUOTA_ACCT))  		seq_puts(m, ",noquota"); - -	return 0;  } +  static uint64_t  xfs_max_file_offset(  	unsigned int		blockshift) @@ -838,15 +833,10 @@ xfs_init_mount_workqueues(  	if (!mp->m_buf_workqueue)  		goto out; -	mp->m_data_workqueue = alloc_workqueue("xfs-data/%s", -			WQ_MEM_RECLAIM|WQ_FREEZABLE, 0, mp->m_fsname); -	if (!mp->m_data_workqueue) -		goto out_destroy_buf; -  	mp->m_unwritten_workqueue = alloc_workqueue("xfs-conv/%s",  			WQ_MEM_RECLAIM|WQ_FREEZABLE, 0, mp->m_fsname);  	if (!mp->m_unwritten_workqueue) -		goto out_destroy_data_iodone_queue; +		goto out_destroy_buf;  	mp->m_cil_workqueue = alloc_workqueue("xfs-cil/%s",  			WQ_MEM_RECLAIM|WQ_FREEZABLE, 0, mp->m_fsname); @@ -886,8 +876,6 @@ out_destroy_cil:  	destroy_workqueue(mp->m_cil_workqueue);  out_destroy_unwritten:  	destroy_workqueue(mp->m_unwritten_workqueue); -out_destroy_data_iodone_queue: -	destroy_workqueue(mp->m_data_workqueue);  out_destroy_buf:  	destroy_workqueue(mp->m_buf_workqueue);  out: @@ -903,7 +891,6 @@ xfs_destroy_mount_workqueues(  	destroy_workqueue(mp->m_log_workqueue);  	destroy_workqueue(mp->m_reclaim_workqueue);  	destroy_workqueue(mp->m_cil_workqueue); -	destroy_workqueue(mp->m_data_workqueue);  	destroy_workqueue(mp->m_unwritten_workqueue);  	destroy_workqueue(mp->m_buf_workqueue);  } @@ -1376,7 +1363,7 @@ xfs_fs_remount(  			xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);  			return error;  		} -		xfs_icache_enable_reclaim(mp); +		xfs_start_block_reaping(mp);  		/* Create the per-AG metadata reservation pool .*/  		error = xfs_fs_reserve_ag_blocks(mp); @@ -1390,7 +1377,7 @@ xfs_fs_remount(  		 * Cancel background eofb scanning so it cannot race with the  		 * final log force+buftarg wait and deadlock the remount.  		 */ -		xfs_icache_disable_reclaim(mp); +		xfs_stop_block_reaping(mp);  		/* Get rid of any leftover CoW reservations... */  		error = xfs_icache_free_cowblocks(mp, NULL); @@ -1434,7 +1421,7 @@ xfs_fs_freeze(  {  	struct xfs_mount	*mp = XFS_M(sb); -	xfs_icache_disable_reclaim(mp); +	xfs_stop_block_reaping(mp);  	xfs_save_resvblks(mp);  	xfs_quiesce_attr(mp);  	return xfs_sync_sb(mp, true); @@ -1448,7 +1435,7 @@ xfs_fs_unfreeze(  	xfs_restore_resvblks(mp);  	xfs_log_work_queue(mp); -	xfs_icache_enable_reclaim(mp); +	xfs_start_block_reaping(mp);  	return 0;  } @@ -1457,7 +1444,8 @@ xfs_fs_show_options(  	struct seq_file		*m,  	struct dentry		*root)  { -	return xfs_showargs(XFS_M(root->d_sb), m); +	xfs_showargs(XFS_M(root->d_sb), m); +	return 0;  }  /* @@ -1546,8 +1534,14 @@ xfs_init_percpu_counters(  	if (error)  		goto free_ifree; +	error = percpu_counter_init(&mp->m_delalloc_blks, 0, GFP_KERNEL); +	if (error) +		goto free_fdblocks; +  	return 0; +free_fdblocks: +	percpu_counter_destroy(&mp->m_fdblocks);  free_ifree:  	percpu_counter_destroy(&mp->m_ifree);  free_icount: @@ -1571,6 +1565,9 @@ xfs_destroy_percpu_counters(  	percpu_counter_destroy(&mp->m_icount);  	percpu_counter_destroy(&mp->m_ifree);  	percpu_counter_destroy(&mp->m_fdblocks); +	ASSERT(XFS_FORCED_SHUTDOWN(mp) || +	       percpu_counter_sum(&mp->m_delalloc_blks) == 0); +	percpu_counter_destroy(&mp->m_delalloc_blks);  }  static struct xfs_mount *  | 
