* [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
* Re: [PATCH] libxfs: clean up _calc_dquots_per_chunk
2016-10-18 23:36 [PATCH] libxfs: clean up _calc_dquots_per_chunk Darrick J. Wong
@ 2016-10-19 2:45 ` Eric Sandeen
0 siblings, 0 replies; 4+ messages in thread
From: Eric Sandeen @ 2016-10-19 2:45 UTC (permalink / raw)
To: Darrick J. Wong, Dave Chinner; +Cc: linux-xfs
On 10/18/16 6:36 PM, Darrick J. Wong wrote:
> 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>
ok that's a cleanup ;)
Reviewed-by: Eric Sandeen <sandeen@redhat.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),
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [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, 0 replies; 4+ messages in thread
From: Eric Sandeen @ 2016-10-19 2:44 UTC (permalink / raw)
To: Darrick J. Wong, Dave Chinner; +Cc: linux-xfs
Well it's not a cleanup - it's fix ;)
On 10/18/16 6:35 PM, Darrick J. Wong wrote:
> 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>
Reviewed-by: Eric Sandeen <sandeen@redhat.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),
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [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
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:36 [PATCH] libxfs: clean up _calc_dquots_per_chunk Darrick J. Wong
2016-10-19 2:45 ` Eric Sandeen
-- strict thread matches above, loose matches on Subject: below --
2016-10-18 23:35 Darrick J. Wong
2016-10-19 2:44 ` Eric Sandeen
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.