diff options
author | Ossama Othman <ossama.othman@intel.com> | 2013-11-25 15:00:02 -0800 |
---|---|---|
committer | Ossama Othman <ossama.othman@intel.com> | 2013-11-25 15:00:02 -0800 |
commit | 47ae1cde69cd6bf2c22e20902cefa3f0e25c8cb4 (patch) | |
tree | add9aa20a19f410a91522d4b95df3e93c57f8637 /quotaio_rpc.c | |
parent | 8c82de96cd23e4823a2d29eb2de2295c0866b0c9 (diff) | |
download | quota-47ae1cde69cd6bf2c22e20902cefa3f0e25c8cb4.tar.gz quota-47ae1cde69cd6bf2c22e20902cefa3f0e25c8cb4.tar.bz2 quota-47ae1cde69cd6bf2c22e20902cefa3f0e25c8cb4.zip |
Change-Id: I2271f01ae7877d43dde2432a45b49b910ddb6f8f
Signed-off-by: Ossama Othman <ossama.othman@intel.com>
Diffstat (limited to 'quotaio_rpc.c')
-rw-r--r-- | quotaio_rpc.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/quotaio_rpc.c b/quotaio_rpc.c index 14fe410..6f25144 100644 --- a/quotaio_rpc.c +++ b/quotaio_rpc.c @@ -15,15 +15,33 @@ #include "rquota_client.h" #include "pot.h" +static int rpc_init_io(struct quota_handle *h); static struct dquot *rpc_read_dquot(struct quota_handle *h, qid_t id); static int rpc_commit_dquot(struct dquot *dquot, int flags); struct quotafile_ops quotafile_ops_rpc = { +init_io: rpc_init_io, read_dquot: rpc_read_dquot, commit_dquot: rpc_commit_dquot }; /* + * Define maximal values RPC client can transmit to server. + */ +static int rpc_init_io(struct quota_handle *h) +{ +#ifdef RPC + h->qh_info.dqi_max_b_limit = ~(uint32_t)0; + h->qh_info.dqi_max_i_limit = ~(uint32_t)0; + h->qh_info.dqi_max_b_usage = (~(uint32_t)0) << QUOTABLOCK_BITS; + h->qh_info.dqi_max_i_usage = ~(uint32_t)0; + return 0; +#else + return -1; +#endif +} + +/* * Read a dqblk struct from RPC server - just wrapper function. */ static struct dquot *rpc_read_dquot(struct quota_handle *h, qid_t id) |