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: fallocate() should zero new 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
b9660d9
..
77843ff
100644
(file)
--- a/
lustre/osd-ldiskfs/osd_io.c
+++ b/
lustre/osd-ldiskfs/osd_io.c
@@
-2218,7
+2218,8
@@
static int osd_fallocate(const struct lu_env *env, struct dt_object *dt,
boff = start >> inode->i_blkbits;
blen = (ALIGN(end, 1 << inode->i_blkbits) >> inode->i_blkbits) - boff;
boff = start >> inode->i_blkbits;
blen = (ALIGN(end, 1 << inode->i_blkbits) >> inode->i_blkbits) - boff;
- flags = LDISKFS_GET_BLOCKS_CREATE;
+ /* Create and Write zeros to new extents */
+ flags = LDISKFS_GET_BLOCKS_CREATE_ZERO;
if (mode & FALLOC_FL_KEEP_SIZE)
flags |= LDISKFS_GET_BLOCKS_KEEP_SIZE;
if (mode & FALLOC_FL_KEEP_SIZE)
flags |= LDISKFS_GET_BLOCKS_KEEP_SIZE;