Changeset 9127

Show
Ignore:
Timestamp:
11/08/11 14:50:22 (19 months ago)
Author:
jdenton
Message:

Corrected the return val that wasn't being defined when ucache was disabled.

Should now return the correct amount of data written regardless of ucache
enabled/disabled.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/Orange-Branch/src/client/usrint/iocommon.c

    r9126 r9127  
    978978    void *user_mem = 0; /* Where to read/write */ 
    979979    uint64_t user_mem_size = 0; /* How much to read/write */ 
     980    uint32_t written = 0; 
    980981 
    981982    /* Continue read/writing strips of data until the whole block completed */ 
     
    10291030 
    10301031        left -= user_mem_size; 
    1031     } 
    1032     return 1; 
     1032        written += user_mem_size; 
     1033    } 
     1034    return written; 
    10331035} 
    10341036#endif /* PVFS_UCACHE_ENABLE */ 
     
    10701072    int req_size = 0; /* how many bytes request spans */ 
    10711073    uint32_t blk_size = CACHE_BLOCK_SIZE_K * 1024; 
     1074    int written = 0; 
    10721075 
    10731076    /* How many bytes does request span? */ 
     
    11651168                                &scratch_ptr,  
    11661169                                &scratch_left); 
     1170                written += rc; 
    11671171        } 
    11681172        else /* Miss */ 
     
    11771181                                           1,  
    11781182                                           &vector); 
     1183                written += rc; 
    11791184            } 
    11801185            if(which == 2) /* Write */ 
     
    12171222                                &scratch_ptr,  
    12181223                                &scratch_left); 
     1224                written += rc; 
    12191225            } 
    12201226        } 
     
    12221228        lock_unlock(get_lock(ureq[i].ublk_index)); 
    12231229    } 
     1230    rc = written; 
    12241231#endif /* PVFS_UCACHE_ENABLE */ 
    1225     return req_size; 
     1232    return rc; 
    12261233} 
    12271234