Don't allow zero or negative values from XFS_SCRUB_DISK_ERROR_INTERVAL
to slip into the system. This is a debugging knob so we don't need to
be rigorous, but we can at least take care of obvious garbage values.
Coverity-id:
1454842
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
[sandeen: fix patch title]
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
interval = strtoull(p, NULL, 10);
interval &= ~((1U << disk->d_lbalog) - 1);
}
+ if (interval <= 0) {
+ interval = -1;
+ return 0;
+ }
/*
* We simulate disk errors by pretending that there are media errors at