From: Richard Wareing <rwareing@fb.com>
To: linux-xfs@vger.kernel.org
Cc: Richard Wareing <rwareing@fb.com>,
david@fromorbit.com, darrick.wong@oracle.com
Subject: [PATCH v2 2/3] fs/xfs: Add real-time device support to statfs
Date: Sat, 2 Sep 2017 15:41:44 -0700 [thread overview]
Message-ID: <20170902224145.1291030-3-rwareing@fb.com> (raw)
In-Reply-To: <20170902224145.1291030-1-rwareing@fb.com>
- Reports real-time device free blocks in statfs calls if
inheritance bit is set on the inode of directory. This is a bit more
intuitive, especially for use-cases which are using a much larger
device for the real-time device.
Signed-off-by: Richard Wareing <rwareing@fb.com>
---
fs/xfs/xfs_super.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 4dbf95c..a1d6968 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1148,6 +1148,12 @@ xfs_fs_statfs(
((mp->m_qflags & (XFS_PQUOTA_ACCT|XFS_PQUOTA_ENFD))) ==
(XFS_PQUOTA_ACCT|XFS_PQUOTA_ENFD))
xfs_qm_statvfs(ip, statp);
+ if ((ip->i_d.di_flags & XFS_DIFLAG_RTINHERIT) &&
+ (mp->m_rtdev_targp != NULL)) {
+ statp->f_blocks = sbp->sb_rblocks;
+ statp->f_bfree = sbp->sb_frextents * sbp->sb_rextsize -
+ mp->m_alloc_set_aside;
+ }
return 0;
}
--
2.9.3
next prev parent reply other threads:[~2017-09-02 22:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-02 22:41 [PATCH v2 0/3] XFS real-time device tweaks Richard Wareing
2017-09-02 22:41 ` [PATCH v2 1/3] fs/xfs: Add rtdisable option Richard Wareing
2017-09-02 22:41 ` Richard Wareing [this message]
2017-09-03 8:49 ` [PATCH v2 2/3] fs/xfs: Add real-time device support to statfs Christoph Hellwig
2017-09-02 22:41 ` [PATCH v2 3/3] fs/xfs: Add rtfallocmin mount option Richard Wareing
2017-09-03 8:50 ` Christoph Hellwig
2017-09-03 22:04 ` Richard Wareing
2017-09-03 8:56 ` [PATCH v2 0/3] XFS real-time device tweaks Christoph Hellwig
2017-09-03 22:02 ` Richard Wareing
2017-09-06 3:44 ` Dave Chinner
2017-09-06 6:54 ` Richard Wareing
2017-09-06 11:19 ` Dave Chinner
2017-09-06 11:43 ` Brian Foster
2017-09-06 12:12 ` Dave Chinner
2017-09-06 12:49 ` Brian Foster
2017-09-06 23:29 ` Dave Chinner
2017-09-07 11:58 ` Brian Foster
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=20170902224145.1291030-3-rwareing@fb.com \
--to=rwareing@fb.com \
--cc=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=linux-xfs@vger.kernel.org \
/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