Project

General

Profile

Actions

Bug #6660

closed

ufs may read too many indirect blocks, flush a random block to disk

Added by Rich Lowe over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
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.

Actions

Also available in: Atom PDF