~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/script/find_lost_bdev_ops.pl

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-07-16 09:56:24 UTC
  • mfrom: (0.3.11)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: package-import@ubuntu.com-20120716095624-azr2w4hbhei1rxmx
Tags: upstream-0.48
ImportĀ upstreamĀ versionĀ 0.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
 
3
use strict;
 
4
my %op;
 
5
 
 
6
my $line = 0;
 
7
while (<>) {
 
8
        #print $line . $_ if /0x8d4f6a0/;
 
9
        chomp;
 
10
        $line++;
 
11
 
 
12
        #bdev(./ebofsdev/0)._submit_io bio(wr 269~1 usemap 0x4de33cc0)
 
13
        if (my ($bio) = /_submit_io bio\(.*(0x\w+)\)/) {
 
14
                $op{$bio} = $line;
 
15
        }
 
16
 
 
17
        # cancel
 
18
        #bdev(./ebofsdev/3)._cancel_io bio(wr 1525~1 bh_write 0x8a437b8)
 
19
        if (my ($bio) = /_cancel_io bio\(.*(0x\w+)\)/ &&
 
20
                !(/FAILED/)) {
 
21
                delete $op{$bio};
 
22
        }
 
23
        
 
24
        # finish
 
25
        #bdev(./ebofsdev/3).complete_thread finishing bio(wr 1131~1 write_cnode 0x832c1f8)
 
26
        if (my ($bio) = /complete_thread finishing bio\(.*(0x\w+)\)/) {
 
27
                delete $op{$bio};
 
28
        }
 
29
        
 
30
}
 
31
 
 
32
for my $bio (keys %op) {
 
33
        print "---- lost bio $bio\n";
 
34
}