Index: trunk/kernel/vfs/vfs.c
===================================================================
--- trunk/kernel/vfs/vfs.c	(revision 395)
+++ trunk/kernel/vfs/vfs.c	(revision 401)
@@ -156,6 +156,6 @@
     error_t            error;
 
-    vfs_dmsg("\n[INFO] %s : enter / local_cxy = %x / parent_xp = %l\n",
-    __FUNCTION__ , local_cxy , dentry_xp );
+    vfs_dmsg("\n[INFO] %s : core[%x,%d] enter / dentry_xp = %l\n",
+    __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , dentry_xp );
  
     // check fs type and get pointer on context
@@ -229,7 +229,7 @@
     remote_spinlock_init( XPTR( local_cxy , &inode->main_lock ) );
 
-    vfs_dmsg("\n[INFO] %s : exit / child_xp = %l / parent_xp = %l\n",
-    __FUNCTION__ , XPTR( local_cxy , inode ) , dentry_xp );
-
+    vfs_dmsg("\n[INFO] %s : core[%x,%d] exit / inode_xp = %l / dentry_xp = %l\n",
+    __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, XPTR(local_cxy,inode), dentry_xp );
+ 
     // return extended pointer on inode
     *inode_xp = XPTR( local_cxy , inode );
@@ -262,6 +262,6 @@
                         xptr_t        child_xp )
 {
-    vfs_dmsg("\n[INFO] %s : enter for child <%s>\n",
-             __FUNCTION__ , name );
+    vfs_dmsg("\n[INFO] %s : core[%x,%d] enter for <%s> / cycle %d\n",
+    __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , name , hal_time_stamp() );
 
     error_t error = 0;
@@ -292,6 +292,6 @@
     }
 
-    vfs_dmsg("\n[INFO] %s : exit for child <%s>\n",
-             __FUNCTION__ , name );
+    vfs_dmsg("\n[INFO] %s : core[%x,%d] exit for <%s> / cycle %d\n",
+    __FUNCTION__ , local_cxy , CURRENT_THREAD->core->lid , name , hal_time_stamp() );
 
     return error;
@@ -435,6 +435,6 @@
 	kmem_req_t       req;        // request to kernel memory allocator
 
-    vfs_dmsg("\n[INFO] %s : enter for %s / parent inode = %x / cycle = %d\n",
-    __FUNCTION__ , name , parent , hal_time_stamp() );
+    vfs_dmsg("\n[INFO] %s : core[%x,%d] enter for <%s> / parent inode = %x / cycle %d\n",
+    __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, name, parent, hal_time_stamp() );
 
     // get pointer on context
@@ -484,6 +484,6 @@
     *dentry_xp = XPTR( local_cxy , dentry );
 
-    vfs_dmsg("\n[INFO] %s : exit for %s / cycle = %d\n",
-    __FUNCTION__ , name , hal_time_stamp() );
+    vfs_dmsg("\n[INFO] %s : core[%x,%d] exit for <%s> / dentry = %l / cycle %d\n",
+    __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, name, *dentry_xp, hal_time_stamp() );
 
     return 0;
@@ -603,6 +603,6 @@
     uint32_t      file_id;      // created file descriptor index in reference fd_array
 
-    vfs_dmsg("\n[INFO] %s : enters for <%s> at cycle %d\n",
-             __FUNCTION__ , path , (uint32_t)hal_time_stamp() );
+    vfs_dmsg("\n[INFO] %s : core[%x,%d] enter for <%s> / cycle %d\n",
+    __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, path, (uint32_t)hal_time_stamp() );
 
     // compute lookup working mode
@@ -623,7 +623,4 @@
     error = vfs_lookup( cwd_xp , path , lookup_mode , &inode_xp );
 
-    vfs_dmsg("\n[INFO] %s : get inode_xp = %l for <%s> at cycle %d\n",
-             __FUNCTION__ , inode_xp , path , hal_get_cycles() );
-
     if( error ) return error;
 
@@ -649,6 +646,6 @@
     if( error ) return error;
 
-    vfs_dmsg("\n[INFO] %s : exit for <%s> / file_id = %d / file_xp = %l / at cycle %d\n",
-             __FUNCTION__ , path , file_id , file_xp , hal_get_cycles() );
+    vfs_dmsg("\n[INFO] %s : core[%x,%d] exit for <%s> / file_xp = %l / cycle %d\n",
+    __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, path, file_xp, hal_time_stamp() );
 
     // success
@@ -1185,5 +1182,5 @@
 
     // print header
-    nolock_printk("\n***** file system state\n");
+    nolock_printk("\n***** file system state\n\n");
 
     // call recursive function
@@ -1341,6 +1338,6 @@
     process = this->process;
 
-    vfs_dmsg("\n[INFO] %s : enter for <%s> / core[%x,%d] / cycle %d\n",
-    __FUNCTION__ , pathname , local_cxy , this->core->lid , hal_time_stamp() );
+    vfs_dmsg("\n[INFO] %s : core[%x,%d] enter for <%s> / cycle %d\n",
+    __FUNCTION__ , local_cxy , this->core->lid , pathname , hal_time_stamp() );
 
     // get extended pointer on first inode to search
@@ -1357,13 +1354,14 @@
     vfs_inode_lock( parent_xp );
 
-    // load from device if one intermediate node not found
-    // exit while loop when last name found (i.e. last == true)
+    // sequencially loop on nodes in pathname
+    // load from device if one node not found in inode tree
+    // exit loop when last name found (i.e. last == true)
     do
     {
-        // get one name from path, and the "last" flag
+        // get one name from path, and "last" flag
         vfs_get_name_from_path( current , name , &next , &last );
 
-        vfs_dmsg("\n[INFO] %s : looking for <%s> / core[%x,%d] / last = %d\n",
-        __FUNCTION__ , name , local_cxy , this->core->lid , last );
+        vfs_dmsg("\n[INFO] %s : core[%x,%d] look for <%s> / last = %d\n",
+        __FUNCTION__ , local_cxy , this->core->lid , name , last );
 
         // search a child dentry matching name in parent inode
@@ -1382,6 +1380,6 @@
         if (found == false ) // child node not found in inode tree 
         {
-            vfs_dmsg("\n[INFO] %s : <%s> not found => load it / core[%x,%d]\n",
-            __FUNCTION__ , local_cxy , this->core->lid );
+            vfs_dmsg("\n[INFO] %s : core[%x,%d] miss <%s> => load it\n",
+            __FUNCTION__ , local_cxy , this->core->lid , name );
 
             // release lock on parent inode
@@ -1391,12 +1389,10 @@
             parent_cxy = GET_CXY( parent_xp );
             parent_ptr = (vfs_inode_t *)GET_PTR( parent_xp );
-
-            ctx_ptr    = (vfs_ctx_t *)hal_remote_lpt( XPTR( parent_cxy ,
-                                                            &parent_ptr->ctx ) );
+            ctx_ptr    = (vfs_ctx_t *)hal_remote_lpt( XPTR( parent_cxy , &parent_ptr->ctx ) );
             fs_type    = hal_remote_lw( XPTR( parent_cxy , &ctx_ptr->type ) );
 
             // select a cluster for missing inode
             child_cxy = vfs_cluster_random_select();
-                     
+ 
             // insert a new child dentry/inode in parent inode
             error = vfs_add_child_in_parent( child_cxy,
@@ -1467,8 +1463,11 @@
             // take lock on parent inode
             vfs_inode_lock( parent_xp );
+
+            vfs_dmsg("\n[INFO] %s : core[%x,%d] created node <%s>\n",
+            __FUNCTION__ , local_cxy , this->core->lid , name );
         }
 
-        vfs_dmsg("\n[INFO] %s : found <%s> / core[%x,%d] / parent = %l / child = %l\n",
-        __FUNCTION__ , name , local_cxy , this->core->lid , parent_xp , child_xp );
+        vfs_dmsg("\n[INFO] %s : core[%x,%d] found <%s> / parent = %l / child = %l\n",
+        __FUNCTION__ , local_cxy , this->core->lid , name , parent_xp , child_xp );
 
         // TODO check access rights here [AG]
@@ -1519,7 +1518,7 @@
     // implementation note:
     // we use two variables "index" and "count" because the buffer
-    // is actually written in decreasing index order (from leaf to root) 
-    // TODO : handle conflict with a concurrent rename 
-    // FIXME : handle synchro in the loop ... [AG]
+    // is written in decreasing index order (from leaf to root) 
+    // TODO : handle conflict with a concurrent rename [AG]
+    // TODO : handle synchro in the loop  [AG]
 
 	// set the NUL character in buffer / initialise buffer index and count
@@ -1606,5 +1605,5 @@
 
         vfs_dmsg("\n[INFO] %s : dentry <%s> created in local cluster %x\n",
-                 __FUNCTION__ , name , local_cxy );
+        __FUNCTION__ , name , local_cxy );
     }
     else                               // parent cluster is remote
@@ -1618,5 +1617,5 @@
 
         vfs_dmsg("\n[INFO] %s : dentry <%s> created in remote cluster %x\n",
-                 __FUNCTION__ , name , parent_cxy );
+        __FUNCTION__ , name , parent_cxy );
     }
                                       
@@ -1708,5 +1707,5 @@
     assert( (mapper != NULL) , __FUNCTION__ , "no mapper for page\n" );
 
-    vfs_dmsg("\n[INFO] %s : enters for page %d in mapper / inode %l\n",
+    vfs_dmsg("\n[INFO] %s : enters for page %d in mapper / inode_xp %l\n",
     __FUNCTION__ , page->index , XPTR( local_cxy , &mapper->inode ) );
 
@@ -1754,4 +1753,8 @@
     assert( (mapper != NULL) , __FUNCTION__ , "mapper pointer is NULL\n" );
 
+    vfs_dmsg("\n[INFO] %s : core[%x,%d] enter for inode %l / cycle %d\n",
+    __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, XPTR(local_cxy , inode) );
+
+    // compute number of pages
     uint32_t npages = size >> CONFIG_PPM_PAGE_SHIFT;
     if( (size & CONFIG_PPM_PAGE_MASK) || (size == 0) ) npages++;
@@ -1767,4 +1770,7 @@
     }
 
+    vfs_dmsg("\n[INFO] %s : core[%x,%d] exit for inode %l / cycle %d\n",
+    __FUNCTION__, local_cxy, CURRENT_THREAD->core->lid, XPTR(local_cxy , inode) );
+
     return 0;
 
