On Wed, 23 Nov 2011 21:46:39 -0500
KOSAKI Motohiro<kosaki.motohiro@xxxxxxxxxxxxxx> wrote:
FALLOC_FL_KEEP_SIZE+ while (index< end) {
+ ret = shmem_getpage(inode, index,&page, SGP_WRITE, NULL);
If the 'page' for index exists before this call, this will return the page without
allocaton.
Then, the page may not be zero-cleared. I think the page should be zero-cleared.
No. fallocate shouldn't destroy existing data. It only ensure
subsequent file access don't make ENOSPC error.
This flag allocates and initializes to zero the disk space
within the range specified by offset and len. ....
just manual is unclear ? it seems that the range [offset, offset+len) is
zero cleared after the call.