Android-cuttlefish cvd tool
Macros | Typedefs | Functions
quotaio_tree.c File Reference
#include <sys/types.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "common.h"
#include "quotaio_tree.h"
#include "quotaio.h"
Include dependency graph for quotaio_tree.c:

Macros

#define freedqbuf(buf)   quota_free_mem(&buf)
 
#define set_bit(bmp, ind)   ((bmp)[(ind) >> 3] |= (1 << ((ind) & 7)))
 
#define get_bit(bmp, ind)   ((bmp)[(ind) >> 3] & (1 << ((ind) & 7)))
 

Typedefs

typedef char * dqbuf_t
 

Functions

static dqbuf_t getdqbuf (void)
 
int qtree_entry_unused (struct qtree_mem_dqinfo *info, char *disk)
 
int qtree_dqstr_in_blk (struct qtree_mem_dqinfo *info)
 
static int get_index (qid_t id, int depth)
 
static void mark_quotafile_info_dirty (struct quota_handle *h)
 
static void read_blk (struct quota_handle *h, unsigned int blk, dqbuf_t buf)
 
static int write_blk (struct quota_handle *h, unsigned int blk, dqbuf_t buf)
 
static int get_free_dqblk (struct quota_handle *h)
 
static void put_free_dqblk (struct quota_handle *h, dqbuf_t buf, unsigned int blk)
 
static void remove_free_dqentry (struct quota_handle *h, dqbuf_t buf, unsigned int blk)
 
static void insert_free_dqentry (struct quota_handle *h, dqbuf_t buf, unsigned int blk)
 
static unsigned int find_free_dqentry (struct quota_handle *h, struct dquot *dquot, int *err)
 
static int do_insert_tree (struct quota_handle *h, struct dquot *dquot, unsigned int *treeblk, int depth)
 
static int dq_insert_tree (struct quota_handle *h, struct dquot *dquot)
 
int qtree_write_dquot (struct dquot *dquot)
 
static void free_dqentry (struct quota_handle *h, struct dquot *dquot, unsigned int blk)
 
static void remove_tree (struct quota_handle *h, struct dquot *dquot, unsigned int *blk, int depth)
 
void qtree_delete_dquot (struct dquot *dquot)
 
static long find_block_dqentry (struct quota_handle *h, struct dquot *dquot, unsigned int blk)
 
static long find_tree_dqentry (struct quota_handle *h, struct dquot *dquot, unsigned int blk, int depth)
 
static long find_dqentry (struct quota_handle *h, struct dquot *dquot)
 
struct dquotqtree_read_dquot (struct quota_handle *h, qid_t id)
 
static int report_block (struct dquot *dquot, unsigned int blk, char *bitmap, int(*process_dquot)(struct dquot *, void *), void *data)
 
static int check_reference (struct quota_handle *h, unsigned int blk)
 
static int report_tree (struct dquot *dquot, unsigned int blk, int depth, char *bitmap, int *entries, int(*process_dquot)(struct dquot *, void *), void *data)
 
static unsigned int find_set_bits (char *bmp, int blocks)
 
int qtree_scan_dquots (struct quota_handle *h, int(*process_dquot)(struct dquot *, void *), void *data)
 

Macro Definition Documentation

◆ freedqbuf

#define freedqbuf (   buf)    quota_free_mem(&buf)

◆ get_bit

#define get_bit (   bmp,
  ind 
)    ((bmp)[(ind) >> 3] & (1 << ((ind) & 7)))

◆ set_bit

#define set_bit (   bmp,
  ind 
)    ((bmp)[(ind) >> 3] |= (1 << ((ind) & 7)))

Typedef Documentation

◆ dqbuf_t

typedef char* dqbuf_t

Function Documentation

◆ check_reference()

static int check_reference ( struct quota_handle h,
unsigned int  blk 
)
static

◆ do_insert_tree()

static int do_insert_tree ( struct quota_handle h,
struct dquot dquot,
unsigned int *  treeblk,
int  depth 
)
static

◆ dq_insert_tree()

static int dq_insert_tree ( struct quota_handle h,
struct dquot dquot 
)
static

◆ find_block_dqentry()

static long find_block_dqentry ( struct quota_handle h,
struct dquot dquot,
unsigned int  blk 
)
static

◆ find_dqentry()

static long find_dqentry ( struct quota_handle h,
struct dquot dquot 
)
inlinestatic

◆ find_free_dqentry()

static unsigned int find_free_dqentry ( struct quota_handle h,
struct dquot dquot,
int *  err 
)
static

◆ find_set_bits()

static unsigned int find_set_bits ( char *  bmp,
int  blocks 
)
static

◆ find_tree_dqentry()

static long find_tree_dqentry ( struct quota_handle h,
struct dquot dquot,
unsigned int  blk,
int  depth 
)
static

◆ free_dqentry()

static void free_dqentry ( struct quota_handle h,
struct dquot dquot,
unsigned int  blk 
)
static

◆ get_free_dqblk()

static int get_free_dqblk ( struct quota_handle h)
static

◆ get_index()

static int get_index ( qid_t  id,
int  depth 
)
static

◆ getdqbuf()

static dqbuf_t getdqbuf ( void  )
inlinestatic

◆ insert_free_dqentry()

static void insert_free_dqentry ( struct quota_handle h,
dqbuf_t  buf,
unsigned int  blk 
)
static

◆ mark_quotafile_info_dirty()

static void mark_quotafile_info_dirty ( struct quota_handle h)
inlinestatic

◆ put_free_dqblk()

static void put_free_dqblk ( struct quota_handle h,
dqbuf_t  buf,
unsigned int  blk 
)
static

◆ qtree_delete_dquot()

void qtree_delete_dquot ( struct dquot dquot)

◆ qtree_dqstr_in_blk()

int qtree_dqstr_in_blk ( struct qtree_mem_dqinfo info)

◆ qtree_entry_unused()

int qtree_entry_unused ( struct qtree_mem_dqinfo info,
char *  disk 
)

◆ qtree_read_dquot()

struct dquot * qtree_read_dquot ( struct quota_handle h,
qid_t  id 
)

◆ qtree_scan_dquots()

int qtree_scan_dquots ( struct quota_handle h,
int(*)(struct dquot *, void *)  process_dquot,
void *  data 
)

◆ qtree_write_dquot()

int qtree_write_dquot ( struct dquot dquot)

◆ read_blk()

static void read_blk ( struct quota_handle h,
unsigned int  blk,
dqbuf_t  buf 
)
static

◆ remove_free_dqentry()

static void remove_free_dqentry ( struct quota_handle h,
dqbuf_t  buf,
unsigned int  blk 
)
static

◆ remove_tree()

static void remove_tree ( struct quota_handle h,
struct dquot dquot,
unsigned int *  blk,
int  depth 
)
static

◆ report_block()

static int report_block ( struct dquot dquot,
unsigned int  blk,
char *  bitmap,
int(*)(struct dquot *, void *)  process_dquot,
void *  data 
)
static

◆ report_tree()

static int report_tree ( struct dquot dquot,
unsigned int  blk,
int  depth,
char *  bitmap,
int *  entries,
int(*)(struct dquot *, void *)  process_dquot,
void *  data 
)
static

◆ write_blk()

static int write_blk ( struct quota_handle h,
unsigned int  blk,
dqbuf_t  buf 
)
static