Skip to content

Commit

Permalink
Update fibmap.go
Browse files Browse the repository at this point in the history
not continuous segment is different extent
  • Loading branch information
chenzhongtao authored Aug 11, 2016
1 parent 77fdb38 commit dccaece
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 dccaece

Please sign in to comment.