From 1f1b463eb250b98954c96837d880cc0e07e109aa Mon Sep 17 00:00:00 2001 From: jkar8572 Date: Thu, 27 Sep 2001 21:34:57 +0000 Subject: Implemented setting only limits by commit_dquot() so edquota & setquota can operate safe on live filesystem. --- quotaio.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'quotaio.h') diff --git a/quotaio.h b/quotaio.h index e6bee75..22c6d8a 100644 --- a/quotaio.h +++ b/quotaio.h @@ -128,6 +128,11 @@ struct dquot { struct util_dqblk dq_dqb; /* Parsed data of dquot */ }; +/* Flags for commit function (have effect only when quota in kernel is turned on) */ +#define COMMIT_USAGE 1 +#define COMMIT_LIMITS 2 +#define COMMIT_ALL (COMMIT_USAGE | COMMIT_LIMITS) + /* Structure of quotafile operations */ struct quotafile_ops { int (*init_io) (struct quota_handle * h); /* Open quotafile */ @@ -135,7 +140,7 @@ struct quotafile_ops { int (*end_io) (struct quota_handle * h); /* Write all changes and close quotafile */ int (*write_info) (struct quota_handle * h); /* Write info about quotafile */ struct dquot *(*read_dquot) (struct quota_handle * h, qid_t id); /* Read dquot into memory */ - int (*commit_dquot) (struct dquot * dquot); /* Write given dquot to disk */ + int (*commit_dquot) (struct dquot * dquot, int flag); /* Write given dquot to disk */ int (*scan_dquots) (struct quota_handle * h, int (*process_dquot) (struct dquot * dquot, char * dqname)); /* Scan quotafile and call callback on every structure */ int (*report) (struct quota_handle * h, int verbose); /* Function called after 'repquota' to print format specific file information */ }; -- cgit v1.2.3