aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2018-08-04 13:39:23 +0300
committerMichael Bestas <mkbestas@lineageos.org>2018-08-04 13:57:44 +0300
commit3aac42adecad3abc82e62694bc231b5610e1c6c4 (patch)
treea596b84e26d27769583f79fc58e9a41d8d9ec876
parente4ea681130b62324b9ea30bba62c026ae96a4522 (diff)
downloadandroid_external_f2fs-tools-3aac42adecad3abc82e62694bc231b5610e1c6c4.tar.gz
android_external_f2fs-tools-3aac42adecad3abc82e62694bc231b5610e1c6c4.tar.bz2
android_external_f2fs-tools-3aac42adecad3abc82e62694bc231b5610e1c6c4.zip
fsck: Fix conflicts with libext2_quota
Change-Id: Iaf7ecc73302733048671c739ac61f8897732d051
-rw-r--r--fsck/mkquota.c8
-rw-r--r--fsck/quotaio.c14
-rw-r--r--fsck/quotaio.h12
-rw-r--r--fsck/quotaio_tree.c6
4 files changed, 20 insertions, 20 deletions
diff --git a/fsck/mkquota.c b/fsck/mkquota.c
index b8e9ce6..e097697 100644
--- a/fsck/mkquota.c
+++ b/fsck/mkquota.c
@@ -52,7 +52,7 @@ static void write_dquots(dict_t *dict, struct quota_handle *qh)
if (dq) {
print_dquot("write", dq);
dq->dq_h = qh;
- update_grace_times(dq);
+ f2fs_update_grace_times(dq);
qh->qh_ops->commit_dquot(dq);
}
}
@@ -78,12 +78,12 @@ errcode_t f2fs_quota_write_inode(struct f2fs_sb_info *sbi, enum quota_type qtype
dict = qctx->quota_dict[qtype];
if (dict) {
- retval = quota_file_create(sbi, h, qtype);
+ retval = f2fs_quota_file_create(sbi, h, qtype);
if (retval) {
log_debug("Cannot initialize io on quotafile");
} else {
write_dquots(dict, h);
- quota_file_close(sbi, h, 1);
+ f2fs_quota_file_close(sbi, h, 1);
}
}
out:
@@ -370,7 +370,7 @@ errcode_t f2fs_quota_compare_and_update(struct f2fs_sb_info *sbi,
if (!dict)
goto out;
- err = quota_file_open(sbi, &qh, qtype, 0);
+ err = f2fs_quota_file_open(sbi, &qh, qtype, 0);
if (err) {
log_debug("Open quota file failed");
goto out;
diff --git a/fsck/quotaio.c b/fsck/quotaio.c
index afadf56..7070f7c 100644
--- a/fsck/quotaio.c
+++ b/fsck/quotaio.c
@@ -36,7 +36,7 @@ struct disk_dqheader {
/**
* Convert type of quota to written representation
*/
-const char *quota_type2name(enum quota_type qtype)
+const char *f2fs_quota_type2name(enum quota_type qtype)
{
if (qtype >= MAXQUOTAS)
return "unknown";
@@ -46,7 +46,7 @@ const char *quota_type2name(enum quota_type qtype)
/*
* Set grace time if needed
*/
-void update_grace_times(struct dquot *q)
+void f2fs_update_grace_times(struct dquot *q)
{
time_t now;
@@ -93,7 +93,7 @@ static unsigned int quota_read_nomount(struct quota_file *qf, long offset,
/*
* Detect quota format and initialize quota IO
*/
-errcode_t quota_file_open(struct f2fs_sb_info *sbi, struct quota_handle *h,
+errcode_t f2fs_quota_file_open(struct f2fs_sb_info *sbi, struct quota_handle *h,
enum quota_type qtype, int flags)
{
struct f2fs_fsck *fsck = F2FS_FSCK(sbi);
@@ -111,7 +111,7 @@ errcode_t quota_file_open(struct f2fs_sb_info *sbi, struct quota_handle *h,
if (!h) {
if (qctx->quota_file[qtype]) {
h = qctx->quota_file[qtype];
- (void) quota_file_close(sbi, h, 0);
+ (void) f2fs_quota_file_close(sbi, h, 0);
}
err = quota_get_mem(sizeof(struct quota_handle), &h);
if (err) {
@@ -153,7 +153,7 @@ errout:
/*
* Create new quotafile of specified format on given filesystem
*/
-errcode_t quota_file_create(struct f2fs_sb_info *sbi, struct quota_handle *h,
+errcode_t f2fs_quota_file_create(struct f2fs_sb_info *sbi, struct quota_handle *h,
enum quota_type qtype)
{
struct f2fs_super_block *sb = F2FS_RAW_SUPER(sbi);
@@ -183,7 +183,7 @@ errcode_t quota_file_create(struct f2fs_sb_info *sbi, struct quota_handle *h,
/*
* Close quotafile and release handle
*/
-errcode_t quota_file_close(struct f2fs_sb_info *sbi, struct quota_handle *h,
+errcode_t f2fs_quota_file_close(struct f2fs_sb_info *sbi, struct quota_handle *h,
int update_filesize)
{
struct f2fs_fsck *fsck = F2FS_FSCK(sbi);
@@ -207,7 +207,7 @@ errcode_t quota_file_close(struct f2fs_sb_info *sbi, struct quota_handle *h,
/*
* Create empty quota structure
*/
-struct dquot *get_empty_dquot(void)
+struct dquot *f2fs_get_empty_dquot(void)
{
struct dquot *dquot;
diff --git a/fsck/quotaio.h b/fsck/quotaio.h
index 39999bb..d5adfbd 100644
--- a/fsck/quotaio.h
+++ b/fsck/quotaio.h
@@ -190,21 +190,21 @@ struct quotafile_ops {
/* Open existing quotafile of given type (and verify its format) on given
* filesystem. */
-errcode_t quota_file_open(struct f2fs_sb_info *sbi, struct quota_handle *h,
+errcode_t f2fs_quota_file_open(struct f2fs_sb_info *sbi, struct quota_handle *h,
enum quota_type qtype, int flags);
/* Create new quotafile of specified format on given filesystem */
-errcode_t quota_file_create(struct f2fs_sb_info *sbi, struct quota_handle *h,
+errcode_t f2fs_quota_file_create(struct f2fs_sb_info *sbi, struct quota_handle *h,
enum quota_type qtype);
/* Close quotafile */
-errcode_t quota_file_close(struct f2fs_sb_info *sbi, struct quota_handle *h,
+errcode_t f2fs_quota_file_close(struct f2fs_sb_info *sbi, struct quota_handle *h,
int update_filesize);
/* Get empty quota structure */
-struct dquot *get_empty_dquot(void);
-const char *quota_type2name(enum quota_type qtype);
-void update_grace_times(struct dquot *q);
+struct dquot *f2fs_get_empty_dquot(void);
+const char *f2fs_quota_type2name(enum quota_type qtype);
+void f2fs_update_grace_times(struct dquot *q);
/* In mkquota.c */
errcode_t f2fs_quota_init_context(struct f2fs_sb_info *sbi);
diff --git a/fsck/quotaio_tree.c b/fsck/quotaio_tree.c
index 5aef228..4c7a99e 100644
--- a/fsck/quotaio_tree.c
+++ b/fsck/quotaio_tree.c
@@ -512,7 +512,7 @@ struct dquot *qtree_read_dquot(struct quota_handle *h, qid_t id)
long offset;
unsigned int ret;
char *ddquot;
- struct dquot *dquot = get_empty_dquot();
+ struct dquot *dquot = f2fs_get_empty_dquot();
if (!dquot)
return NULL;
@@ -591,7 +591,7 @@ static int check_reference(struct quota_handle *h, unsigned int blk)
"Please run fsck (8) to fix it.",
blk,
h->qh_info.u.v2_mdqi.dqi_qtree.dqi_blocks,
- quota_type2name(h->qh_type));
+ f2fs_quota_type2name(h->qh_type));
return -1;
}
return 0;
@@ -650,7 +650,7 @@ int qtree_scan_dquots(struct quota_handle *h,
{
struct v2_mem_dqinfo *v2info = &h->qh_info.u.v2_mdqi;
struct qtree_mem_dqinfo *info = &v2info->dqi_qtree;
- struct dquot *dquot = get_empty_dquot();
+ struct dquot *dquot = f2fs_get_empty_dquot();
char *bitmap = NULL;
int ret = -1;
int entries = 0;