Android-cuttlefish cvd tool
Classes | Functions | Variables
quotaio.c File Reference
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/file.h>
#include <assert.h>
#include "common.h"
#include "quotaio.h"
Include dependency graph for quotaio.c:

Classes

struct  disk_dqheader
 

Functions

const char * quota_type2name (enum quota_type qtype)
 
void update_grace_times (struct dquot *q)
 
static unsigned int quota_write_nomount (struct quota_file *qf, long offset, void *buf, unsigned int size)
 
static unsigned int quota_read_nomount (struct quota_file *qf, long offset, void *buf, unsigned int size)
 
errcode_t quota_file_open (struct f2fs_sb_info *sbi, struct quota_handle *h, enum quota_type qtype, int flags)
 
errcode_t quota_file_create (struct f2fs_sb_info *sbi, struct quota_handle *h, enum quota_type qtype)
 
errcode_t quota_file_close (struct f2fs_sb_info *sbi, struct quota_handle *h, int update_filesize)
 
struct dquotget_empty_dquot (void)
 

Variables

static const char *const extensions [MAXQUOTAS]
 
int cur_qtype = -1
 
u32 qf_last_blkofs [MAXQUOTAS] = {0, 0, 0}
 
enum qf_szchk_type_t qf_szchk_type [MAXQUOTAS]
 
u64 qf_maxsize [MAXQUOTAS]
 

Function Documentation

◆ get_empty_dquot()

struct dquot * get_empty_dquot ( void  )

◆ quota_file_close()

errcode_t quota_file_close ( struct f2fs_sb_info sbi,
struct quota_handle h,
int  update_filesize 
)

◆ quota_file_create()

errcode_t quota_file_create ( struct f2fs_sb_info sbi,
struct quota_handle h,
enum quota_type  qtype 
)

◆ quota_file_open()

errcode_t quota_file_open ( struct f2fs_sb_info sbi,
struct quota_handle h,
enum quota_type  qtype,
int  flags 
)

◆ quota_read_nomount()

static unsigned int quota_read_nomount ( struct quota_file qf,
long  offset,
void *  buf,
unsigned int  size 
)
static

◆ quota_type2name()

const char * quota_type2name ( enum quota_type  qtype)

Convert type of quota to written representation

◆ quota_write_nomount()

static unsigned int quota_write_nomount ( struct quota_file qf,
long  offset,
void *  buf,
unsigned int  size 
)
static

◆ update_grace_times()

void update_grace_times ( struct dquot q)

Variable Documentation

◆ cur_qtype

int cur_qtype = -1

◆ extensions

const char* const extensions[MAXQUOTAS]
static
Initial value:
= {
[USRQUOTA] = "user",
[GRPQUOTA] = "group",
[PRJQUOTA] = "project",
}
@ USRQUOTA
Definition: quotaio.h:38
@ PRJQUOTA
Definition: quotaio.h:40
@ GRPQUOTA
Definition: quotaio.h:39

quotaio.c

Generic IO operations on quotafiles Jan Kara jack@.nosp@m.suse.nosp@m..cz - sponsored by SuSE CR Aditya Kali adity.nosp@m.akal.nosp@m.i@goo.nosp@m.gle..nosp@m.com - Ported to e2fsprogs Hyojun Kim hyoju.nosp@m.n@go.nosp@m.ogle..nosp@m.com - Ported to f2fs-tools

◆ qf_last_blkofs

u32 qf_last_blkofs[MAXQUOTAS] = {0, 0, 0}

◆ qf_maxsize

u64 qf_maxsize[MAXQUOTAS]

◆ qf_szchk_type

enum qf_szchk_type_t qf_szchk_type[MAXQUOTAS]
Initial value:
=
{
}
@ QF_SZCHK_NONE
Definition: quotaio.h:49