Actions
Bug #6660
closedufs may read too many indirect blocks, flush a random block to disk
Start date:
2016-02-15
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
ufs does:
for (i = 0; i <= NIADDR; i++) { if ((blkno = ip->i_ib[i]) == 0) continue; blkflush(ip->i_dev, (daddr_t)fsbtodb(fs, blkno));
When syncing indirect blocks. That should be less-than, not less-or-equal.
As it stands, if the value after i_ib is non-0 (that's i_ic.ic_ib, the following value is ic_flags) we'll treat it as a block# and flush that block.
It's likely that if we expect a 64bit daddr, we'll just never match the block. With a 32bit daddr it seems like it'll overflow much of the time, and the resulting disk block has a much greater chance to actually exist and be spuriously flushed.
Updated by Electric Monk about 6 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 49a119360d49a6e7e0b08e69ff5d965e828d3424
commit 49a119360d49a6e7e0b08e69ff5d965e828d3424 Author: Richard Lowe <richlowe@richlowe.net> Date: 2016-02-18T20:28:37.000Z 6660 ufs may read too many indirect blocks, flush a random block to disk Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Approved by: Dan McDonald <danmcd@omniti.com>
Actions