Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-14385 tests: verify lfs setstripe comp-flags and flags options
[fs/lustre-release.git]
/
lustre
/
quota
/
lquota_entry.c
diff --git
a/lustre/quota/lquota_entry.c
b/lustre/quota/lquota_entry.c
index
e94cd66
..
7e2b62b
100644
(file)
--- a/
lustre/quota/lquota_entry.c
+++ b/
lustre/quota/lquota_entry.c
@@
-199,7
+199,7
@@
retry:
*/
struct lquota_site *lquota_site_alloc(const struct lu_env *env, void *parent,
bool is_master, short qtype,
*/
struct lquota_site *lquota_site_alloc(const struct lu_env *env, void *parent,
bool is_master, short qtype,
- struct lquota_entry_operations *ops)
+
const
struct lquota_entry_operations *ops)
{
struct lquota_site *site;
char hashname[15];
{
struct lquota_site *site;
char hashname[15];
@@
-285,8
+285,10
@@
static void lqe_init(struct lquota_entry *lqe)
*
* \param env - the environment passed by the caller
* \param lqe - is the quota entry to refresh
*
* \param env - the environment passed by the caller
* \param lqe - is the quota entry to refresh
+ * \param find - don't create entry on disk if true
*/
*/
-static int lqe_read(const struct lu_env *env, struct lquota_entry *lqe)
+static int lqe_read(const struct lu_env *env,
+ struct lquota_entry *lqe, bool find)
{
struct lquota_site *site;
int rc;
{
struct lquota_site *site;
int rc;
@@
-299,7
+301,7
@@
static int lqe_read(const struct lu_env *env, struct lquota_entry *lqe)
LQUOTA_DEBUG(lqe, "read");
LQUOTA_DEBUG(lqe, "read");
- rc = site->lqs_ops->lqe_read(env, lqe, site->lqs_parent);
+ rc = site->lqs_ops->lqe_read(env, lqe, site->lqs_parent
, find
);
if (rc == 0)
/* mark the entry as up-to-date */
lqe->lqe_uptodate = true;
if (rc == 0)
/* mark the entry as up-to-date */
lqe->lqe_uptodate = true;
@@
-313,12
+315,15
@@
static int lqe_read(const struct lu_env *env, struct lquota_entry *lqe)
* \param env - the environment passed by the caller
* \param site - lquota site which stores quota entries in a hash table
* \param qid - is the quota ID to be found/created
* \param env - the environment passed by the caller
* \param site - lquota site which stores quota entries in a hash table
* \param qid - is the quota ID to be found/created
+ * \param find - don't create lqe on disk in case of ENOENT if true
*
* \retval 0 - success
* \retval -ve - failure
*/
*
* \retval 0 - success
* \retval -ve - failure
*/
-struct lquota_entry *lqe_locate(const struct lu_env *env,
- struct lquota_site *site, union lquota_id *qid)
+struct lquota_entry *lqe_locate_find(const struct lu_env *env,
+ struct lquota_site *site,
+ union lquota_id *qid,
+ bool find)
{
struct lquota_entry *lqe, *new = NULL;
int rc = 0;
{
struct lquota_entry *lqe, *new = NULL;
int rc = 0;
@@
-350,7
+355,7
@@
struct lquota_entry *lqe_locate(const struct lu_env *env,
lqe_init(new);
/* read quota settings from disk and mark lqe as up-to-date */
lqe_init(new);
/* read quota settings from disk and mark lqe as up-to-date */
- rc = lqe_read(env, new);
+ rc = lqe_read(env, new
, find
);
if (rc)
GOTO(out, lqe = ERR_PTR(rc));
if (rc)
GOTO(out, lqe = ERR_PTR(rc));