This patchset eliminates the client side ESTALE errors when a FAT
partition exported over NFS has its dentries evicted from the cache.
One of the reasons for this error is lack of permanent inode numbers on
FAT which makes it difficult to construct persistent file handles. This
can be overcome by using fat_encode_fh() that include i_pos in file
handle.
Once the i_pos is available, it is only a matter of reading the directory
entries from the disk clusters to locate the matching entry and rebuild
the corresponding inode.
We reached the conclusion support stable inode's read-only export first
after discussing with OGAWA and Bruce. And will make it writable with
some operation(unlink and rename) limitation next time.
This patch:
Provide two possible values 'stale_rw' and 'nostale_ro' for the -o nfs
mount option. The first one allows all file operations but does not
reduce ESTALE errors on memory constrained systems. The second one
eliminates ESTALE errors but mounts the filesystem as read-only. Not
specifying a value defaults to 'stale_rw'.
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>