Commit 15a935de authored by Jon Krueger's avatar Jon Krueger Committed by Christoph Hellwig

[XFS] Correct the (file size >= stripe unit) check inside

xfs_iomap_write_delay.  It was comparing the file size, in
bytes, against the stripe unit size, in FSBs. (PV 911469)

SGI Modid: xfs-linux:xfs-kern:169744b
parent 28474d94
...@@ -591,10 +591,11 @@ xfs_iomap_write_delay( ...@@ -591,10 +591,11 @@ xfs_iomap_write_delay(
firstblock = NULLFSBLOCK; firstblock = NULLFSBLOCK;
/* /*
* roundup the allocation request to m_dalign boundary if file size * Roundup the allocation request to a stripe unit (m_dalign) boundary
* is greater that 512K and we are allocating past the allocation eof * if the file size is >= stripe unit size, and we are allocating past
* the allocation eof.
*/ */
if (mp->m_dalign && (isize >= mp->m_dalign) && aeof) { if (mp->m_dalign && (isize >= XFS_FSB_TO_B(mp, mp->m_dalign)) && aeof) {
int eof; int eof;
xfs_fileoff_t new_last_fsb; xfs_fileoff_t new_last_fsb;
new_last_fsb = roundup_64(last_fsb, mp->m_dalign); new_last_fsb = roundup_64(last_fsb, mp->m_dalign);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment