* [PATCH] Don't double count reserved block changes on UP.
@ 2008-04-22 11:00 David Chinner
2008-04-23 4:19 ` Lachlan McIlroy
0 siblings, 1 reply; 2+ messages in thread
From: David Chinner @ 2008-04-22 11:00 UTC (permalink / raw)
To: xfs-dev; +Cc: xfs-oss
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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Don't double count reserved block changes on UP.
2008-04-22 11:00 [PATCH] Don't double count reserved block changes on UP David Chinner
@ 2008-04-23 4:19 ` Lachlan McIlroy
0 siblings, 0 replies; 2+ messages in thread
From: Lachlan McIlroy @ 2008-04-23 4:19 UTC (permalink / raw)
To: David Chinner; +Cc: xfs-dev, xfs-oss
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;
> }
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-23 4:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox