generic/587: fix rounding error in quota/stat block comparison
It turns out that repquota (which reports in units of 1k blocks) reports
rounded up numbers when the fs blocksize is 512 bytes. However, xfs_io
stat always reports block counts in units of 512 bytes. If the number
of (512b) file blocks is not an even number, the "$3 / 2" expression
will round down, causing the test to fail. Round up to the nearest 1k
to match repquota's behavior.
Reported-by: zlang@redhat.com
Fixes:
6b04ed05456fc6c ("generic: test unwritten extent conversion extent mapping quota accounting")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>