scripts/bdev_grep: parse bluefs style extents too

(they use + instead of ~)

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2016-09-02 12:07:10 -04:00
parent a3568d5a5f
commit 4c39071a48

View File

@ -6,8 +6,8 @@ while (<>) {
# next unless / \d\d bdev /;
my $rest = $_;
my @hit;
while ($rest =~ /([\da-f]+)~([\da-f]+)/) {
my ($o, $l) = $rest =~ /([\da-f]+)~([\da-f]+)/;
while ($rest =~ /([\da-f]+)[~\+]([\da-f]+)/) {
my ($o, $l) = $rest =~ /([\da-f]+)[~\+]([\da-f]+)/;
$rest = $';
if (hex($offset) >= hex($o) &&
hex($offset) < hex($o) + hex($l)) {