]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fat: modify nfs mount option
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)
commit04d2b44f0a7fa09346db7e751b8fb93a60f1340d
tree7e77fccf2aa2eb3920afcaeda49d900127233576
parentcd23902857676198598c2e578d674de8c7f26b8a
fat: modify nfs mount option

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>
fs/fat/fat.h
fs/fat/inode.c