Skip to content

Commit

Permalink
Merge pull request intel#2 from chenzhongtao/master
Browse files Browse the repository at this point in the history
fix bug of FibmapExtents function
  • Loading branch information
frostschutz authored Aug 25, 2016
2 parents 77fdb38 + dccaece commit b32c231
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fibmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ func (f FibmapFile) FibmapExtents() ([]Extent, syscall.Errno) {
continue
}

if block != physical && physical != 0 {
//not continuous segment
e.Length = uint64(length) * uint64(bsz)
result = append(result, e)
}

// new extent
e = Extent{}
e.Logical = uint64(i) * uint64(bsz)
Expand Down

0 comments on commit b32c231

Please sign in to comment.