Index: trunk/kernel/fs/vfs.h
===================================================================
--- trunk/kernel/fs/vfs.h	(revision 457)
+++ trunk/kernel/fs/vfs.h	(revision 459)
@@ -227,5 +227,5 @@
  * It is not replicated, and is dynamically allocated in the cluster that contains
  * the inode, when a thread makes an open() or opendir() system call.
- * It cannot exist a file structure without an inode structure.
+ * It cannot exist a file structure without an inode structure in same cluster.
  * As the fd_array (containing extended pointers on the open file descriptors)
  * is replicated in all process descriptors, we need a references counter.
@@ -338,5 +338,5 @@
  * @ gid        : group owner ID.
  * @ inode_xp   : [out] buffer for extended pointer on created inode.
- * # return 0 if success / return ENOMEM or EINVAL if error.
+ * @ return 0 if success / return ENOMEM or EINVAL if error.
  *****************************************************************************************/
 error_t vfs_inode_create( xptr_t            dentry_xp,
@@ -353,11 +353,11 @@
  * This function releases memory allocated to an inode descriptor.
  * It must be executed by a thread running in the cluster containing the inode,
- * and the inode refcount must be zero.
- * If the client thread is not running in the owner cluster, it must use the
- * rpc_vfs_inode_destroy_client() function.
+ * and the inode refcount must be zero. If the client thread is not running in the owner 
+ * cluster, you must use the rpc_vfs_inode_destroy_client() function.
  ****************************************************************************************** 
  * @ inode  : local pointer on inode descriptor.
- *****************************************************************************************/
-void vfs_inode_destroy( vfs_inode_t *  inode );  
+ * @ return 0 if success / return EINVAL if error.
+ *****************************************************************************************/
+error_t vfs_inode_destroy( vfs_inode_t *  inode );  
 
 /******************************************************************************************
@@ -432,25 +432,4 @@
 
 
-
-
-
-
-/****************************************************************************************** 
- * This function TODO                                                          
- *****************************************************************************************/
-error_t vfs_inode_trunc( vfs_inode_t * inode );
-
-/****************************************************************************************** 
- * This function TODO                                                          
- *****************************************************************************************/
-error_t vfs_inode_link( vfs_inode_t * inode,
-                        uint32_t      igc );
-
-/****************************************************************************************** 
- * This function TODO                                                          
- *****************************************************************************************/
-error_t vfs_inode_unlink( vfs_inode_t * inode );
-
-
 /*****************************************************************************************/
 /***************** Dentry related functions **********************************************/
@@ -478,11 +457,11 @@
  * This function releases memory allocated to a dentry descriptor.
  * It must be executed by a thread running in the cluster containing the dentry,
- * and the dentry refcount must be zero.
- * If the client thread is not running in the owner cluster, it must use the
- * rpc_dentry_destroy_client() function.
+ * and the dentry refcount must be zero. If the client thread is not running in the owner
+ * cluster, you must use the rpc_dentry_destroy_client() function.
  ****************************************************************************************** 
  * @ dentry  : local pointer on dentry descriptor.
- *****************************************************************************************/
-void vfs_dentry_destroy( vfs_dentry_t *  dentry );  
+ * @ return 0 if success / return EINVAL if error.
+ *****************************************************************************************/
+error_t vfs_dentry_destroy( vfs_dentry_t *  dentry );  
 
 /****************************************************************************************** 
@@ -562,6 +541,6 @@
  * This function takes a pathname (absolute or relative to cwd) and returns an extended 
  * pointer on the associated inode.
- * - If a given name in the path is not found in the inode tree, it try to load the missing
- *   dentry/inode couple, from informations found in the parent directory.
+ * - If a given directory name in the path is not found in the inode tree, it try to load
+ *   the missing dentry/inode couple, from informations found in the parent directory.
  * - If this directory entry does not exist on device, it returns an error.
  * - If the the file identified by the pathname does not exist on device but the
@@ -613,9 +592,8 @@
  * This function removes a couple dentry/inode from the Inode-Tree, and remove it from
  * the external device.
- * TODO                   
  ******************************************************************************************
  * @ child_xp   : extended pointer on removed inode.
  *****************************************************************************************/
-error_t vfs_remove_child_from_parent( xptr_t child_xp );
+error_t vfs_remove_child_from_parent( xptr_t inode_xp );
 
 /******************************************************************************************
@@ -716,11 +694,12 @@
 
 /****************************************************************************************** 
- * This function close an open file descriptor: 
- * 1) All entries in fd_array copies are directly cancelled by the calling thread,
+ * This function close the -non-replicated- file descriptor identified by the <file_xp>
+ * and <file_id> arguments.
+ * 1) All entries in the fd_array copies are directly reset by the calling thread,
  *    using remote accesses. 
  * 2) The memory allocated to file descriptor in cluster containing the inode is released.
  *    It requires a RPC if cluster containing the file descriptor is remote.
  ******************************************************************************************
- * @ file_xp     : extended pointer on the file descriptor.
+ * @ file_xp     : extended pointer on the file descriptor in owner cluster.
  * @ file_id     : file descriptor index in fd_array.
  * @ returns 0 if success / -1 if error.
@@ -848,7 +827,8 @@
 
 /******************************************************************************************
- * This function makes I/O operations to move, from device to mapper, all pages covering
- * a given inode, identified by the <inode> argument. Inode be a directory or a file,
- * but this function is mainly used to load (prefetch) a complete directory to the mapper.
+ * This function makes the I/O operations required to move, from device to mapper,
+ * all pages covering a given inode, identified by the <inode> argument. The target
+ * inode can be a directory or a file, but this function is mainly used to load (prefetch) 
+ * a complete directory to the mapper.
  * Depending on the file system type, it calls the proper, FS specific function.
  * It must be executed by a thread running in the cluster containing the mapper.
@@ -862,101 +842,3 @@
 
 
-
-/* deprecated [AG]
-
-typedef error_t (lookup_inode_t)  ( vfs_inode_t  * parent , 
-                                    vfs_dentry_t * dentry );
-
-typedef error_t (write_inode_t)   ( vfs_inode_t  * inode );
-
-typedef error_t (release_inode_t) ( vfs_inode_t  * inode );
-
-typedef error_t (unlink_inode_t)  ( vfs_inode_t  * parent,
-                                    vfs_dentry_t * dentry,
-                                    uint32_t       flags );
-
-typedef error_t (stat_inode_t)    ( vfs_inode_t  * inode );
-
-typedef error_t (trunc_inode_t)   ( vfs_inode_t  * inode );
-
-typedef error_t (delete_inode_t)  ( vfs_inode_t  * inode );
-
-typedef struct vfs_inode_op_s
-{
-	init_inode_t    * init;   
-	create_inode_t  * create;  
-	lookup_inode_t  * lookup;  
-	write_inode_t   * write; 
-	release_inode_t * release;
-	unlink_inode_t  * unlink; 
-	delete_inode_t  * delete; 
-	stat_inode_t    * stat;
-	trunc_inode_t   * trunc;    // change the size of a file 
-}
-vfs_inode_op_t;
-
- ****************************************************************************************** 
- * These typedef define the set of FS specific operations on a VFS DENTRY descriptor.
- * They must be implemented by any specific file system to be supported by ALMOS_MKH.
- * This code is not actually used, and is only defined for documentation
- ******************************************************************************************
-
-
-typedef error_t (vfs_compare_dentry_t) ( char * first , char * second );
-
-typedef struct vfs_dentry_op_s
-{
-	vfs_compare_dentry_t * compare;
-}
-vfs_dentry_op_t;
-
-
- ****************************************************************************************** 
- * These typedef define the set of FS specific operations on FILE descriptors
- * They must be implemented by any specific file system to be supported by ALMOS_MKH.
- * This code is not actually used, and is only defined for documentation
- ******************************************************************************************
-
-
-typedef error_t (open_file_t   ) ( vfs_file_t * file,
-                                   void       * extend );
-
-typedef error_t (read_file_t   ) ( vfs_file_t * file,
-                                   char       * buffer,
-                                   uint32_t     count );
-
-typedef error_t (write_file_t  ) ( vfs_file_t * file,
-                                   char       * buffer,
-                                   uint32_t     count );
-
-typedef error_t (lseek_file_t  ) ( vfs_file_t * file );
-
-typedef error_t (close_file_t  ) ( vfs_file_t * file );
-
-typedef error_t (release_file_t) ( vfs_file_t * file );
-
-typedef error_t (read_dir_t    ) ( vfs_file_t * file );
-
-typedef error_t (mmap_file_t   ) ( vfs_file_t    * file ,
-                                   struct vseg_s * vseg );
-
-typedef error_t (munmap_file_t ) ( vfs_file_t    * file,
-                                   struct vseg_s * vseg );
-
-typedef struct vfs_file_op_s
-{
-	open_file_t    * open;
-	read_file_t    * read;
-	write_file_t   * write;
-	lseek_file_t   * lseek;
-	read_dir_t     * readdir;
-	close_file_t   * close;
-	release_file_t * release;
-	mmap_file_t    * mmap;
-	munmap_file_t  * munmap;
-}
-vfs_file_op_t;
-
-*/
-
 #endif	/* _VFS_H_ */
