Created
November 13, 2020 12:46
-
-
Save cinek810/8491aad8d83ff7c96708dfd1d3527d6e to your computer and use it in GitHub Desktop.
[funinit.wordpress.com] setStripe.c library for core.py use
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <lustre/lustreapi.h> | |
#include <stdio.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