Index: trunk/kernel/fs/vfs.h
===================================================================
--- trunk/kernel/fs/vfs.h	(revision 610)
+++ trunk/kernel/fs/vfs.h	(revision 611)
@@ -45,16 +45,7 @@
 
 struct vfs_inode_s;
-struct vfs_dentry_t;
-struct vfs_ctx_t;
-struct vfs_file_ref_s;
+struct vfs_dentry_s;
+struct vfs_ctx_s;
 struct vfs_file_s;
-
-struct vfs_inode_op_s;
-struct vfs_dentry_op_s;
-struct vfs_file_op_s;
-struct vfs_ctx_op_s;
-
-struct vfs_lookup_cmd_s;
-struct vfs_lookup_rsp_s;
 
 struct mapper_s;
@@ -63,5 +54,4 @@
 struct vseg_s;
 struct page_s;
-
 
 /******************************************************************************************
@@ -133,6 +123,7 @@
  *****************************************************************************************/
 
-/* this enum define the VFS inode types values */
-/* WARNING : this enum must be kept consistent with macros in <shared_stat.h> file */
+/* this enum define the VFS inode types values                                           */
+/* WARNING : this enum must be kept consistent with macros in <shared_stat.h> file       */
+/*           and with types in <shared_dirent.h> file.                                   */
 
 typedef enum   
@@ -144,5 +135,6 @@
     INODE_TYPE_SOCK  =     4,           /*! POSIX socket                                 */
     INODE_TYPE_DEV   =     5,           /*! character device                             */
-    INODE_TYPE_SYML  =     6,           /*! symbolic link                                */
+    INODE_TYPE_BLK   =     6,           /*! block device                                 */
+    INODE_TYPE_SYML  =     7,           /*! symbolic link                                */
 }
 vfs_inode_type_t;
@@ -184,5 +176,5 @@
 #define VFS_ISUID	   0x0004000
 #define VFS_ISGID	   0x0002000
-define VFS_ISVTX	   0x0001000
+#define VFS_ISVTX	   0x0001000
 
 #define VFS_IRWXU      0x0000700
@@ -316,6 +308,5 @@
  * This function allocates memory from local cluster for an inode descriptor and the 
  * associated mapper. It initialise these descriptors from arguments values. 
- * If the client thread is not running in the cluster containing this inode,
- * it must use the rpc_vfs_inode_create_client() function.
+ * It must called by a local thread. Use the RPC_INODE_CREATE if client thread is remote.
  ******************************************************************************************
  * @ fs_type    : file system type.
@@ -407,4 +398,5 @@
 
 
+
 /******************************************************************************************
  *        These low-level functions access / modify a VFS dentry descriptor
@@ -414,6 +406,5 @@
  * This function allocates memory from local cluster for a dentry descriptor, 
  * initialises it from  arguments values, and returns the extended pointer on dentry.
- * If the client thread is not running in the target cluster for this inode,
- * it must use the rpc_dentry_create_client() function.
+ * It must called by a local thread. Use the RPC_DENTRY_CREATE if client thread is remote.
  ******************************************************************************************
  * @ fs_type    : file system type.
@@ -548,12 +539,13 @@
  * 
  * [Implementation]
- * As there are cross-references between the inode and the associated dentry, this
- * function implement a three steps scenario :
+ * As there are cross-references between inode and dentry, this function implements
+ * a three steps scenario :
  * 1) The dentry descriptor is created in the cluster containing the existing <parent_xp>
- *    inode, and is only partially initialized : "fs_type", "name", "parent_xp" fields.
+ *    inode, and partially initialized, using the RPC_VFS_CREATE DENTRY if required.
  * 2) The inode and its associated mapper are created in cluster identified by <child_cxy>,
- *    and initialised. The new inode and the parent inode can have different FS types.
- * 3) The "child_xp" field in dentry (pointing on the created inode) is updated,
- *    and the refcount is incremented for both the inode and the dentry.
+ *    and partially initialised, using the RPC_VFS_CREATE_INODE if required.
+ *    The new inode and the parent inode can have different FS types.
+ * 3) The pointers between the parent inode, the new dentry, and the child inode 
+ *    are updated, using remote accesses.
  ******************************************************************************************
  * @ child_inode_cxy  : [in]  target cluster for child inode.
@@ -612,7 +604,21 @@
 
 /******************************************************************************************
+ * This function is called by the vfs_mkdir() function to create the two special dentries
+ * <.> and <..> in a new directory identified by the <child_xp> argument. The parent
+ * directory inode is defined by the <parent_xp> argument.
+ * The two dentries are introduced in the Inode Tree. They are also introduced in the
+ * in the child directory mapper, and the IOC device is updated.
+ ******************************************************************************************
+ * @ child_xp    : extended pointer on new directory inode.
+ * @ parent_xp   : extended pointer on parent directory inode.
+ * @ return 0 if success / -1 if failure.
+ *****************************************************************************************/
+error_t vfs_add_special_dentries( xptr_t  child_xp,
+                                  xptr_t  parent_xp );
+
+/******************************************************************************************
  * This recursive function diplays a complete inode/dentry sub-tree.
  * Any inode can be selected as the sub-tree root.
- * TODO this function is not protected against a concurrent inode/dentry removal...
+ * WARNING : this function is not protected against a concurrent inode/dentry removal...
  ******************************************************************************************
  * @ inode_xp   : extended pointer on sub-tree root inode.
@@ -809,16 +815,4 @@
 
 /****************************************************************************************** 
- * This function returns, in the structure pointed by the <k_dirent> kernel pointer, 
- * various infos on the directory entry currently pointed by the <file_xp> file descriptor.
- * TODO not implemented yet...
- ******************************************************************************************
- * @ file_xp    : extended pointer on the file descriptor of the searched directory .
- * @ k_dirent   : local pointer on the dirent structure in kernel space.
- * @ returns 0 if success / -1 if error.
- *****************************************************************************************/
-error_t vfs_readdir( xptr_t          file_xp,
-                     struct dirent * k_dirent );
-
-/****************************************************************************************** 
  * This function  creates a new directory as defined by the <root_xp> & <path> arguments.
  * TODO not implemented yet...
@@ -880,10 +874,10 @@
  * The directory inode descriptor and the dentry descriptor are in the same cluster.
  * Depending on the file system type, it calls the proper, FS specific function.
- * It ulso pdates the dentry descriptor and/or the inode descriptor extensions
+ * It also updates the dentry descriptor and/or the inode descriptor extensions
  * as required by the specific file system type.
  * Finally, it synchronously updates the parent directory on IOC device.
  *
  * It must be executed by a thread running in the cluster containing the parent directory.
- * It can be the RPC_VFS_VS_ADD_DENTRY. This function does NOT take any lock.
+ * It can be the RPC_VFS_FS_ADD_DENTRY. This function does NOT take any lock.
  ******************************************************************************************
  * @ parent  : local pointer on parent (directory) inode.
