From owner-freebsd-fs@FreeBSD.ORG Sun Apr 1 21:06:17 2012 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D31181065672; Sun, 1 Apr 2012 21:06:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id ED4AA8FC19; Sun, 1 Apr 2012 21:06:16 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA16068; Mon, 02 Apr 2012 00:06:08 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SERyS-000DEq-FQ; Mon, 02 Apr 2012 00:06:08 +0300 Message-ID: <4F78C33D.7080708@FreeBSD.org> Date: Mon, 02 Apr 2012 00:06:05 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.2) Gecko/20120218 Thunderbird/10.0.2 MIME-Version: 1.0 To: Edward Tomasz Napierala X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=X-VIET-VPS Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org Subject: ls NFSv4 is not perfect X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Apr 2012 21:06:17 -0000 It seems that aclmode() function in bin/ls/print.c caches ACL support properties of a filesystem. Unfortunately this optimization doesn't always work. An example: a UFS directory unionfs-mounted over ZFS directory. Files that reside in ZFS and are not shadowed by UFS do have ACL_NFS4 stuff, files in UFS don't have it. An example of ls -l behavior in this case: -rw-r--r-- 1 mrtg mrtg 3881 1 Apr 06:55 corevoltages-year.png -rw-r--r-- 1 mrtg mrtg 5605 1 Apr 06:55 userload-year.png -rw-r--r-- 1 mrtg mrtg 2782 1 Apr 06:55 uptime-year.png ls: /var/www/stats/mrtg/cpufreq.old: Operation not supported -rw-r--r-- 1 mrtg mrtg 61200 1 Apr 23:00 cpufreq.old ls: /var/www/stats/mrtg/irqrate.old: Operation not supported -rw-r--r-- 1 mrtg mrtg 55538 1 Apr 23:00 irqrate.old ls: /var/www/stats/mrtg/cpuload.old: Operation not supported -rw-r--r-- 1 mrtg mrtg 58826 1 Apr 23:00 cpuload.old ls: /var/www/stats/mrtg/cpuload2.old: Operation not supported The older files are in ZFS, the newer are in UFS. ktrace, just in case: CALL __acl_get_link(0x7fffffffc180,ACL_TYPE_NFS4,0x801186000) NAMI "/var/www/stats/mrtg/uptime.html" RET __acl_get_link 0 CALL write(0x1,0x8010be000,0x3b) ... CALL __acl_get_link(0x7fffffffc180,ACL_TYPE_NFS4,0x801186000) NAMI "/var/www/stats/mrtg/xxx" RET __acl_get_link -1 errno 45 Operation not supported Not sure what's the best approach here. Maybe just silence this particular error code? P.S. I know, an untypical case :-) -- Andriy Gapon