On 07/21/2012 02:46 AM, Mark Tinguely wrote:
On 07/20/12 03:28, Jeff Liu wrote:
Hi All,
According to Mark and Christoph's comments for v3, except optimizing
xfs_seek_data() with unwritten extents
probing, the xfs_seek_hole() is also refined to that in this version.
Just some feedback.
Test program fragment:
ret = do_fallocate(fd, 512*1024, 256*1024, 0);
if (ret < 0)
goto out;
pwrite(fd, buf, 4096, 1024*516);
lseek(fd, 800*1024, SEEK_SET);
ret = write(fd, buf, bufsz);
if (ret < 0)
goto out;
Output:
HOLE/DATA at 512K 786432 / 528384 <- undiscovered hole here
HOLE/DATA at 516K 786432 / 528384 <- okay, data but we should
return next page as hole.
HOLE/DATA at 520K 532480 / 819200 <- hole is discovered because
there is no trailing data
Oops! for xfs_seek_hole(), I should use min_t() to pre-claculate offset
before searching page cache.
Thanks for your prompt feedback. I'll do some extra tests and post the
revised soon.
Thanks,
-Jeff
--Mark.
_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs