2 * quotaio_rpc.c - quota IO operations for RPC (just wrappers for RPC calls)
10 #include <sys/types.h>
14 #include "dqblk_rpc.h"
15 #include "rquota_client.h"
18 static struct dquot *rpc_read_dquot(struct quota_handle *h, qid_t id);
19 static int rpc_commit_dquot(struct dquot *dquot, int flags);
21 struct quotafile_ops quotafile_ops_rpc = {
22 read_dquot: rpc_read_dquot,
23 commit_dquot: rpc_commit_dquot
27 * Read a dqblk struct from RPC server - just wrapper function.
29 static struct dquot *rpc_read_dquot(struct quota_handle *h, qid_t id)
32 struct dquot *dquot = get_empty_dquot();
37 if ((ret = rpc_rquota_get(dquot)) < 0) {
50 * Write a dqblk struct to RPC server - just wrapper function.
52 static int rpc_commit_dquot(struct dquot *dquot, int flags)
57 if (QIO_RO(dquot->dq_h)) {
58 errstr(_("Trying to write quota to readonly quotafile on %s\n"), dquot->dq_h->qh_quotadev);
62 if ((ret = rpc_rquota_set(QCMD(Q_RPC_SETQUOTA, dquot->dq_h->qh_type), dquot)) < 0) {