Linux XFS filesystem development
 help / color / mirror / Atom feed
* [PATCH] libxfs: clean up _calc_dquots_per_chunk
@ 2016-10-18 23:35 Darrick J. Wong
  2016-10-19  2:44 ` Eric Sandeen
  0 siblings, 1 reply; 4+ messages in thread
From: Darrick J. Wong @ 2016-10-18 23:35 UTC (permalink / raw)
  To: Dave Chinner; +Cc: linux-xfs

The function xfs_calc_dquots_per_chunk takes a parameter in units
of basic blocks.  The kernel seems to get the units wrong, but
userspace got 'fixed' by commenting out the unnecessary conversion.
Fix both.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 fs/xfs/libxfs/xfs_dquot_buf.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_dquot_buf.c b/fs/xfs/libxfs/xfs_dquot_buf.c
index 3cc3cf7..ac9a003 100644
--- a/fs/xfs/libxfs/xfs_dquot_buf.c
+++ b/fs/xfs/libxfs/xfs_dquot_buf.c
@@ -191,8 +191,7 @@ xfs_dquot_buf_verify_crc(
 	if (mp->m_quotainfo)
 		ndquots = mp->m_quotainfo->qi_dqperchunk;
 	else
-		ndquots = xfs_calc_dquots_per_chunk(
-					XFS_BB_TO_FSB(mp, bp->b_length));
+		ndquots = xfs_calc_dquots_per_chunk(bp->b_length);
 
 	for (i = 0; i < ndquots; i++, d++) {
 		if (!xfs_verify_cksum((char *)d, sizeof(struct xfs_dqblk),

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] libxfs: clean up _calc_dquots_per_chunk
@ 2016-10-18 23:36 Darrick J. Wong
  2016-10-19  2:45 ` Eric Sandeen
  0 siblings, 1 reply; 4+ messages in thread
From: Darrick J. Wong @ 2016-10-18 23:36 UTC (permalink / raw)
  To: Dave Chinner; +Cc: linux-xfs

The function xfs_calc_dquots_per_chunk takes a parameter in units
of basic blocks.  The kernel seems to get the units wrong, but
userspace got 'fixed' by commenting out the unnecessary conversion.
Fix both.

(This is the xfsprogs patch.)

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 libxfs/xfs_dquot_buf.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/libxfs/xfs_dquot_buf.c b/libxfs/xfs_dquot_buf.c
index 433abe4..aae8854 100644
--- a/libxfs/xfs_dquot_buf.c
+++ b/libxfs/xfs_dquot_buf.c
@@ -200,7 +200,6 @@ xfs_dquot_buf_verify_crc(
 		ndquots = mp->m_quotainfo->qi_dqperchunk;
 	else
 		ndquots = xfs_calc_dquots_per_chunk(bp->b_length);
-//					XFS_BB_TO_FSB(mp, bp->b_length));
 
 	for (i = 0; i < ndquots; i++, d++) {
 		if (!xfs_verify_cksum((char *)d, sizeof(struct xfs_dqblk),

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-19  2:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18 23:35 [PATCH] libxfs: clean up _calc_dquots_per_chunk Darrick J. Wong
2016-10-19  2:44 ` Eric Sandeen
  -- strict thread matches above, loose matches on Subject: below --
2016-10-18 23:36 Darrick J. Wong
2016-10-19  2:45 ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox