All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 5/5] xfs: Remove icsb infrastructure
Date: Mon, 2 Feb 2015 12:11:14 -0500	[thread overview]
Message-ID: <20150202171113.GC6096@laptop.bfoster> (raw)
In-Reply-To: <1422826983-29570-6-git-send-email-david@fromorbit.com>

On Mon, Feb 02, 2015 at 08:43:03AM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> Now that the in-cor superblock infrastructure has been replaced with
> generic per-cpu counters, we don't need it anymore. Nuke it from
> orbit so we are sure that it won't haunt us again...
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---
>  fs/xfs/libxfs/xfs_bmap.c |  16 +-
>  fs/xfs/libxfs/xfs_sb.c   |  10 +-
>  fs/xfs/xfs_fsops.c       |   2 -
>  fs/xfs/xfs_iomap.c       |   1 -
>  fs/xfs/xfs_linux.h       |   9 -
>  fs/xfs/xfs_log_recover.c |   3 -
>  fs/xfs/xfs_mount.c       | 509 -----------------------------------------------
>  fs/xfs/xfs_mount.h       |  64 +-----
>  fs/xfs/xfs_super.c       |  76 +++++--
>  9 files changed, 67 insertions(+), 623 deletions(-)
> 
...
> +static int
> +xfs_init_percpu_counters(
> +	struct xfs_mount	*mp)
> +{
> +	int		error;
> +
> +	error = percpu_counter_init(&mp->m_sb.sb_icount, 0, GFP_KERNEL);
> +	if (error)
> +		return ENOMEM;

			-ENOMEM

Brian

> +
> +	error = percpu_counter_init(&mp->m_sb.sb_ifree, 0, GFP_KERNEL);
> +	if (error)
> +		goto free_icount;
> +
> +	error = percpu_counter_init(&mp->m_sb.sb_fdblocks, 0, GFP_KERNEL);
> +	if (error)
> +		goto free_ifree;
> +
> +	return 0;
> +
> +free_ifree:
> +	percpu_counter_destroy(&mp->m_sb.sb_ifree);
> +free_icount:
> +	percpu_counter_destroy(&mp->m_sb.sb_icount);
> +	return -ENOMEM;
> +}
> +
> +static void
> +xfs_destroy_percpu_counters(
> +	struct xfs_mount	*mp)
> +{
> +	percpu_counter_destroy(&mp->m_sb.sb_icount);
> +	percpu_counter_destroy(&mp->m_sb.sb_ifree);
> +	percpu_counter_destroy(&mp->m_sb.sb_fdblocks);
> +}
> +
>  STATIC int
>  xfs_fs_fill_super(
>  	struct super_block	*sb,
> @@ -1455,7 +1472,7 @@ xfs_fs_fill_super(
>  	if (error)
>  		goto out_close_devices;
>  
> -	error = xfs_icsb_init_counters(mp);
> +	error = xfs_init_percpu_counters(mp);
>  	if (error)
>  		goto out_destroy_workqueues;
>  
> @@ -1513,7 +1530,7 @@ xfs_fs_fill_super(
>   out_free_sb:
>  	xfs_freesb(mp);
>   out_destroy_counters:
> -	xfs_icsb_destroy_counters(mp);
> +	xfs_destroy_percpu_counters(mp);
>  out_destroy_workqueues:
>  	xfs_destroy_mount_workqueues(mp);
>   out_close_devices:
> @@ -1530,6 +1547,23 @@ out_destroy_workqueues:
>  	goto out_free_sb;
>  }
>  
> +STATIC void
> +xfs_fs_put_super(
> +	struct super_block	*sb)
> +{
> +	struct xfs_mount	*mp = XFS_M(sb);
> +
> +	xfs_filestream_unmount(mp);
> +	xfs_unmountfs(mp);
> +
> +	xfs_freesb(mp);
> +	xfs_destroy_percpu_counters(mp);
> +	xfs_destroy_mount_workqueues(mp);
> +	xfs_close_devices(mp);
> +	xfs_free_fsname(mp);
> +	kfree(mp);
> +}
> +
>  STATIC struct dentry *
>  xfs_fs_mount(
>  	struct file_system_type	*fs_type,
> -- 
> 2.0.0
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2015-02-02 17:11 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-01 21:42 [RFC PATCH 0/5] xfs: use generic percpu counters for icsb Dave Chinner
2015-02-01 21:42 ` [PATCH 1/5] xfs: struct xfs_sb is no longer tied to the on-disk format Dave Chinner
2015-02-02  8:41   ` Christoph Hellwig
2015-02-02 19:30     ` Dave Chinner
2015-02-03 21:37       ` Christoph Hellwig
2015-02-03 21:46         ` Dave Chinner
2015-02-03 23:34           ` Dave Chinner
2015-02-01 21:43 ` [PATCH 2/5] xfs: use generic percpu counters for inode counter Dave Chinner
2015-02-02 16:44   ` Christoph Hellwig
2015-02-02 19:33     ` Dave Chinner
2015-02-03 21:38       ` Christoph Hellwig
2015-02-01 21:43 ` [PATCH 3/5] xfs: use generic percpu counters for free " Dave Chinner
2015-02-02 17:10   ` Brian Foster
2015-02-01 21:43 ` [PATCH 4/5] xfs: use generic percpu counters for free block counter Dave Chinner
2015-02-02 16:48   ` Christoph Hellwig
2015-02-02 19:34     ` Dave Chinner
2015-02-02 17:11   ` Brian Foster
2015-02-02 19:39     ` Dave Chinner
2015-02-01 21:43 ` [PATCH 5/5] xfs: Remove icsb infrastructure Dave Chinner
2015-02-02 17:11   ` Brian Foster [this message]
2015-02-03 21:50 ` [RFC PATCH 0/5] xfs: use generic percpu counters for icsb Christoph Hellwig
2015-02-03 21:58   ` Dave Chinner
2015-02-03 22:02     ` Christoph Hellwig
2015-02-03 22:13       ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150202171113.GC6096@laptop.bfoster \
    --to=bfoster@redhat.com \
    --cc=david@fromorbit.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.