ESDM
Middleware for Earth System Data
Macros | Functions
md-posix.c File Reference

A metadata backend on top of a POSIX compatible filesystem. More...

#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <time.h>
#include "md-posix.h"
#include <esdm-internal.h>
Include dependency graph for md-posix.c:

Macros

#define _GNU_SOURCE   /* See feature_test_macros(7) */
 
#define DEBUG_ENTER   ESDM_DEBUG_COM_FMT("METADUMMY", "", "")
 
#define DEBUG(fmt, ...)   ESDM_DEBUG_COM_FMT("METADUMMY", fmt, __VA_ARGS__)
 
#define sprintfDatasetDir(path, d)   (sprintf(path, "%s/datasets/%c%c", tgt, d->id[0], d->id[1]))
 
#define sprintfDatasetMd(path, d)   (sprintf(path, "%s/datasets/%c%c/%s.md", tgt, d->id[0], d->id[1], d->id + 2))
 

Functions

esdm_md_backend_tmetadummy_backend_init (esdm_config_backend_t *config)
 

Detailed Description

A metadata backend on top of a POSIX compatible filesystem.

Function Documentation

◆ metadummy_backend_init()

esdm_md_backend_t* metadummy_backend_init ( esdm_config_backend_t config)

Initializes the POSIX plugin. In particular this involves:

  • Load configuration of this backend
  • Load and potentially calibrate performance model
  • Connect with support services e.g. for technical metadata
  • Setup directory structures used by this POSIX specific backend
  • Populate esdm_md_backend_t struct and callbacks required for registration

Takes possession of the config argument. Pass a malloc()ed object.

Returns
pointer to backend struct