]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitfa227aeba6be6480e36aff1cc3900d4aeacfb05e
tree78fc36a92757eafb90bbeae36495adb369fbf6d7
parent5d0f625e169948d5549136e46f67ba9b6d4ac57c
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