]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fat (exportfs): rebuild inode if ilookup() fails
authorNamjae Jeon <namjae.jeon@samsung.com>
Sat, 3 Nov 2012 00:42:58 +0000 (11:42 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 8 Nov 2012 04:08:55 +0000 (15:08 +1100)
commitc1d7e4de7e077a01a39c4c5df9103ad11b7b3fb1
tree2e81bebd7cf82c22f312b7a6bc68e11c0740b1a9
parentfed545168715812bfc7431fd86c0a0a7bd50b04a
fat (exportfs): rebuild inode if ilookup() fails

Assign i_pos to kstat->ino and re-introduce fat_encode_fh() and include
i_pos value in the file handle.Use the i_pos value to find the directory
entry of the inode and subsequently rebuild the inode if the cache lookups
fail.

Since this involves accessing the FAT media, it is better to do this only
if the 'nfs' mount option is enabled with nostale_ro.  Also introduce a
helper fat_get_blknr_offset() for use in __fat_write_inode() and
fat_nfs_get_inode()

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>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/fat/fat.h
fs/fat/file.c
fs/fat/inode.c
fs/fat/nfs.c