* Review: Fix bulkstat block count units
@ 2007-01-31 1:29 David Chinner
2007-01-31 1:39 ` Vlad Apostolov
0 siblings, 1 reply; 2+ messages in thread
From: David Chinner @ 2007-01-31 1:29 UTC (permalink / raw)
To: xfs-dev; +Cc: xfs
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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Review: Fix bulkstat block count units
2007-01-31 1:29 Review: Fix bulkstat block count units David Chinner
@ 2007-01-31 1:39 ` Vlad Apostolov
0 siblings, 0 replies; 2+ messages in thread
From: Vlad Apostolov @ 2007-01-31 1:39 UTC (permalink / raw)
To: David Chinner; +Cc: xfs-dev, xfs
The patch is looking good Dave.
Regards,
Vlad
David Chinner wrote:
> 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.
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-01-31 1:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-31 1:29 Review: Fix bulkstat block count units David Chinner
2007-01-31 1:39 ` Vlad Apostolov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox