From: David Chinner <dgc@sgi.com>
To: Nathan Scott <nscott@aconex.com>
Cc: David Chinner <dgc@sgi.com>, Timothy Shimmin <tes@sgi.com>,
xfs-dev <xfs-dev@sgi.com>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: Review: Be smarter about handling ENOSPC during writeback
Date: Tue, 12 Jun 2007 13:09:33 +1000 [thread overview]
Message-ID: <20070612030933.GN86004887@sgi.com> (raw)
In-Reply-To: <1181603625.3758.53.camel@edge.yarra.acx>
On Tue, Jun 12, 2007 at 09:13:45AM +1000, Nathan Scott wrote:
> On Fri, 2007-06-08 at 17:33 +1000, David Chinner wrote:
> > On Fri, Jun 08, 2007 at 03:28:14PM +1000, Timothy Shimmin wrote:
>
> > > Will we get questions from people about reduced space from df? :)
> >
> > If we do, I think you just volunteered to write the FAQ entry ;)
>
> It would be more correct of XFS to start doing the right thing by
> reporting different values for b_free and b_avail in statfs(2) -
> this code in xfs_mount.c::xfs_statvfs() ...
>
> statp->f_bfree = statp->f_bavail =
> sbp->sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp);
Ok, yeah, that'd work.
Something like:
---
fs/xfs/xfs_vfsops.c | 1 +
1 file changed, 1 insertion(+)
Index: 2.6.x-xfs-new/fs/xfs/xfs_vfsops.c
===================================================================
--- 2.6.x-xfs-new.orig/fs/xfs/xfs_vfsops.c 2007-06-08 21:46:29.000000000 +1000
+++ 2.6.x-xfs-new/fs/xfs/xfs_vfsops.c 2007-06-12 13:08:49.933837815 +1000
@@ -876,6 +876,7 @@ xfs_statvfs(
statp->f_blocks = sbp->sb_dblocks - lsize;
statp->f_bfree = statp->f_bavail =
sbp->sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp);
+ statp->f_bfree += mp->m_resblks_avail;
fakeinos = statp->f_bfree << sbp->sb_inopblog;
#if XFS_BIG_INUMS
fakeinos += mp->m_inoadd;
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
next prev parent reply other threads:[~2007-06-12 3:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-04 4:52 Review: Be smarter about handling ENOSPC during writeback David Chinner
2007-06-04 6:13 ` Timothy Shimmin
2007-06-08 5:28 ` Timothy Shimmin
2007-06-08 7:33 ` David Chinner
2007-06-11 23:13 ` Nathan Scott
2007-06-12 3:09 ` David Chinner [this message]
2007-06-04 9:41 ` Timothy Shimmin
2007-06-04 14:11 ` David 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=20070612030933.GN86004887@sgi.com \
--to=dgc@sgi.com \
--cc=nscott@aconex.com \
--cc=tes@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