@@ -941,6 +941,7 @@ int unifyfs_invoke_get_extents_rpc(int gfid,
941941 clock_gettime (CLOCK_REALTIME , & timeout );
942942 timeout .tv_sec += 5 ;
943943 ABT_mutex_lock (preq -> pending_sync );
944+ LOGDBG ("waiting on pending get_extents condition for preq(%p)" , preq );
944945 rc = ABT_cond_timedwait (preq -> pending_cond , preq -> pending_sync ,
945946 & timeout );
946947 if (ABT_ERR_COND_TIMEDOUT == rc ) {
@@ -949,6 +950,9 @@ int unifyfs_invoke_get_extents_rpc(int gfid,
949950 } else if (rc ) {
950951 LOGERR ("failed to wait on condition (err=%d)" , rc );
951952 ret = UNIFYFS_ERROR_MARGO ;
953+ } else {
954+ LOGDBG ("pending get_extents condition for preq(%p) was signaled" ,
955+ preq );
952956 }
953957 ABT_mutex_unlock (preq -> pending_sync );
954958 return ret ;
@@ -981,7 +985,7 @@ int unifyfs_invoke_get_extents_rpc(int gfid,
981985 if (ret == UNIFYFS_SUCCESS ) {
982986 /* get number of extents */
983987 unsigned int n_ext = (unsigned int ) out -> num_extents ;
984- if (n_ext > 0 ) {
988+ if (( n_ext > 0 ) && ( out -> extents != HG_BULK_NULL ) ) {
985989 /* get bulk buffer with extent locations */
986990 size_t buf_sz = (size_t )n_ext * sizeof (extent_metadata );
987991 void * buf = pull_margo_bulk (preq -> req_state -> handle ,
0 commit comments