summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorChristof Schmitt <cs@samba.org>2014-12-10 15:51:17 -0700
committerChristof Schmitt <cs@samba.org>2015-03-02 22:31:08 +0100
commita36c46d9db70ab3633fd074e88e1e832c63fe8ee (patch)
tree0d241e9571c4fb8560074b9f58ec3b90734cab84 /source3
parent9948163a64a564de6f423a915dc3dcaae44e3675 (diff)
downloadsamba-a36c46d9db70ab3633fd074e88e1e832c63fe8ee.tar.gz
samba-a36c46d9db70ab3633fd074e88e1e832c63fe8ee.tar.xz
samba-a36c46d9db70ab3633fd074e88e1e832c63fe8ee.zip
gpfs: Move get_gpfs_quota to vfs_gpfs.c
Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/gpfs.c27
-rw-r--r--source3/modules/vfs_gpfs.c27
-rw-r--r--source3/modules/vfs_gpfs.h2
3 files changed, 27 insertions, 29 deletions
diff --git a/source3/modules/gpfs.c b/source3/modules/gpfs.c
index c5ed93a6b6..9654bd73f7 100644
--- a/source3/modules/gpfs.c
+++ b/source3/modules/gpfs.c
@@ -229,33 +229,6 @@ int gpfswrap_getfilesetid(char *pathname, char *name, int *idp)
return gpfs_getfilesetid_fn(pathname, name, idp);
}
-int get_gpfs_quota(const char *pathname, int type, int id,
- struct gpfs_quotaInfo *qi)
-{
- int ret;
-
- ZERO_STRUCTP(qi);
- ret = gpfswrap_quotactl(discard_const_p(char, pathname),
- GPFS_QCMD(Q_GETQUOTA, type), id, qi);
-
- if (ret) {
- if (errno == GPFS_E_NO_QUOTA_INST) {
- DEBUG(10, ("Quotas disabled on GPFS filesystem.\n"));
- } else if (errno != ENOSYS) {
- DEBUG(0, ("Get quota failed, type %d, id, %d, "
- "errno %d.\n", type, id, errno));
- }
-
- return ret;
- }
-
- DEBUG(10, ("quota type %d, id %d, blk u:%lld h:%lld s:%lld gt:%u\n",
- type, id, qi->blockUsage, qi->blockHardLimit,
- qi->blockSoftLimit, qi->blockGraceTime));
-
- return ret;
-}
-
int get_gpfs_fset_id(const char *pathname, int *fset_id)
{
int err, fd, errno_fcntl;
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index ab9cfee1f7..fe506cfd2d 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -2005,6 +2005,33 @@ static int vfs_gpfs_connect(struct vfs_handle_struct *handle,
return 0;
}
+static int get_gpfs_quota(const char *pathname, int type, int id,
+ struct gpfs_quotaInfo *qi)
+{
+ int ret;
+
+ ZERO_STRUCTP(qi);
+ ret = gpfswrap_quotactl(discard_const_p(char, pathname),
+ GPFS_QCMD(Q_GETQUOTA, type), id, qi);
+
+ if (ret) {
+ if (errno == GPFS_E_NO_QUOTA_INST) {
+ DEBUG(10, ("Quotas disabled on GPFS filesystem.\n"));
+ } else if (errno != ENOSYS) {
+ DEBUG(0, ("Get quota failed, type %d, id, %d, "
+ "errno %d.\n", type, id, errno));
+ }
+
+ return ret;
+ }
+
+ DEBUG(10, ("quota type %d, id %d, blk u:%lld h:%lld s:%lld gt:%u\n",
+ type, id, qi->blockUsage, qi->blockHardLimit,
+ qi->blockSoftLimit, qi->blockGraceTime));
+
+ return ret;
+}
+
static int vfs_gpfs_get_quotas(const char *path, uid_t uid, gid_t gid,
int *fset_id,
struct gpfs_quotaInfo *qi_user,
diff --git a/source3/modules/vfs_gpfs.h b/source3/modules/vfs_gpfs.h
index b3c3e53ff6..b61a0ddbae 100644
--- a/source3/modules/vfs_gpfs.h
+++ b/source3/modules/vfs_gpfs.h
@@ -45,7 +45,5 @@ int gpfswrap_set_times_path(char *pathname, int flags,
int gpfswrap_quotactl(char *pathname, int cmd, int id, void *bufp);
int gpfswrap_fcntl(int fd, void *argp);
int gpfswrap_getfilesetid(char *pathname, char *name, int *idp);
-int get_gpfs_quota(const char *pathname, int type, int id,
- struct gpfs_quotaInfo *qi);
int get_gpfs_fset_id(const char *pathname, int *fset_id);
int smbd_gpfs_set_times_path(char *path, struct smb_file_time *ft);