From 16fab2015099a937e1a771f2785c5dd3445fe483 Mon Sep 17 00:00:00 2001 From: Namjae Jeon Date: Wed, 20 Jan 2016 14:59:46 -0800 Subject: fat: permit to return phy block number by fibmap in fallocated region Make the fibmap call return the proper physical block number for any offset request in the fallocated range. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat Cc: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/fat/fat.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'fs/fat/fat.h') diff --git a/fs/fat/fat.h b/fs/fat/fat.h index eed04c0efb11..4307cd4f8da0 100644 --- a/fs/fat/fat.h +++ b/fs/fat/fat.h @@ -285,8 +285,11 @@ static inline void fatwchar_to16(__u8 *dst, const wchar_t *src, size_t len) extern void fat_cache_inval_inode(struct inode *inode); extern int fat_get_cluster(struct inode *inode, int cluster, int *fclus, int *dclus); +extern int fat_get_mapped_cluster(struct inode *inode, sector_t sector, + sector_t last_block, + unsigned long *mapped_blocks, sector_t *bmap); extern int fat_bmap(struct inode *inode, sector_t sector, sector_t *phys, - unsigned long *mapped_blocks, int create); + unsigned long *mapped_blocks, int create, bool from_bmap); /* fat/dir.c */ extern const struct file_operations fat_dir_operations; -- cgit v1.2.3