diff options
author | Petr Písař <ppisar@redhat.com> | 2013-01-31 12:58:59 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2013-02-04 22:50:04 +0100 |
commit | 5f7b9d139d64117abc4dcd66d2fbac99c070d7ce (patch) | |
tree | cbc91da9777c9d2e6ffb81e7530f3c582fe22c03 | |
parent | 73316c7746e89896c63fc49f24cafe32335df288 (diff) | |
download | quota-tools-5f7b9d139d64117abc4dcd66d2fbac99c070d7ce.tar.gz |
Do not fiddle with quota files on XFS and GFS
XFS and GFS have no quota files. Skip unnecessary examination and
rename of these files when running quotacheck.
Signed-off-by: Petr Písař <ppisar@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r-- | quotacheck.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/quotacheck.c b/quotacheck.c index 0d0d4b2..e047825 100644 --- a/quotacheck.c +++ b/quotacheck.c @@ -828,6 +828,9 @@ static int dump_to_file(struct mount_entry *mnt, int type) return -1; } debug(FL_DEBUG, _("Data dumped.\n")); + /* Moving of quota files doesn't apply to GFS2 or XFS */ + if (cfmt == QF_XFS) + return 0; if (kern_quota_on(mnt, type, cfmt) >= 0) { /* Quota turned on? */ char *filename; @@ -871,6 +874,10 @@ static int sub_quota_file(struct mount_entry *mnt, int qtype, int ftype) struct dquot *d; qid_t id; + /* GFS2 and XFS do not have quota files. */ + if (cfmt == QF_XFS) + return 0; + debug(FL_DEBUG, _("Substracting space used by old %s quota file.\n"), _(type2name(ftype))); if (get_qf_name(mnt, ftype, cfmt, 0, &filename) < 0) { debug(FL_VERBOSE, _("Old %s file name could not been determined. Usage will not be subtracted.\n"), _(type2name(ftype))); |