From: David Chinner <dgc@sgi.com>
To: xfs-dev@sgi.com
Cc: xfs@oss.sgi.com
Subject: Review: Fix bulkstat block count units
Date: Wed, 31 Jan 2007 12:29:15 +1100 [thread overview]
Message-ID: <20070131012915.GO33919298@melbourne.sgi.com> (raw)
The recent bulkstat improvements introduced a minor
regression - they changed the units of the dt_count field
from 512 byte blocks to filesystem blocks. This changes
the userspace visible fields and can break existing applications
that use bulkstat.
Comments?
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
---
fs/xfs/dmapi/xfs_dm.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: 2.6.x-xfs-new/fs/xfs/dmapi/xfs_dm.c
===================================================================
--- 2.6.x-xfs-new.orig/fs/xfs/dmapi/xfs_dm.c 2007-01-16 10:54:14.000000000 +1100
+++ 2.6.x-xfs-new/fs/xfs/dmapi/xfs_dm.c 2007-01-29 18:09:35.612014885 +1100
@@ -426,7 +426,8 @@ xfs_dip_to_stat(
case XFS_DINODE_FMT_BTREE:
buf->dt_rdev = 0;
buf->dt_blksize = mp->m_sb.sb_blocksize;
- buf->dt_blocks = INT_GET(dic->di_nblocks, ARCH_CONVERT);
+ buf->dt_blocks = XFS_FSB_TO_BB(mp,
+ INT_GET(dic->di_nblocks, ARCH_CONVERT));
break;
}
@@ -494,7 +495,8 @@ xfs_ip_to_stat(
case XFS_DINODE_FMT_BTREE:
buf->dt_rdev = 0;
buf->dt_blksize = mp->m_sb.sb_blocksize;
- buf->dt_blocks = dic->di_nblocks + ip->i_delayed_blks;
+ buf->dt_blocks = XFS_FSB_TO_BB(mp,
+ (dic->di_nblocks + ip->i_delayed_blks));
break;
}
next reply other threads:[~2007-01-31 1:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-31 1:29 David Chinner [this message]
2007-01-31 1:39 ` Review: Fix bulkstat block count units Vlad Apostolov
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=20070131012915.GO33919298@melbourne.sgi.com \
--to=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 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.