On Thu, Jan 11, 2018 at 05:12:49PM -0600, Eric Sandeen wrote: > On 1/5/18 7:52 PM, Darrick J. Wong wrote: > > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > > > Create some wrappers to call the scrub ioctls. > > > +/* > > + * Sleep for 100ms * however many -b we got past the initial one. > > + * This is an (albeit clumsy) way to throttle scrub activity. > > + */ > > +void > > +background_sleep(void) > > +{ > > + unsigned long long time; > > + struct timespec tv; > > + > > + if (bg_mode < 2) > > + return; > > + > > + time = 100000 * (bg_mode - 1); > > <coverity pass> > > Probably want to cast the constant(s) to something larger if someone > issues -b $HUGE ... 100000ULL? I suppose, though I doubt anyone will pass -b 42,950 times. 8-) (-b doesn't take an argument) Fixed. --D > -Eric > -- > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html