a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * CDDL HEADER START
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * The contents of this file are subject to the terms of the
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * Common Development and Distribution License (the "License").
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * You may not use this file except in compliance with the License.
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * See the License for the specific language governing permissions
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * and limitations under the License.
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * When distributing Covered Code, include this CDDL HEADER in each
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * If applicable, add the following below this CDDL HEADER, with the
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * fields enclosed by brackets "[]" replaced with your own identifying
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * information: Portions Copyright [yyyy] [name of copyright owner]
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * CDDL HEADER END
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross * Dispatch function for SMB2_QUERY_INFO
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Rosssmb2_qinfo_quota(smb_request_t *sr, smb_queryinfo_t *qi)
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross if (!smb_tree_has_feature(sr->tid_tree, SMB_TREE_QUOTA))
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross /* reserved .. */
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross request.qq_root_path = kmem_zalloc(MAXPATHLEN, KM_SLEEP);
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross if (smb_node_getmntpath(tnode, request.qq_root_path, MAXPATHLEN) != 0) {
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross else if (startsidlen != 0)
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross status = smb_quota_init_sids(&sr->smb_data, &request, ofile);
a90cf9f29973990687fa61de9f1f6ea22e924e40Gordon Ross if (smb_quota_query(sr->sr_server, &request, &reply) != 0) {