]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fat (exportfs): rebuild inode if ilookup() fails
authorNamjae Jeon <namjae.jeon@samsung.com>
Tue, 23 Oct 2012 02:50:38 +0000 (13:50 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 24 Oct 2012 03:20:26 +0000 (14:20 +1100)
commitf1e9fdd7691a1528ae1c154983af517c1d0566ea
treefc9a67db9ea5ee28d8b4752f5e7ae3a89298f197
parent859d4b67357a3b0006828c9c97970d4cc52b05b0
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