]> Git Repo - linux.git/commit
tmpfs: support SEEK_DATA and SEEK_HOLE
authorHugh Dickins <[email protected]>
Tue, 29 May 2012 22:06:43 +0000 (15:06 -0700)
committerLinus Torvalds <[email protected]>
Tue, 29 May 2012 23:22:23 +0000 (16:22 -0700)
commit4fb5ef089b288942c6fc3f85c4ecb4016c1aa4c3
treeaff66acd4b8a0e8cc060f5bf20ad3d6d75bdb7ab
parent1aac1400319d30786f32b9290e9cc923937b3d57
tmpfs: support SEEK_DATA and SEEK_HOLE

It's quite easy for tmpfs to scan the radix_tree to support llseek's new
SEEK_DATA and SEEK_HOLE options: so add them while the minutiae are still
on my mind (in particular, the !PageUptodate-ness of pages fallocated but
still unwritten).

But I don't know who actually uses SEEK_DATA or SEEK_HOLE, and whether it
would be of any use to them on tmpfs.  This code adds 92 lines and 752
bytes on x86_64 - is that bloat or worthwhile?

[[email protected]: fix warning with CONFIG_TMPFS=n]
Signed-off-by: Hugh Dickins <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Josef Bacik <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Andreas Dilger <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: Marco Stornelli <[email protected]>
Cc: Jeff liu <[email protected]>
Cc: Chris Mason <[email protected]>
Cc: Sunil Mushran <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/shmem.c
This page took 0.040682 seconds and 4 git commands to generate.