Lines Matching defs:quota
56 * Handling of requests to query and set quota data on a filesystem.
59 * smb_quota_free - delete the quota list created in smb_quota_query
65 * In order to fulfill the quota query requests that can be received
66 * from clients, it is required that the quota data can be provided in
68 * at which quota entry to begin the query.
72 * populated with the file system's user and group quota data, and
89 * An avl tree is (re)populated, if required, whenever a quota request
94 * - a quota set operation has been performed on its file system
97 * the appropriate quota tree must be identified and locked via a call
98 * to smb_quota_tree_lookup(), The quota tree is locked (qt_locked == B_TRUE)
108 * added to and removed from the quota list.
113 * removed from the quota list until this count is zero.
131 * list of quota trees; one per shared file system.
152 * arg passed to zfs callback when querying quota properties
192 * In order to display the quota properties tab, windows clients
193 * check for the existence of the quota control file.
205 * Initialize the list to hold the quota trees.
223 * Wait for each quota tree to not be in use (qt_refcnt == 1)
268 "quota shutdown timeout expired");
285 * If there is not a quota tree representing the specified path,
326 * If this is the last share that the quota tree represents
370 * Request->qq_query_op determines whether to get quota entries
372 * quota entries, optionally starting at a specified SID.
421 * Set the list of quota entries.
444 * This method frees quota entries.
450 smb_quota_t *quota;
452 while ((quota = list_head(list)) != NULL) {
453 list_remove(list, quota);
454 free(quota);
464 * specified sid. If request->qq_single is TRUE only one quota
488 smb_quota_t *quota, *quotal, key;
496 quota = avl_find(avl_tree, &key, &where);
497 if (quota == NULL)
500 quota = avl_first(avl_tree);
501 if (quota == NULL)
507 quota = avl_find(avl_tree, &key, &where);
508 if (quota == NULL)
510 quota = AVL_NEXT(avl_tree, quota);
511 if (quota == NULL)
520 while (quota) {
527 bcopy(quota, quotal, sizeof (smb_quota_t));
532 quota = AVL_NEXT(avl_tree, quota);
542 * Insert an entry in the reply quota list for each sid.
544 * quota list entry should contain zeros.
554 smb_quota_t *quota, *quotal, key;
565 quota = avl_find(avl_tree, &key, &where);
566 if (quota) {
567 bcopy(quota, quotal, sizeof (smb_quota_t));
584 * This method sets the list of quota entries.
586 * A quota list or threshold value of SMB_QUOTA_UNLIMITED means that
587 * the user / group does not have a quota limit. In ZFS this maps to
589 * A quota list or threshold value of (SMB_QUOTA_UNLIMITED - 1) means
590 * that the user / group quota should be removed. In ZFS this maps to
600 smb_quota_t *quota;
610 quota = list_head(quota_list);
612 while (quota) {
613 if ((quota->q_limit == SMB_QUOTA_UNLIMITED) ||
614 (quota->q_limit == (SMB_QUOTA_UNLIMITED - 1))) {
615 quota->q_limit = 0;
618 quota->q_limit);
620 sidtype = smb_quota_sidtype(qtree, quota->q_sidstr);
631 syslog(LOG_WARNING, "Failed to set quota for %s: "
632 "%s (%d) not valid for quotas", quota->q_sidstr,
634 quota = list_next(quota_list, quota);
638 if ((smb_quota_getid(quota->q_sidstr, sidtype, &id) == 0) &&
644 "%s@%s", typestr, quota->q_sidstr);
649 syslog(LOG_WARNING, "Failed to set quota for %s: %s",
650 quota->q_sidstr, strerror(errno));
655 quota = list_next(quota_list, quota);
672 smb_quota_t key, *quota;
679 quota = avl_find(&qtree->qt_avl, &key, &where);
680 if (quota)
681 return (quota->q_sidtype);
735 * Find the quota tree in smb_quota_fs_list.
880 * Comparision function for nodes in an AVL tree which holds quota
902 * If the quota tree needs to be (re)populated:
948 * populate the quota tree.
993 smb_quota_t *quota, key;
1003 quota = avl_find(avl_tree, &key, &where);
1004 if (quota == NULL) {
1005 quota = malloc(sizeof (smb_quota_t));
1006 if (quota == NULL)
1008 bzero(quota, sizeof (smb_quota_t));
1009 quota->q_thresh = SMB_QUOTA_UNLIMITED;
1010 quota->q_limit = SMB_QUOTA_UNLIMITED;
1011 avl_insert(avl_tree, (void *)quota, where);
1012 (void) strlcpy(quota->q_sidstr, key.q_sidstr, SMB_SID_STRSZ);
1017 quota->q_sidtype = SidTypeUser;
1018 quota->q_used = space;
1021 quota->q_sidtype = SidTypeGroup;
1022 quota->q_used = space;
1025 quota->q_sidtype = SidTypeUser;
1026 quota->q_limit = space;
1029 quota->q_sidtype = SidTypeGroup;
1030 quota->q_limit = space;
1036 quota->q_thresh = quota->q_limit;
1116 * In order to display the quota properties tab, windows clients
1117 * check for the existence of the quota control file, created