LU-1337 llite: support SEEK_HOLE and SEEK_DATA
kernel 3.1 introduced SEEK_HOLE and SEEK_DATA. llite should
handle them as required by vfs. For now, we can just consider
whole file is data.
Also fix race between concurrent SEEK_CURs by taking f_lock
in SEEK_CUR, as implemented since kernel commit
ef3d0fd27.
Before that, kernel handled the race by taking i_mutex.
Kernel introduced f_lock to protect f_flags when dropping BKL
in kernel commit
db1dd4d3. Later, f_lock is extended to protect
Protects f_ep_links, f_flags, and f_pos vs i_size in lseek
SEEK_CUR.
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: yang sheng <ys@whamcloud.com>
Change-Id: I944102f20ab1ca1083a16d41e95802d6b8bda15d
Reviewed-on: http://review.whamcloud.com/4579
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Lai Siyao <laisiyao@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>