]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fat (exportfs): rebuild inode if ilookup() fails
authorNamjae Jeon <namjae.jeon@samsung.com>
Fri, 12 Oct 2012 04:23:02 +0000 (15:23 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 16 Oct 2012 02:53:17 +0000 (13:53 +1100)
commit82a1a978a886ea11ba827187339d34b72fb817c2
tree2b0167b828507c381ebd7d66364c582b29551553
parent04d2b44f0a7fa09346db7e751b8fb93a60f1340d
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