Motr  M0
linux.c File Reference
#include "lib/trace.h"
#include "stob/linux.h"
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <limits.h>
#include "lib/errno.h"
#include "lib/memory.h"
#include "lib/fs.h"
#include "conf/obj.h"
#include "stob/type.h"
#include "stob/ioq.h"
Include dependency graph for linux.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_STOB
 

Enumerations

enum  { STOB_TYPE_LINUX = 0x01 }
 

Functions

static void stob_linux_type_register (struct m0_stob_type *type)
 
static void stob_linux_type_deregister (struct m0_stob_type *type)
 
M0_INTERNAL struct m0_stob_linuxm0_stob_linux_container (struct m0_stob *stob)
 
M0_INTERNAL struct m0_stob_linux_domainm0_stob_linux_domain_container (struct m0_stob_domain *dom)
 
static char * stob_linux_vsnprintf (const char *format,...)
 
static char * stob_linux_dir_domain (const char *path)
 
static char * stob_linux_dir_stob (const char *path)
 
static char * stob_linux_file_domain_id (const char *path)
 
static char * stob_linux_file_stob (const char *path, const struct m0_fid *stob_fid)
 
static int stob_linux_domain_key_get_set (const char *path, uint64_t *dom_key, bool get)
 
static int stob_linux_domain_cfg_init_parse (const char *str_cfg_init, void **cfg_init)
 
static void stob_linux_domain_cfg_init_free (void *cfg_init)
 
static int stob_linux_domain_cfg_create_parse (const char *str_cfg_create, void **cfg_create)
 
static void stob_linux_domain_cfg_create_free (void *cfg_create)
 
static int stob_linux_domain_init (struct m0_stob_type *type, const char *location_data, void *cfg_init, struct m0_stob_domain **out)
 
static void stob_linux_domain_fini (struct m0_stob_domain *dom)
 
static int stob_linux_domain_create_destroy (struct m0_stob_type *type, const char *path, uint64_t dom_key, void *cfg, bool create)
 
static int stob_linux_domain_create (struct m0_stob_type *type, const char *location_data, uint64_t dom_key, void *cfg_create)
 
static int stob_linux_domain_destroy (struct m0_stob_type *type, const char *location_data)
 
static struct m0_stobstob_linux_alloc (struct m0_stob_domain *dom, const struct m0_fid *stob_fid)
 
static void stob_linux_free (struct m0_stob_domain *dom, struct m0_stob *stob)
 
static int stob_linux_cfg_parse (const char *str_cfg_create, void **cfg_create)
 
static void stob_linux_cfg_free (void *cfg_create)
 
static int stob_linux_stat (struct m0_stob_linux *lstob)
 
static int stob_linux_open (struct m0_stob *stob, struct m0_stob_domain *dom, const struct m0_fid *stob_fid, void *cfg, bool create)
 
static int stob_linux_init (struct m0_stob *stob, struct m0_stob_domain *dom, const struct m0_fid *stob_fid)
 
static void stob_linux_close (struct m0_stob_linux *lstob)
 
static void stob_linux_fini (struct m0_stob *stob)
 
static void stob_linux_create_credit (struct m0_stob_domain *dom, struct m0_be_tx_credit *accum)
 
static int stob_linux_create (struct m0_stob *stob, struct m0_stob_domain *dom, struct m0_dtx *dtx, const struct m0_fid *stob_fid, void *cfg)
 
static void stob_linux_destroy_credit (struct m0_stob *stob, struct m0_be_tx_credit *accum)
 
static int stob_linux_punch_credit (struct m0_stob *stob, struct m0_indexvec *want, struct m0_indexvec *got, struct m0_be_tx_credit *accum)
 
static int stob_linux_destroy (struct m0_stob *stob, struct m0_dtx *dtx)
 
static int stob_linux_punch (struct m0_stob *stob, struct m0_indexvec *range, struct m0_dtx *dtx)
 
static void stob_linux_write_credit (const struct m0_stob_domain *dom, const struct m0_stob_io *io, struct m0_be_tx_credit *accum)
 
static uint32_t stob_linux_block_shift (struct m0_stob *stob)
 
static int stob_linux_fd (struct m0_stob *stob)
 
M0_INTERNAL int m0_stob_linux_reopen (struct m0_stob_id *stob_id, const char *f_path)
 
M0_INTERNAL void m0_stob_linux_conf_sdev_associate (struct m0_stob *stob, const struct m0_fid *conf_sdev)
 
M0_INTERNAL int m0_stob_linux_domain_fd_get (struct m0_stob_domain *dom, int *fd)
 
M0_INTERNAL int m0_stob_linux_domain_fd_put (struct m0_stob_domain *dom, int fd)
 
M0_INTERNAL bool m0_stob_linux_domain_directio (struct m0_stob_domain *dom)
 

Variables

enum { ... }  M0_XCA_DOMAIN
 
const struct m0_stob_type m0_stob_linux_type
 
static struct m0_stob_type_ops stob_linux_type_ops
 
static struct m0_stob_domain_ops stob_linux_domain_ops
 
static struct m0_stob_ops stob_linux_ops
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_STOB

Definition at line 22 of file linux.c.