1*1a3d31e3SAndroid Build Coastguard Worker /* 2*1a3d31e3SAndroid Build Coastguard Worker * blktrace output analysis: generate a timeline & gather statistics 3*1a3d31e3SAndroid Build Coastguard Worker * 4*1a3d31e3SAndroid Build Coastguard Worker * Copyright (C) 2006 Alan D. Brunelle <[email protected]> 5*1a3d31e3SAndroid Build Coastguard Worker * 6*1a3d31e3SAndroid Build Coastguard Worker * This program is free software; you can redistribute it and/or modify 7*1a3d31e3SAndroid Build Coastguard Worker * it under the terms of the GNU General Public License as published by 8*1a3d31e3SAndroid Build Coastguard Worker * the Free Software Foundation; either version 2 of the License, or 9*1a3d31e3SAndroid Build Coastguard Worker * (at your option) any later version. 10*1a3d31e3SAndroid Build Coastguard Worker * 11*1a3d31e3SAndroid Build Coastguard Worker * This program is distributed in the hope that it will be useful, 12*1a3d31e3SAndroid Build Coastguard Worker * but WITHOUT ANY WARRANTY; without even the implied warranty of 13*1a3d31e3SAndroid Build Coastguard Worker * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*1a3d31e3SAndroid Build Coastguard Worker * GNU General Public License for more details. 15*1a3d31e3SAndroid Build Coastguard Worker * 16*1a3d31e3SAndroid Build Coastguard Worker * You should have received a copy of the GNU General Public License 17*1a3d31e3SAndroid Build Coastguard Worker * along with this program; if not, write to the Free Software 18*1a3d31e3SAndroid Build Coastguard Worker * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19*1a3d31e3SAndroid Build Coastguard Worker * 20*1a3d31e3SAndroid Build Coastguard Worker */ 21*1a3d31e3SAndroid Build Coastguard Worker #include "globals.h" 22*1a3d31e3SAndroid Build Coastguard Worker handle_requeue(struct io * r_iop)23*1a3d31e3SAndroid Build Coastguard Workerstatic void handle_requeue(struct io *r_iop) 24*1a3d31e3SAndroid Build Coastguard Worker { 25*1a3d31e3SAndroid Build Coastguard Worker r_iop->dip->n_qs++; 26*1a3d31e3SAndroid Build Coastguard Worker r_iop->dip->t_act_q += r_iop->dip->n_act_q; 27*1a3d31e3SAndroid Build Coastguard Worker r_iop->dip->n_act_q++; 28*1a3d31e3SAndroid Build Coastguard Worker } 29*1a3d31e3SAndroid Build Coastguard Worker trace_requeue(struct io * r_iop)30*1a3d31e3SAndroid Build Coastguard Workervoid trace_requeue(struct io *r_iop) 31*1a3d31e3SAndroid Build Coastguard Worker { 32*1a3d31e3SAndroid Build Coastguard Worker if (io_setup(r_iop, IOP_R)) 33*1a3d31e3SAndroid Build Coastguard Worker handle_requeue(r_iop); 34*1a3d31e3SAndroid Build Coastguard Worker io_release(r_iop); 35*1a3d31e3SAndroid Build Coastguard Worker } 36