staging/lustre/llite: glimpse the inode before doing fiemap
authorLi Dongyang <dongyang.li@anu.edu.au>
Thu, 26 Mar 2015 01:53:24 +0000 (21:53 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 10:11:44 +0000 (11:11 +0100)
commita915ffda199013a8ee2dd6a8a23b89ea45879ed3
treea2a2a221a7f94010ce0b5f025428e3de971afb44
parent502cb58e2138dea3cef0da29021528172ff9fe58
staging/lustre/llite: glimpse the inode before doing fiemap

For a new inode, the i_size is 0 until a stat, which will yield
an empty fiemap result.
Fix the issue by glimpsing the size before doing fiemap.

Signed-off-by: Li Dongyang <dongyang.li@anu.edu.au>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/13439
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6091
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/file.c