client/src/unifycr.c
int unifycr_fid_shrink(int fid, off_t length)
{
    int rc;

    /* get meta data for this file */
    unifycr_filemeta_t* meta = unifycr_get_meta_from_fid(fid);

    /* determine file storage type */
    if (meta->storage == FILE_STORAGE_FIXED_CHUNK) {
        /* file stored in fixed-size chunks */
        rc = unifycr_fid_store_fixed_shrink(fid, meta, length);
    } else {
        /* unknown storage type */
        rc = UNIFYCR_ERR_IO;
    }

    return rc;
}
/* if length is less than reserved space, give back space down to length */
if length is less than reserved space, give back space down to length
if length is less than reserved space give back space down to length
int unifycr_fid_shrink(int fid, off_t length)
{
    int rc;
    unifycr_filemeta_t* meta = unifycr_get_meta_from_fid(fid);
    if (meta->storage == FILE_STORAGE_FIXED_CHUNK) {
        rc = unifycr_fid_store_fixed_shrink(fid, meta, length);
    } else {
        rc = UNIFYCR_ERR_IO;
    }
    return rc;
}
int unifycr_fid_shrink ( int fid , off_t length ) { int rc ; unifycr_filemeta_t * meta = unifycr_get_meta_from_fid ( fid ) ; if ( meta -> storage == FILE_STORAGE_FIXED_CHUNK ) { rc = unifycr_fid_store_fixed_shrink ( fid , meta , length ) ; } else { rc = UNIFYCR_ERR_IO ; } return rc ; }
if length is less than reserved space, give back space down to length
if length is less than reserved space give back space down to length
/* get meta data for this file */ /* determine file storage type */ /* file stored in fixed-size chunks */ /* unknown storage type */