Skip to content

Instantly share code, notes, and snippets.

@cinek810
Created November 13, 2020 12:46
Show Gist options
  • Save cinek810/8491aad8d83ff7c96708dfd1d3527d6e to your computer and use it in GitHub Desktop.
Save cinek810/8491aad8d83ff7c96708dfd1d3527d6e to your computer and use it in GitHub Desktop.
[funinit.wordpress.com] setStripe.c library for core.py use
#include <lustre/lustreapi.h>
#include &ltstdio.h>
//To build: gcc -llustreapi /path/to/setStripe.c -fPIC -shared -o /etc/irods/setStripe.so
int setStripe(char *path, int offset)
{
int rc;
char pool[100];
sprintf(pool, "pool%02d", offset);
rc = llapi_file_open_pool(path, O_DIRECTORY, 0, 0, -1, -1, LOV_PATTERN_RAID0, pool);
if (rc < 0)
return rc;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment