On Thu, 12/07 14:30, Eric Blake wrote: > We are gradually moving away from sector-based interfaces, towards > byte-based. Update the file protocol driver accordingly. > > In want_zero mode, we continue to report fine-grained hole > information (the caller wants as much mapping detail as possible); > but when not in that mode, the caller prefers larger *pnum and > merely cares about what offsets are allocated at this layer, rather > than where the holes live. Since holes still read as zeroes at > this layer (rather than deferring to a backing layer), we can take > the shortcut of skipping lseek(), and merely state that all bytes > are allocated. > > We can also drop redundant bounds checks that are already > guaranteed by the block layer. > > Signed-off-by: Eric Blake <[email protected]> >
Reviewed-by: Fam Zheng <[email protected]>
