From: Jaegeuk Kim Date: Mon, 28 Apr 2014 09:12:36 +0000 (+0900) Subject: f2fs: consider fallocated space for SEEK_DATA X-Git-Tag: omap-for-v3.16/fixes-against-rc1~73^2~26 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f7670fe9fe47e7e56db658eb8831febe47627f2;p=pandora-kernel.git f2fs: consider fallocated space for SEEK_DATA If an amount of data are allocated though fallocate and user writes a couple of data among the space, f2fs should return the data offset made by user when SEEK_DATA is requested. For example, (N: NEW_ADDR by fallocate, X: NEW_ADDR by user) 1) fallocate 0 ~ 10MB f -> N N N N N N N N N N N N ... N 2) write 4KB at 5MB offset f -> N N N N N X N N N N N N ... N 3) SEEK_DATA from 0 should return 5MB offset So, this patch adds a routine to search the first dirty page to handle that. Then, the SEEK_DATA flow skips NEW_ADDR offsets until any dirty page is found. Signed-off-by: Jaegeuk Kim --- Reading git-diff-tree failed