Source
138
138
* @nsecs: Number of nanoseconds to gather statistics for.
139
139
*
140
140
* The timer callback will be called when the window expires.
141
141
*/
142
142
static inline void blk_stat_activate_nsecs(struct blk_stat_callback *cb,
143
143
u64 nsecs)
144
144
{
145
145
mod_timer(&cb->timer, jiffies + nsecs_to_jiffies(nsecs));
146
146
}
147
147
148
+
static inline void blk_stat_deactivate(struct blk_stat_callback *cb)
149
+
{
150
+
del_timer_sync(&cb->timer);
151
+
}
152
+
148
153
/**
149
154
* blk_stat_activate_msecs() - Gather block statistics during a time window in
150
155
* milliseconds.
151
156
* @cb: The callback.
152
157
* @msecs: Number of milliseconds to gather statistics for.
153
158
*
154
159
* The timer callback will be called when the window expires.
155
160
*/
156
161
static inline void blk_stat_activate_msecs(struct blk_stat_callback *cb,
157
162
unsigned int msecs)