summaryrefslogtreecommitdiffstats
path: root/fs/fat/fat.h
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2013-04-29 19:21:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 21:28:41 -0400
commitf1e6fb0ab451dae8523fbb8c119a653b2730e938 (patch)
treebf966c2863b2523081fb69f619b7910efd28dc6f /fs/fat/fat.h
parent8fceb4e0171f6bf64db756c65b2ce5f15aed8b4d (diff)
fat (exportfs): rebuild directory-inode if fat_dget()
This patch enables rebuilding of directory inodes which are not present in the cache.This is done by traversing the disk clusters to find the directory entry of the parent directory and using its i_pos to build the inode. The traversal is done by fat_scan_logstart() which is similar to fat_scan() but matches i_pos values instead of names.fat_scan_logstart() needs an inode parameter to work, for which a dummy inode is created by it's caller fat_rebuild_parent(). This dummy inode is destroyed after the traversal completes. All this is done only if the nostale_ro nfs mount option is specified. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Ravishankar N <ravi.n1@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com> Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fat/fat.h')
-rw-r--r--fs/fat/fat.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/fat/fat.h b/fs/fat/fat.h
index 413eaaf30ed5..21664fcf3616 100644
--- a/fs/fat/fat.h
+++ b/fs/fat/fat.h
@@ -296,6 +296,8 @@ extern int fat_dir_empty(struct inode *dir);
296extern int fat_subdirs(struct inode *dir); 296extern int fat_subdirs(struct inode *dir);
297extern int fat_scan(struct inode *dir, const unsigned char *name, 297extern int fat_scan(struct inode *dir, const unsigned char *name,
298 struct fat_slot_info *sinfo); 298 struct fat_slot_info *sinfo);
299extern int fat_scan_logstart(struct inode *dir, int i_logstart,
300 struct fat_slot_info *sinfo);
299extern int fat_get_dotdot_entry(struct inode *dir, struct buffer_head **bh, 301extern int fat_get_dotdot_entry(struct inode *dir, struct buffer_head **bh,
300 struct msdos_dir_entry **de); 302 struct msdos_dir_entry **de);
301extern int fat_alloc_new_dir(struct inode *dir, struct timespec *ts); 303extern int fat_alloc_new_dir(struct inode *dir, struct timespec *ts);
@@ -373,6 +375,7 @@ extern struct inode *fat_build_inode(struct super_block *sb,
373extern int fat_sync_inode(struct inode *inode); 375extern int fat_sync_inode(struct inode *inode);
374extern int fat_fill_super(struct super_block *sb, void *data, int silent, 376extern int fat_fill_super(struct super_block *sb, void *data, int silent,
375 int isvfat, void (*setup)(struct super_block *)); 377 int isvfat, void (*setup)(struct super_block *));
378extern int fat_fill_inode(struct inode *inode, struct msdos_dir_entry *de);
376 379
377extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, 380extern int fat_flush_inodes(struct super_block *sb, struct inode *i1,
378 struct inode *i2); 381 struct inode *i2);