public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Lachlan McIlroy <lachlan@sgi.com>
To: David Chinner <dgc@sgi.com>
Cc: xfs-dev <xfs-dev@sgi.com>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] Don't double count reserved block changes on UP.
Date: Wed, 23 Apr 2008 14:19:08 +1000	[thread overview]
Message-ID: <480EB8BC.9010205@sgi.com> (raw)
In-Reply-To: <20080422110052.GY103491721@sgi.com>

Makes sense.  Looks good to me.

David Chinner wrote:
> Don't double count reserved block changes on UP.
> 
> On uniprocessor machines, the incore superblock is used for
> all in memory accounting of free blocks. in this situation,
> changes to the reserved block count are accounted twice;
> once directly and once via xfs_mod_incore_sb(). Seeing as
> the modification on SMP is done via xfs_mod_incore_sb(),
> make this the only update mechanism that UP uses as well.
> 
> Signed-off-by: Dave Chinner <dgc@sgi.com>
> ---
>  fs/xfs/xfs_fsops.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
> index d3a0f53..c4f7c93 100644
> --- a/fs/xfs/xfs_fsops.c
> +++ b/fs/xfs/xfs_fsops.c
> @@ -552,11 +552,8 @@ retry:
>  			mp->m_resblks += free;
>  			mp->m_resblks_avail += free;
>  			fdblks_delta = -free;
> -			mp->m_sb.sb_fdblocks = XFS_ALLOC_SET_ASIDE(mp);
>  		} else {
>  			fdblks_delta = -delta;
> -			mp->m_sb.sb_fdblocks =
> -				lcounter + XFS_ALLOC_SET_ASIDE(mp);
>  			mp->m_resblks = request;
>  			mp->m_resblks_avail += delta;
>  		}
> @@ -587,7 +584,6 @@ out:
>  		if (error == ENOSPC)
>  			goto retry;
>  	}
> -
>  	return 0;
>  }
>  
> 

      reply	other threads:[~2008-04-23  4:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-22 11:00 [PATCH] Don't double count reserved block changes on UP David Chinner
2008-04-23  4:19 ` Lachlan McIlroy [this message]

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=480EB8BC.9010205@sgi.com \
    --to=lachlan@sgi.com \
    --cc=dgc@sgi.com \
    --cc=xfs-dev@sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox