Btrfs: implement our own ->llseek
authorJosef Bacik <josef@redhat.com>
Mon, 18 Jul 2011 17:21:36 +0000 (13:21 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 21 Jul 2011 00:47:56 +0000 (20:47 -0400)
commitb26751575a9aa55fd6dbf3febde3ff06dfadc44f
tree78fc36a92757eafb90bbeae36495adb369fbf6d7
parent982d816581eeeacfe5b2b7c6d47d13a157616eff
Btrfs: implement our own ->llseek

In order to handle SEEK_HOLE/SEEK_DATA we need to implement our own llseek.
Basically for the normal SEEK_*'s we will just defer to the generic helper, and
for SEEK_HOLE/SEEK_DATA we will use our fiemap helper to figure out the nearest
hole or data.  Currently this helper doesn't check for delalloc bytes for
prealloc space, so for now treat prealloc as data until that is fixed.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/btrfs/ctree.h
fs/btrfs/file.c