@@ -546,8 +546,11 @@ int unifyfs_inode_cache_extents(int gfid,
546546 ino -> extents_cache = extents ;
547547 ino -> extents_cache_count = num_extents ;
548548 ino -> cache_time = * cache_time ;
549- LOGINFO ("cached %d extents to inode (gfid=%d)" ,
550- num_extents , gfid );
549+ LOGINFO ("caching %d extents to inode (gfid=%d) "
550+ "using timestamp=%lu.%09lu" ,
551+ num_extents , gfid ,
552+ cache_time -> tv_sec ,
553+ cache_time -> tv_nsec );
551554 }
552555 } else {
553556 LOGDBG ("local cache time for gfid=%d already matches" , gfid );
@@ -783,6 +786,8 @@ int unifyfs_inode_get_extent_chunks(unifyfs_extent_t* extent,
783786 cache_expire .tv_sec += UNIFYFS_METADATA_CACHE_SECONDS ;
784787 clock_gettime (CLOCK_REALTIME , & now );
785788 if (compare_timespec (& now , & cache_expire ) <= 0 ) {
789+ LOGDBG ("using cached extent metadata - stamp=(%lu.%09lu)" ,
790+ ino -> cache_time .tv_sec , ino -> cache_time .tv_nsec );
786791 ret = get_extent_cache_chunks (extent ,
787792 ino -> extents_cache ,
788793 ino -> extents_cache_count ,
@@ -791,6 +796,9 @@ int unifyfs_inode_get_extent_chunks(unifyfs_extent_t* extent,
791796 if (UNIFYFS_SUCCESS == ret ) {
792797 done = 1 ;
793798 }
799+ } else {
800+ LOGDBG ("NOT using cached extent metadata - stamp=(%lu.%09lu)" ,
801+ ino -> cache_time .tv_sec , ino -> cache_time .tv_nsec );
794802 }
795803 }
796804
0 commit comments