[PATCH] [RFC]UBIFS: NFS exportfs support

From: deng . chao1
Date: Tue May 28 2013 - 04:47:24 EST


UBIfs hasn't supported exporting via NFS yet. The main reason, i think, is
that UBIfs does not store parent inode number information for each inode
in flash media directly.The information is a must for the callback
"get_parent" which is one of the exportfs mandatory callbacks.
To solve this, i plan to use the member "padding1" of "struct
ubifs_ino_node" to store the information in flash media.(you can see
struct ubifs_ino_node's statement in "ubifs-media.h".)
The change of the format in flash media obviously will bring compatibilty
problem. But it is lucky that the "padding1" was reserved for future in
the first place on purpose.
The compatibilty problem only takes place under this circumstance: to use
this patch to export the UBIfs via NFS when the UBIfs has already run in
the flash media, the flash image the UBIfs has already made in the media
must be discarded.
We may need such a user space tool to transform the old flash image: read
all files out and re-write them back to flash, so that the UBIfs can
replace the zeos in "padding1" with parent inode number.
Also, mkfs.ubifs in mtd-utils needs some changes to company this patch.
If this patch is ok, i will post the patch for mkfs.ubifs later.

Signed-off-by: deng chao<deng.chao1 at zte.com.cn>
---