KMR
Classes | Macros | Functions
kmrfefs.c File Reference

Lustre File-System (or Fujitsu FEFS) Support. More...

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <stdint.h>
#include <limits.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include "kmrfefs.h"

Go to the source code of this file.

Classes

struct  kmr_lov_md
 
struct  kmr_lov_md_ost
 
struct  kmr_lov_md_ostidx
 
struct  kmr_lov_ost
 

Macros

#define KMR_IOC_MDC_GETFILESTRIPE   _IOWR('i', 21, struct kmr_lov_md_ost *)
 
#define KMR_IOC_MDC_GETINFO   _IOWR('i', 23, struct kmr_lov_md_ostidx *)
 
#define KMR_LOV_MAGIC_V1   0x0BD10BD0
 
#define KMR_LOV_MAGIC_V3   0x0BD30BD0
 
#define KMR_LOV_PATTERN_RAID0   0x001
 
#define KMR_LOV_USER_MAGIC_OST_INDEX   0x0BD70BD0
 
#define KMR_OST_MAX_PRECREATE   20000
 
#define MAX(a, b)   (((a)>(b))?(a):(b))
 
#define MIN(a, b)   (((a)<(b))?(a):(b))
 

Functions

int kmr_fefs_get_stripe (const char *dir, const char *file, struct kmr_fefs_stripe *stripe, int *err, _Bool debug_and_dump)
 Gets the OBDIDX information on the file or directory. More...
 

Detailed Description

Lustre File-System (or Fujitsu FEFS) Support.

The definitions of IOCTL are changed to match the Fujitsu Extended File-System (FEFS) version of the Lustre. THERE IS NO WARRANTY THE VALUES ARE OK. This only works with Linux.

Definition in file kmrfefs.c.

Function Documentation

int kmr_fefs_get_stripe ( const char *  dir,
const char *  file,
struct kmr_fefs_stripe stripe,
int *  err,
_Bool  debug_and_dump 
)

Gets the OBDIDX information on the file or directory.

FILE be null for directory. It fills STRIPE, which contains stripe size, count, offset, and an obdidx array. It returns non-zero on error: 1 for unsupported OS, 2 malloc failure, 3 open failure, 4 ioctl failure (not Lustre FS), 5 bad magic, 6 bad version (V3), and 7 bad pattern. Note the structure and the _IOWR definitions are changed to match the arguments of the Fujitsu FEFS. See the source "cb_getstripe()", near "ioctl(_,LL_IOC_LOV_GETSTRIPE,...)" in "liblustreapi.c".

Definition at line 82 of file kmrfefs.c.