summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c45558b)
ldiskfs_fiemap() can return {0,0,0} for last non-allocated
region. osd_is_mapped() should be able to recognize and
cache this state.
Fixes:
144b5a65c1 ("LU-7132 osd-ldiskfs: speedup rewrites")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I03883038c2c0ec84754377a442c4947c7e3021a9
Reviewed-on: https://review.whamcloud.com/41481
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
return 0;
start = fe.fe_logical >> inode->i_blkbits;
return 0;
start = fe.fe_logical >> inode->i_blkbits;
+ if (fei.fi_extents_mapped == 0) {
+ /* a special case - no extent found at this offset and forward.
+ * we can consider this as a hole to EOF. it's safe to cache
+ * as other threads can not allocate/punch blocks this thread
+ * is working on (LDLM). */
+ cached_extent->start = block;
+ cached_extent->end = i_size_read(inode) >> inode->i_blkbits;
+ cached_extent->mapped = 0;
+ return 0;
+ }
if (start > block) {
cached_extent->start = block;
if (start > block) {
cached_extent->start = block;