Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-14286 osd-ldiskfs: don't read unwritten blocks
[fs/lustre-release.git]
/
lustre
/
osd-ldiskfs
/
osd_io.c
diff --git
a/lustre/osd-ldiskfs/osd_io.c
b/lustre/osd-ldiskfs/osd_io.c
index
77843ff
..
66db3f5
100644
(file)
--- a/
lustre/osd-ldiskfs/osd_io.c
+++ b/
lustre/osd-ldiskfs/osd_io.c
@@
-1156,6
+1156,14
@@
cont_map:
total++;
break;
}
total++;
break;
}
+ if ((map.m_flags & LDISKFS_MAP_UNWRITTEN) &&
+ !create) {
+ /* don't try to read allocated, but
+ * unwritten blocks, instead fill the
+ * patches with zeros in osd_do_bio() */
+ *(blocks + total) = 0;
+ continue;
+ }
*(blocks + total) = map.m_pblk + c;
/* unmap any possible underlying
* metadata from the block device
*(blocks + total) = map.m_pblk + c;
/* unmap any possible underlying
* metadata from the block device