Skip to content

Commit

Permalink
f3probe: avoid resets for drives without any cache
Browse files Browse the repository at this point in the history
  • Loading branch information
AltraMayor committed Nov 14, 2015
1 parent cedb3f1 commit 49c7d5f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,14 @@ static int assess_reset_effect(struct device *dev,
first_pos, last_pos, salt))
return true;

if (!b4_reset_count_block) {
/* The drive has no cache whatsoever. */
*pcache_size_block = 0;
*pneed_reset = false;
*pdone = true;
return false;
}

/* Reset. */
if (dev_reset(dev) && dev_reset(dev))
return true;
Expand Down

0 comments on commit 49c7d5f

Please sign in to comment.