From owner-freebsd-bugs@FreeBSD.ORG Mon Oct 1 03:00:22 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 389631065689 for ; Mon, 1 Oct 2012 03:00:22 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0EC3B8FC1F for ; Mon, 1 Oct 2012 03:00:22 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q9130LSJ065506 for ; Mon, 1 Oct 2012 03:00:21 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q9130Lue065505; Mon, 1 Oct 2012 03:00:21 GMT (envelope-from gnats) Resent-Date: Mon, 1 Oct 2012 03:00:21 GMT Resent-Message-Id: <201210010300.q9130Lue065505@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Derek Kulinski Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50CAC1065672 for ; Mon, 1 Oct 2012 02:59:10 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 2364C8FC1D for ; Mon, 1 Oct 2012 02:59:10 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q912x99q050108 for ; Mon, 1 Oct 2012 02:59:09 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id q912x9vn050107; Mon, 1 Oct 2012 02:59:09 GMT (envelope-from nobody) Message-Id: <201210010259.q912x9vn050107@red.freebsd.org> Date: Mon, 1 Oct 2012 02:59:09 GMT From: Derek Kulinski To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/172197: Userquota (as well as groupquota) does not work on ZFS (possible regression) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 03:00:22 -0000 >Number: 172197 >Category: kern >Synopsis: Userquota (as well as groupquota) does not work on ZFS (possible regression) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 01 03:00:21 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Derek Kulinski >Release: FreeBSD 9.0 >Organization: >Environment: FreeBSD chinatsu.takeda.tk 9.0-RELEASE-p4 FreeBSD 9.0-RELEASE-p4 #2: Sun Sep 30 17:10:32 PDT 2012 root@chinatsu.takeda.tk:/usr/obj/tank/junk/src/sys/CHINATSU amd64 >Description: I actually just started uzing ZFS since version 9 and seeing some communication on mailing lists, looks like this behavior is incorrect. Here's an example: [chinatsu]:/root# zfs userspace tank TYPE NAME USED QUOTA POSIX User root 6K none [chinatsu]:/root# zfs set userquota@takeda=5M tank [chinatsu]:/root# zfs userspace tank TYPE NAME USED QUOTA POSIX User root 6K none POSIX User takeda 5M Please note that the above command updated USED value and not quota. As I show later the USED value is not updated based on storage usage and the quota is not enforced at all. I don't think it is necessary, but I also compiled the kernel with "options QUOTA". [chinatsu]:/root# zfs set userquota@takeda=100M tank [chinatsu]:/root# zfs userspace tank TYPE NAME USED QUOTA POSIX User root 6K none POSIX User takeda 100M [chinatsu]:/root# zfs set userquota@takeda=1000P tank [chinatsu]:/root# zfs userspace tank TYPE NAME USED QUOTA POSIX User root 6K none POSIX User takeda 1000P [chinatsu]:/root# zfs set userquota@takeda=1M tank [chinatsu]:/root# su - takeda ➜ ~ dd if=/dev/urandom bs=512k count=10 of=testfile1 10+0 records in 10+0 records out 5242880 bytes transferred in 0.433006 secs (12108105 bytes/sec) ➜ ~ dd if=/dev/urandom bs=512k count=10 of=testfile2 10+0 records in 10+0 records out 5242880 bytes transferred in 0.072985 secs (71835100 bytes/sec) ➜ ~ ls -lh testfile* -rw-r--r-- 1 takeda users 5,0M 30 wrz 19:50 testfile1 -rw-r--r-- 1 takeda users 5,0M 30 wrz 19:50 testfile2 ➜ ~ [chinatsu]:/root# zfs userspace tank TYPE NAME USED QUOTA POSIX User root 6K none POSIX User takeda 1M >How-To-Repeat: Perform the steps described in description. >Fix: I know too little to recommend anything. >Release-Note: >Audit-Trail: >Unformatted: