1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=8:tabstop=8:
4 * ll_getstripe_info <file>:
5 * - get file's stripe info.
13 #include <liblustre.h>
17 #include <lustre/liblustreapi.h>
19 #define MAX_LOV_UUID_COUNT 1000
21 int main(int argc, char** argv)
23 struct lov_user_md *lum_file = NULL;
28 fprintf(stderr, "Usage: %s <filename>\n", argv[0]);
32 lum_size = lov_mds_md_size(MAX_LOV_UUID_COUNT);
34 if ((lum_file = (struct lov_user_md *)malloc(lum_size)) == NULL) {
35 fprintf(stderr, "unable to allocate memory for ioctl's");
40 rc = llapi_file_get_stripe(argv[1], lum_file);
46 /* stripe_size stripe_count stripe_offset */
48 lum_file->lmm_stripe_size,
49 lum_file->lmm_stripe_count,
50 lum_file->lmm_objects[0].l_ost_idx);