From owner-freebsd-fs@FreeBSD.ORG Sun Nov 9 21:00:06 2014 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4AACC81 for ; Sun, 9 Nov 2014 21:00:06 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA4558E for ; Sun, 9 Nov 2014 21:00:06 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sA9L06dt054115 for ; Sun, 9 Nov 2014 21:00:06 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <201411092100.sA9L06dt054115@kenobi.freebsd.org> From: bugzilla-noreply@FreeBSD.org To: freebsd-fs@FreeBSD.org Subject: Problem reports for freebsd-fs@FreeBSD.org that need special attention X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 Date: Sun, 09 Nov 2014 21:00:06 +0000 Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2014 21:00:06 -0000 To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status | Bug Id | Description ----------------+-----------+------------------------------------------------- Needs MFC | 136470 | [nfs] Cannot mount / in read-only, over NFS Needs MFC | 139651 | [nfs] mount(8): read-only remount of NFS volume Needs MFC | 144447 | [zfs] sharenfs fsunshare() & fsshare_main() non 3 problems total for which you should take action. From owner-freebsd-fs@FreeBSD.ORG Mon Nov 10 06:37:31 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50A90C89 for ; Mon, 10 Nov 2014 06:37:31 +0000 (UTC) Received: from maildrop31.somerville.occnc.com (maildrop31.somerville.occnc.com [IPv6:2001:550:3800:203::3131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22F8E15D for ; Mon, 10 Nov 2014 06:37:30 +0000 (UTC) Received: from harbor31.somerville.occnc.com (harbor31.somerville.occnc.com [IPv6:2001:550:3800:203::3231]) (authenticated bits=128) by maildrop31.somerville.occnc.com (8.14.9/8.14.9) with ESMTP id sAA6bJnR051011; Mon, 10 Nov 2014 01:37:20 -0500 (EST) (envelope-from curtis@ipv6.occnc.com) Message-Id: <201411100637.sAA6bJnR051011@maildrop31.somerville.occnc.com> To: freebsd-fs@freebsd.org Reply-To: curtis@ipv6.occnc.com Subject: zpool create on md hangs From: Curtis Villamizar MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <51009.1415601439.1@harbor31.somerville.occnc.com> Date: Mon, 10 Nov 2014 01:37:19 -0500 X-Spam-Status: No, score=-101.5 required=5.0 tests=ALL_TRUSTED,MISSING_MID, RP_MATCHES_RCVD,USER_IN_WHITELIST autolearn=unavailable autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on maildrop31.somerville.occnc.com Cc: curtis@ipv6.occnc.com X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2014 06:37:31 -0000 The following shell program produces a hang. Its reproducible (hangs every time). #!sh set -e set -x truncate -s `expr 10 \* 1024 \* 1024 \* 1024` /image-file md_unit=`mdconfig -a -n -t vnode -f /image-file` echo "md device is /dev/md$md_unit" zpool create test md$md_unit The zpool command hangs. Kill or kill -9 has no effect. All filesystems are unaffected but any other zpool or zfs command will hang and be unkillable. A reboot is needed. This is running on: FreeBSD 10.0-STABLE (GENERIC) #0 r270645: Wed Aug 27 00:54:29 EDT 2014 When I get a chance, I will try again with a 10.1 RC3 kernel I recently built. If this still doesn't work, I'll build an r11 kernel since the code differs from 10.1, not having the svm code merged in. I'm asking before poking around further in case anyone has insights into why this might happen. BTW- The reason to create a zfs filesystem on an vnode type md is to create an image that can run under bhyve using a zfs root fs. This works quite nicely for combinations geom types (gmirror, gstripe, gjournal, gcache) but zpool hangs when trying this with zfs. Curtis ps- please keep me on the Cc as I'm not subscribed to freebsd-fs. From owner-freebsd-fs@FreeBSD.ORG Mon Nov 10 06:48:14 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34C16E7A for ; Mon, 10 Nov 2014 06:48:14 +0000 (UTC) Received: from mail-la0-x229.google.com (mail-la0-x229.google.com [IPv6:2a00:1450:4010:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A63F026B for ; Mon, 10 Nov 2014 06:48:13 +0000 (UTC) Received: by mail-la0-f41.google.com with SMTP id s18so7221556lam.0 for ; Sun, 09 Nov 2014 22:48:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=p1g0u2t9NKI38i855OEr7QqZ/sxsMEok8GUGP6fTr4g=; b=IePiYiv4wd0h5z84xVGn+t2//dH+YYbCZusjvPsNmR6zB/h7OPwxZwnI4cHVD9IehA 0lAioJR0MqwHHUiqSu8fN6aI7Pdyc6vfhpUmj5b5PnCArLsEEtz4gWVXzz3hmETU0CtQ RO1Bz3GcAnEmju6uUBhcTlzaxatdiBFw80SnaENe5BJr1aZIZBOpPQr/0hnYT2VzyM64 w2u0/aavWtEFVos9XvUHxVar+bSV+b/cI6ijkZlsxBudYUnUh9N2BGh/LwiA7gEH/76A e345oHfAM9JPp6yFGIW63dPez1Y8MP3WmKwqgy4C8Tuxnypf1z0iQxgSI036Gg1Oiywe x+0Q== MIME-Version: 1.0 X-Received: by 10.152.27.38 with SMTP id q6mr406031lag.92.1415602090683; Sun, 09 Nov 2014 22:48:10 -0800 (PST) Received: by 10.25.78.134 with HTTP; Sun, 9 Nov 2014 22:48:10 -0800 (PST) In-Reply-To: <201411100637.sAA6bJnR051011@maildrop31.somerville.occnc.com> References: <201411100637.sAA6bJnR051011@maildrop31.somerville.occnc.com> Date: Mon, 10 Nov 2014 07:48:10 +0100 Message-ID: Subject: Re: zpool create on md hangs From: Andreas Nilsson To: curtis@ipv6.occnc.com Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-fs@freebsd.org" X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2014 06:48:14 -0000 On Mon, Nov 10, 2014 at 7:37 AM, Curtis Villamizar wrote: > The following shell program produces a hang. Its reproducible (hangs > every time). > > #!sh > > set -e > set -x > > truncate -s `expr 10 \* 1024 \* 1024 \* 1024` /image-file > md_unit=`mdconfig -a -n -t vnode -f /image-file` > echo "md device is /dev/md$md_unit" > zpool create test md$md_unit > > The zpool command hangs. Kill or kill -9 has no effect. All > filesystems are unaffected but any other zpool or zfs command will > hang and be unkillable. A reboot is needed. > > This is running on: > > FreeBSD 10.0-STABLE (GENERIC) #0 r270645: Wed Aug 27 00:54:29 EDT 2014 > > When I get a chance, I will try again with a 10.1 RC3 kernel I > recently built. If this still doesn't work, I'll build an r11 kernel > since the code differs from 10.1, not having the svm code merged in. > I'm asking before poking around further in case anyone has insights > into why this might happen. > > BTW- The reason to create a zfs filesystem on an vnode type md is to > create an image that can run under bhyve using a zfs root fs. This > works quite nicely for combinations geom types (gmirror, gstripe, > gjournal, gcache) but zpool hangs when trying this with zfs. > > Curtis > > ps- please keep me on the Cc as I'm not subscribed to freebsd-fs. > Freezes here on 10.1-RC2-p1 (amd64) as well. ^T says: load: 0.21 cmd: zpool 74063 [zio->io_cv] 8.84r 0.00u 0.00s 0% 3368k Best regards Andreas From owner-freebsd-fs@FreeBSD.ORG Mon Nov 10 08:00:09 2014 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6FC6DCC for ; Mon, 10 Nov 2014 08:00:09 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5901BCD for ; Mon, 10 Nov 2014 08:00:09 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sAA809dg053905 for ; Mon, 10 Nov 2014 08:00:09 GMT (envelope-from bugzilla-noreply@freebsd.org) Message-Id: <201411100800.sAA809dg053905@kenobi.freebsd.org> From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [FreeBSD Bugzilla] Commit Needs MFC MIME-Version: 1.0 X-Bugzilla-Type: whine X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated Date: Mon, 10 Nov 2014 08:00:09 +0000 Content-Type: text/plain X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2014 08:00:09 -0000 Hi, You have a bug in the "Needs MFC" state which has not been touched in 7 or more days. This email serves as a reminder that you may want to MFC this bug or marked it as completed. In the event you have a longer MFC timeout you may update this bug with a comment and I won't remind you again for 7 days. This reminder is only sent on Mondays. Please file a bug about concerns you may have. This search was scheduled by eadler@FreeBSD.org. (3 bugs) Bug 136470: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=136470 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-fs@FreeBSD.org Status: Needs MFC Resolution: Summary: [nfs] Cannot mount / in read-only, over NFS Bug 139651: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=139651 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-fs@FreeBSD.org Status: Needs MFC Resolution: Summary: [nfs] mount(8): read-only remount of NFS volume does not work Bug 144447: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=144447 Severity: Affects Only Me Priority: Normal Hardware: Any Assignee: freebsd-fs@FreeBSD.org Status: Needs MFC Resolution: Summary: [zfs] sharenfs fsunshare() & fsshare_main() non functional From owner-freebsd-fs@FreeBSD.ORG Mon Nov 10 09:32:56 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9424D328 for ; Mon, 10 Nov 2014 09:32:56 +0000 (UTC) Received: from mail-la0-x22d.google.com (mail-la0-x22d.google.com [IPv6:2a00:1450:4010:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 131FA7FD for ; Mon, 10 Nov 2014 09:32:56 +0000 (UTC) Received: by mail-la0-f45.google.com with SMTP id pn19so7252989lab.4 for ; Mon, 10 Nov 2014 01:32:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=5yr8X0kDCyrAnjf1wQEOdmVMpsrRb6LMaUKE0le+4vI=; b=blQB+fAJayF9soMcR4+bpjyeZ5FAFVJWSHmFMlqLs4bv/wNxsCox4Dp7cnCeQMSkh5 eZn23+NgELceiaHw92osJiRA48DWTyHIi9GLQ/FcCrltqVilaoKV2IJyQaPq4khyaTIs IueF5EXr/RTfJr9ZmFHEJ40b/Nb4DXtI7sS3ox4htudn43qessJKPeNqQeLIuLlpj87d xNnuxwTp1IjDxRvwjHX0JReBRYyi+TO5uWSVzrQHQJ/poNQJO4u9iw6opCVnJX2SsKok gNk3jmLBG/nJoBC10XDOLu5i7iKKt64PutynF6HzZkcawEAwkfbAd+Hyk2jiK0h95+BO 5viQ== MIME-Version: 1.0 X-Received: by 10.113.5.7 with SMTP id ci7mr28822363lbd.9.1415611974215; Mon, 10 Nov 2014 01:32:54 -0800 (PST) Received: by 10.25.78.134 with HTTP; Mon, 10 Nov 2014 01:32:54 -0800 (PST) In-Reply-To: <546084FE.80300@multiplay.co.uk> References: <201411100637.sAA6bJnR051011@maildrop31.somerville.occnc.com> <546084FE.80300@multiplay.co.uk> Date: Mon, 10 Nov 2014 10:32:54 +0100 Message-ID: Subject: Re: zpool create on md hangs From: Andreas Nilsson To: Steven Hartland Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-fs@freebsd.org" , curtis@ipv6.occnc.com X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2014 09:32:56 -0000 On Mon, Nov 10, 2014 at 10:27 AM, Steven Hartland wrote: > > On 10/11/2014 06:48, Andreas Nilsson wrote: > >> On Mon, Nov 10, 2014 at 7:37 AM, Curtis Villamizar > > >> wrote: >> >> The following shell program produces a hang. Its reproducible (hangs >>> every time). >>> >>> #!sh >>> >>> set -e >>> set -x >>> >>> truncate -s `expr 10 \* 1024 \* 1024 \* 1024` /image-file >>> md_unit=`mdconfig -a -n -t vnode -f /image-file` >>> echo "md device is /dev/md$md_unit" >>> zpool create test md$md_unit >>> >>> The zpool command hangs. Kill or kill -9 has no effect. All >>> filesystems are unaffected but any other zpool or zfs command will >>> hang and be unkillable. A reboot is needed. >>> >>> This is running on: >>> >>> FreeBSD 10.0-STABLE (GENERIC) #0 r270645: Wed Aug 27 00:54:29 EDT >>> 2014 >>> >>> When I get a chance, I will try again with a 10.1 RC3 kernel I >>> recently built. If this still doesn't work, I'll build an r11 kernel >>> since the code differs from 10.1, not having the svm code merged in. >>> I'm asking before poking around further in case anyone has insights >>> into why this might happen. >>> >>> BTW- The reason to create a zfs filesystem on an vnode type md is to >>> create an image that can run under bhyve using a zfs root fs. This >>> works quite nicely for combinations geom types (gmirror, gstripe, >>> gjournal, gcache) but zpool hangs when trying this with zfs. >>> >>> Curtis >>> >>> ps- please keep me on the Cc as I'm not subscribed to freebsd-fs. >>> >>> Freezes here on 10.1-RC2-p1 (amd64) as well. >> ^T says: >> load: 0.21 cmd: zpool 74063 [zio->io_cv] 8.84r 0.00u 0.00s 0% 3368k >> >> I suspect your just seeing the delay as it trim's the file and it will > complete in time. > > Try setting vfs.zfs.vdev.trim_on_init=0 before running the create and see > if it completes quickly after that. > > I tested this on HEAD and confirmed it was the case there. > > Regards > Steve > Sure enough, it has since completed on my box at least. Best regards Andreas From owner-freebsd-fs@FreeBSD.ORG Mon Nov 10 09:49:45 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD3C9A12 for ; Mon, 10 Nov 2014 09:49:45 +0000 (UTC) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 51C07971 for ; Mon, 10 Nov 2014 09:49:45 +0000 (UTC) Received: by mail-wg0-f50.google.com with SMTP id z12so8229490wgg.9 for ; Mon, 10 Nov 2014 01:49:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=HdiXSAtsL4hP5w7iZykQX98lhGDhgUs162pqVOK9cM8=; b=h8YWhp0kKUmS4aKXVRdNa1R1DD66/Z8GCVkvXa6wvNdDVvX36Ux2vQ2kcNDMiN8jDm g24mMk67rW3IAypFAW/Jqjxb05tGAcZG29Q8k0+PFm21PjsgKmxbuDCwjJe8mOoD3uhO bf5ZV+d3mYFbQxiky+gKr1571LHvveZCRSMVTQEpj68ph3+7ZwbxAAUicuSrlb3pF6gz imfHLKFL6knBSF7mi++adeToLKpf5pl+1wIir9DhYB9CQMmALu+HdDJHmPF6YGiTpSsp o4nA3i33o5wXkLDBwHsjNbRuDgEeOOFvdGkQiOZGP2q+WP2pnOtnKlobDhpj8MFEfXlG VfsQ== X-Gm-Message-State: ALoCoQk3L4T6YY1LImVk9UrGkh62SNduGvaVzPwTaCrhE5Zd/DpMADDIBAP9HcQQ9zZdoPzlzyoh X-Received: by 10.181.27.230 with SMTP id jj6mr9611026wid.15.1415611629191; Mon, 10 Nov 2014 01:27:09 -0800 (PST) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id t16sm16880316wjr.28.2014.11.10.01.27.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Nov 2014 01:27:08 -0800 (PST) Message-ID: <546084FE.80300@multiplay.co.uk> Date: Mon, 10 Nov 2014 09:27:26 +0000 From: Steven Hartland User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Andreas Nilsson , curtis@ipv6.occnc.com Subject: Re: zpool create on md hangs References: <201411100637.sAA6bJnR051011@maildrop31.somerville.occnc.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-fs@freebsd.org" X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2014 09:49:45 -0000 On 10/11/2014 06:48, Andreas Nilsson wrote: > On Mon, Nov 10, 2014 at 7:37 AM, Curtis Villamizar > wrote: > >> The following shell program produces a hang. Its reproducible (hangs >> every time). >> >> #!sh >> >> set -e >> set -x >> >> truncate -s `expr 10 \* 1024 \* 1024 \* 1024` /image-file >> md_unit=`mdconfig -a -n -t vnode -f /image-file` >> echo "md device is /dev/md$md_unit" >> zpool create test md$md_unit >> >> The zpool command hangs. Kill or kill -9 has no effect. All >> filesystems are unaffected but any other zpool or zfs command will >> hang and be unkillable. A reboot is needed. >> >> This is running on: >> >> FreeBSD 10.0-STABLE (GENERIC) #0 r270645: Wed Aug 27 00:54:29 EDT 2014 >> >> When I get a chance, I will try again with a 10.1 RC3 kernel I >> recently built. If this still doesn't work, I'll build an r11 kernel >> since the code differs from 10.1, not having the svm code merged in. >> I'm asking before poking around further in case anyone has insights >> into why this might happen. >> >> BTW- The reason to create a zfs filesystem on an vnode type md is to >> create an image that can run under bhyve using a zfs root fs. This >> works quite nicely for combinations geom types (gmirror, gstripe, >> gjournal, gcache) but zpool hangs when trying this with zfs. >> >> Curtis >> >> ps- please keep me on the Cc as I'm not subscribed to freebsd-fs. >> > Freezes here on 10.1-RC2-p1 (amd64) as well. > ^T says: > load: 0.21 cmd: zpool 74063 [zio->io_cv] 8.84r 0.00u 0.00s 0% 3368k > I suspect your just seeing the delay as it trim's the file and it will complete in time. Try setting vfs.zfs.vdev.trim_on_init=0 before running the create and see if it completes quickly after that. I tested this on HEAD and confirmed it was the case there. Regards Steve From owner-freebsd-fs@FreeBSD.ORG Mon Nov 10 17:18:01 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A41E56F for ; Mon, 10 Nov 2014 17:18:01 +0000 (UTC) Received: from webmail2.jnielsen.net (webmail2.jnielsen.net [50.114.224.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "webmail2.jnielsen.net", Issuer "freebsdsolutions.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C356F59 for ; Mon, 10 Nov 2014 17:18:00 +0000 (UTC) Received: from [10.10.1.196] (office.betterlinux.com [199.58.199.60]) (authenticated bits=0) by webmail2.jnielsen.net (8.14.9/8.14.9) with ESMTP id sAAHHoMU000810 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 10 Nov 2014 10:17:54 -0700 (MST) (envelope-from lists@jnielsen.net) X-Authentication-Warning: webmail2.jnielsen.net: Host office.betterlinux.com [199.58.199.60] claimed to be [10.10.1.196] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: zpool create on md hangs From: John Nielsen In-Reply-To: Date: Mon, 10 Nov 2014 10:17:57 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <1DCE4DFC-45E9-491E-B6E5-77F328979A3B@jnielsen.net> References: <201411100637.sAA6bJnR051011@maildrop31.somerville.occnc.com> <546084FE.80300@multiplay.co.uk> To: Steven Hartland X-Mailer: Apple Mail (2.1990.1) Cc: "freebsd-fs@freebsd.org" X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2014 17:18:01 -0000 On Nov 10, 2014, at 2:32 AM, Andreas Nilsson wrote: >=20 > On Mon, Nov 10, 2014 at 10:27 AM, Steven Hartland = > wrote: >=20 >>=20 >> On 10/11/2014 06:48, Andreas Nilsson wrote: >>=20 >>> On Mon, Nov 10, 2014 at 7:37 AM, Curtis Villamizar = >>>=20 >>> wrote: >>>=20 >>> The following shell program produces a hang. Its reproducible = (hangs >>>> every time). >>>>=20 >>>> #!sh >>>>=20 >>>> set -e >>>> set -x >>>>=20 >>>> truncate -s `expr 10 \* 1024 \* 1024 \* 1024` /image-file >>>> md_unit=3D`mdconfig -a -n -t vnode -f /image-file` >>>> echo "md device is /dev/md$md_unit" >>>> zpool create test md$md_unit >>>>=20 >>>> The zpool command hangs. Kill or kill -9 has no effect. All >>>> filesystems are unaffected but any other zpool or zfs command will >>>> hang and be unkillable. A reboot is needed. >>>>=20 >>>> This is running on: >>>>=20 >>>> FreeBSD 10.0-STABLE (GENERIC) #0 r270645: Wed Aug 27 00:54:29 = EDT >>>> 2014 >>>>=20 >>>> When I get a chance, I will try again with a 10.1 RC3 kernel I >>>> recently built. If this still doesn't work, I'll build an r11 = kernel >>>> since the code differs from 10.1, not having the svm code merged = in. >>>> I'm asking before poking around further in case anyone has insights >>>> into why this might happen. >>>>=20 >>>> BTW- The reason to create a zfs filesystem on an vnode type md is = to >>>> create an image that can run under bhyve using a zfs root fs. This >>>> works quite nicely for combinations geom types (gmirror, gstripe, >>>> gjournal, gcache) but zpool hangs when trying this with zfs. >>>>=20 >>>> Curtis >>>>=20 >>>> ps- please keep me on the Cc as I'm not subscribed to freebsd-fs. >>>>=20 >>>> Freezes here on 10.1-RC2-p1 (amd64) as well. >>> ^T says: >>> load: 0.21 cmd: zpool 74063 [zio->io_cv] 8.84r 0.00u 0.00s 0% 3368k >>>=20 >>> I suspect your just seeing the delay as it trim's the file and it = will >> complete in time. >>=20 >> Try setting vfs.zfs.vdev.trim_on_init=3D0 before running the create = and see >> if it completes quickly after that. >>=20 >> I tested this on HEAD and confirmed it was the case there. >>=20 >> Regards >> Steve >>=20 >=20 > Sure enough, it has since completed on my box at least. Thanks! I've wondered why it always took so long to create zpools for VM = images. JN From owner-freebsd-fs@FreeBSD.ORG Mon Nov 10 22:16:56 2014 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1650B0E for ; Mon, 10 Nov 2014 22:16:56 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9AF3361 for ; Mon, 10 Nov 2014 22:16:56 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sAAMGu6h001986 for ; Mon, 10 Nov 2014 22:16:56 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 188187] [zfs] [panic] 10-stable: Kernel panic on zpool import: integer divide fault Date: Mon, 10 Nov 2014 22:16:56 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: danm@vivocore.com X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2014 22:16:57 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D188187 --- Comment #6 from Dan Milgram --- Sorry, I=E2=80=99m not sure how to do that as I have a ZFS on root install.= The kernel panic happens immediately upon trying to mount the filesystem during startu= p. When booting from an OpenIndiana live CD, the kernel panics too. Also, inserting the hard drives into another computer produces the same outcome. If you have any tips with respect to providing debugging info, or data reco= very from the pool :), please let me know. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@FreeBSD.ORG Mon Nov 10 22:51:06 2014 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 478D549B for ; Mon, 10 Nov 2014 22:51:06 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 165A296C for ; Mon, 10 Nov 2014 22:51:06 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sAAMp59k065308 for ; Mon, 10 Nov 2014 22:51:05 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 188187] [zfs] [panic] 10-stable: Kernel panic on zpool import: integer divide fault Date: Mon, 10 Nov 2014 22:51:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: smh@FreeBSD.org X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2014 22:51:06 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188187 --- Comment #7 from Steven Hartland --- Created attachment 149271 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=149271&action=edit early dump dev If you can build a kernel on another machine you can use this patch to allow you to configure the dump device via a tunable which will available prior to mounting root. >From the loader prompt run: set kern.shutdown.dumpdev_early= e.g. set kern.shutdown.dumpdev_early=/dev/ada0p3 This should be set to either an empty partition / disk or your swap partition. After that boot using: boot It will go through the usual process but should also dump the panic to the device listed above. Once you have the panic on disk you will need to boot with something like mfsbsd (which doesn't panic). After booted edit /etc/rc.conf and add: dumpdev="AUTO" Then run: /etc/rc.d/dumpon start If the kernel your running is not the same as the kernel which created the dump ensure you copy that kernel to /boot/kernel/ including all symbols. Now run: /etc/rc.d/savecore start This will copy the crash off the dump device to /var/crash/ and perform a trace on it which you can copy off along with the kernel to perform additional debugging on. Additional info which may well be helpful is the output from: zdb -l e.g. zdb -l /dev/ada0p2 Hope this all make sense. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-fs@FreeBSD.ORG Mon Nov 10 22:56:45 2014 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAC74573 for ; Mon, 10 Nov 2014 22:56:45 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A32519A7 for ; Mon, 10 Nov 2014 22:56:45 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sAAMujZh095580 for ; Mon, 10 Nov 2014 22:56:45 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 188187] [zfs] [panic] 10-stable: Kernel panic on zpool import: integer divide fault Date: Mon, 10 Nov 2014 22:56:45 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: smh@FreeBSD.org X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2014 22:56:45 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188187 --- Comment #8 from Steven Hartland --- Correction the set line shouldn't include /dev/ e.g. set kern.shutdown.dumpdev_early=ada0p3 -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-fs@FreeBSD.ORG Mon Nov 10 23:09:55 2014 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45C356C0 for ; Mon, 10 Nov 2014 23:09:55 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2773BAB2 for ; Mon, 10 Nov 2014 23:09:55 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sAAN9t49044007 for ; Mon, 10 Nov 2014 23:09:55 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 188187] [zfs] [panic] 10-stable: Kernel panic on zpool import: integer divide fault Date: Mon, 10 Nov 2014 23:09:55 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: danm@vivocore.com X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2014 23:09:55 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188187 --- Comment #9 from Dan Milgram --- I will try to get the first part done tomorrow. Second part (i.e. zdb -l output) is a little easier so here it is: root@:~ # zpool import pool: zroot id: 8676718972300662759 state: ONLINE status: The pool was last accessed by another system. action: The pool can be imported using its name or numeric identifier and the '-f' flag. see: http://illumos.org/msg/ZFS-8000-EY config: zroot ONLINE mirror-0 ONLINE gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a ONLINE gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a ONLINE root@:~ # zdb -l /dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a -------------------------------------------- LABEL 0 -------------------------------------------- version: 5000 name: 'zroot' state: 0 txg: 54060 pool_guid: 8676718972300662759 hostid: 4131752584 hostname: '' top_guid: 8851846128134668664 guid: 12362166153701700454 vdev_children: 1 vdev_tree: type: 'mirror' id: 0 guid: 8851846128134668664 metaslab_array: 33 metaslab_shift: 32 ashift: 12 asize: 495807365120 is_log: 0 create_txg: 4 children[0]: type: 'disk' id: 0 guid: 12362166153701700454 path: '/dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a' phys_path: '/dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a' whole_disk: 1 create_txg: 4 children[1]: type: 'disk' id: 1 guid: 497212309658488509 path: '/dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a' phys_path: '/dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a' whole_disk: 1 create_txg: 4 features_for_read: -------------------------------------------- LABEL 1 -------------------------------------------- version: 5000 name: 'zroot' state: 0 txg: 54060 pool_guid: 8676718972300662759 hostid: 4131752584 hostname: '' top_guid: 8851846128134668664 guid: 12362166153701700454 vdev_children: 1 vdev_tree: type: 'mirror' id: 0 guid: 8851846128134668664 metaslab_array: 33 metaslab_shift: 32 ashift: 12 asize: 495807365120 is_log: 0 create_txg: 4 children[0]: type: 'disk' id: 0 guid: 12362166153701700454 path: '/dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a' phys_path: '/dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a' whole_disk: 1 create_txg: 4 children[1]: type: 'disk' id: 1 guid: 497212309658488509 path: '/dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a' phys_path: '/dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a' whole_disk: 1 create_txg: 4 features_for_read: -------------------------------------------- LABEL 2 -------------------------------------------- version: 5000 name: 'zroot' state: 0 txg: 54060 pool_guid: 8676718972300662759 hostid: 4131752584 hostname: '' top_guid: 8851846128134668664 guid: 12362166153701700454 vdev_children: 1 vdev_tree: type: 'mirror' id: 0 guid: 8851846128134668664 metaslab_array: 33 metaslab_shift: 32 ashift: 12 asize: 495807365120 is_log: 0 create_txg: 4 children[0]: type: 'disk' id: 0 guid: 12362166153701700454 path: '/dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a' phys_path: '/dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a' whole_disk: 1 create_txg: 4 children[1]: type: 'disk' id: 1 guid: 497212309658488509 path: '/dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a' phys_path: '/dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a' whole_disk: 1 create_txg: 4 features_for_read: -------------------------------------------- LABEL 3 -------------------------------------------- version: 5000 name: 'zroot' state: 0 txg: 54060 pool_guid: 8676718972300662759 hostid: 4131752584 hostname: '' top_guid: 8851846128134668664 guid: 12362166153701700454 vdev_children: 1 vdev_tree: type: 'mirror' id: 0 guid: 8851846128134668664 metaslab_array: 33 metaslab_shift: 32 ashift: 12 asize: 495807365120 is_log: 0 create_txg: 4 children[0]: type: 'disk' id: 0 guid: 12362166153701700454 path: '/dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a' phys_path: '/dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a' whole_disk: 1 create_txg: 4 children[1]: type: 'disk' id: 1 guid: 497212309658488509 path: '/dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a' phys_path: '/dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a' whole_disk: 1 create_txg: 4 features_for_read: root@:~ # zdb -l /dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a -------------------------------------------- LABEL 0 -------------------------------------------- version: 5000 name: 'zroot' state: 0 txg: 54060 pool_guid: 8676718972300662759 hostid: 4131752584 hostname: '' top_guid: 8851846128134668664 guid: 497212309658488509 vdev_children: 1 vdev_tree: type: 'mirror' id: 0 guid: 8851846128134668664 metaslab_array: 33 metaslab_shift: 32 ashift: 12 asize: 495807365120 is_log: 0 create_txg: 4 children[0]: type: 'disk' id: 0 guid: 12362166153701700454 path: '/dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a' phys_path: '/dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a' whole_disk: 1 create_txg: 4 children[1]: type: 'disk' id: 1 guid: 497212309658488509 path: '/dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a' phys_path: '/dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a' whole_disk: 1 create_txg: 4 features_for_read: -------------------------------------------- LABEL 1 -------------------------------------------- version: 5000 name: 'zroot' state: 0 txg: 54060 pool_guid: 8676718972300662759 hostid: 4131752584 hostname: '' top_guid: 8851846128134668664 guid: 497212309658488509 vdev_children: 1 vdev_tree: type: 'mirror' id: 0 guid: 8851846128134668664 metaslab_array: 33 metaslab_shift: 32 ashift: 12 asize: 495807365120 is_log: 0 create_txg: 4 children[0]: type: 'disk' id: 0 guid: 12362166153701700454 path: '/dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a' phys_path: '/dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a' whole_disk: 1 create_txg: 4 children[1]: type: 'disk' id: 1 guid: 497212309658488509 path: '/dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a' phys_path: '/dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a' whole_disk: 1 create_txg: 4 features_for_read: -------------------------------------------- LABEL 2 -------------------------------------------- version: 5000 name: 'zroot' state: 0 txg: 54060 pool_guid: 8676718972300662759 hostid: 4131752584 hostname: '' top_guid: 8851846128134668664 guid: 497212309658488509 vdev_children: 1 vdev_tree: type: 'mirror' id: 0 guid: 8851846128134668664 metaslab_array: 33 metaslab_shift: 32 ashift: 12 asize: 495807365120 is_log: 0 create_txg: 4 children[0]: type: 'disk' id: 0 guid: 12362166153701700454 path: '/dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a' phys_path: '/dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a' whole_disk: 1 create_txg: 4 children[1]: type: 'disk' id: 1 guid: 497212309658488509 path: '/dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a' phys_path: '/dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a' whole_disk: 1 create_txg: 4 features_for_read: -------------------------------------------- LABEL 3 -------------------------------------------- version: 5000 name: 'zroot' state: 0 txg: 54060 pool_guid: 8676718972300662759 hostid: 4131752584 hostname: '' top_guid: 8851846128134668664 guid: 497212309658488509 vdev_children: 1 vdev_tree: type: 'mirror' id: 0 guid: 8851846128134668664 metaslab_array: 33 metaslab_shift: 32 ashift: 12 asize: 495807365120 is_log: 0 create_txg: 4 children[0]: type: 'disk' id: 0 guid: 12362166153701700454 path: '/dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a' phys_path: '/dev/gptid/b1f0a207-641c-11e4-b9e7-28924a36bc5a' whole_disk: 1 create_txg: 4 children[1]: type: 'disk' id: 1 guid: 497212309658488509 path: '/dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a' phys_path: '/dev/gptid/b260cfdf-641c-11e4-b9e7-28924a36bc5a' whole_disk: 1 create_txg: 4 features_for_read: -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-fs@FreeBSD.ORG Mon Nov 10 23:27:13 2014 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B715BC06 for ; Mon, 10 Nov 2014 23:27:13 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F40AC6F for ; Mon, 10 Nov 2014 23:27:13 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sAANRD2e091707 for ; Mon, 10 Nov 2014 23:27:13 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 188187] [zfs] [panic] 10-stable: Kernel panic on zpool import: integer divide fault Date: Mon, 10 Nov 2014 23:27:13 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: smh@FreeBSD.org X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2014 23:27:13 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188187 --- Comment #10 from Steven Hartland --- Alternative to applying the patch and building is if you have a recent stable/10 or head you can boot then you can use: set dumpdev= Thanks to emaste for pointing this out. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-fs@FreeBSD.ORG Tue Nov 11 06:09:23 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 760F8298 for ; Tue, 11 Nov 2014 06:09:23 +0000 (UTC) Received: from smtp.new-ukraine.org (smtp.new-ukraine.org [148.251.53.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.new-ukraine.org", Issuer "smtp.new-ukraine.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F378F8A9 for ; Tue, 11 Nov 2014 06:09:21 +0000 (UTC) Received: on behalf of honored client by smtp.new-ukraine.org with ESMTP id sAB698Gv094303 for on Tue, 11 Nov 2014 08:09:09 +0200 (EET) Message-ID: <20141111080903.94302@smtp.new-ukraine.org> Date: Tue, 11 Nov 2014 08:09:03 +0200 From: "Zeus Panchenko" To: cc: Subject: unsupported feature: com.delfix and can't find pool by guid after old STABLE10.0-to-RELENG10.0 upgrade Organization: I.B.S. LLC Reply-To: "Zeus Panchenko" X-Attribution: zeus Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEWxsbGdnZ3U1NQTExN cXFzx8fG/v7+f8hyWAAACXUlEQVQ4jUWSwXYiIRBFi4yyhtjtWpmRdTL0ZC3TJOukDa6Rc+T/P2F eFepwtFvr8upVFVDua8mLWw6La4VIKTuMdAPOebdU55sQs3n/D1xFFPFGVGh4AHKttr5K0bS6g7N ZCge7qpVLB+f1Z2WAj2OKXwIWt/bXpdXSiu8KXbviWkHxF5td9+lg2e3xlI2SCvatK8YLfHyh9lw 15yrad8Va5eXg4Llr7QmAaC+dL9sDt9iad/DX3OKvLMBf+dm0A0QuMrTvYIevSik1IaSVvgjIHt5 lSCG2ynNRpEcBZ8cgDWk+Ns99qzsYYV3MZoppWzGtYlTO9+meG6m/g92iNO9LfQB2JZsMpoJs7QG ku2KtabRK0bZRwDLyBDvwlxTm6ZlP7qyOqLcfqtLexpDSB4M0H3I/PQy1emvjjzgK+A0LmMKl6Lq zlqzh0VGAw440F6MJd8cY0nI7wiF/fVIBGY7UNCAXy6DmfYGCLLI0wtDbVcDUMqtJLmAhLqODQAe riERAxXJ1/QYGpa0ymqyytpKC19MNXHjvFmEsfcHIrncFR4xdbYWgmfEGLCcZokpGbGj1egMR+6M 1BkNX1pDdhPcOXpAnAeLQUwQLYepgQoZVNGS61yaE8CYA7gYAcWKzwGstACY2HTFvvOwk4FXAG/a mKHni/EcA/GkOk7I0IK7UMIf3+SahU8/FJdiE7KcuWdM3MFocUDEEIX9LfJoo4xV5tnNKc3jJuSs SZWgnnhepgU1zN4Hii18yW4RwDX52CXUtk0Hqz6cHOIUkWaX8fDcB+J7y1y2xDHwjv/8Buu8Ekz6 7tXQAAAAASUVORK5CYII= X-Mailer: MH-E 8.3.1; GNU Mailutils 2.99.98; GNU Emacs 24.3.1 MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-NewUkraine-Agent: mailfromd (7.99.92) X-NewUkraine-URL: http://www.ibs.dn.ua/smtp.html X-NewUkraine-VirStat: NO X-NewUkraine-VirScan: ScanPE, ScanELF, ScanOLE2, ScanMail, PhishingSignatures, ScanHTML, ScanPDF X-NewUkraine-SpamStat: NO X-NewUkraine-SpamScore: -1.600 of 3.500 X-NewUkraine-SpamKeys: AWL,BAYES_00,NO_RECEIVED,NO_RELAYS X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 06:09:23 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 greetings, please help me to understand what am I missing ... I "successfully" (built/installed world/kernel without errors) upgraded long time, fine worked root-on-zfs box from 10.0 STABLE (last built in july) to RELENG 10.0, p11 but after reboot, loader complained on unsupported feature: com.delfix:hole_birth and com.delfix:embedded_data when I LiveCD'ed from 10.0 RELEASE image, zpool complained with not all features supported, so I LiveCD'ed from the image 10.1 I was able to see and import (altroot) my zpool after what I performed `gpart bootcode ...' (as it was advised in similar cases I was able to google out) but it didn't help ... after that loader complains with: ZFS: can't find pool by guid though value of vfs.zfs.boot.primary_pool is correct and contains the very guid of my pool ... and in addition: lszfs recognizes no pool lsdev shows no zfs device=20 here, please find IPMI console screenshots (I was unable to find how to grab text): https://www.dropbox.com/sh/khou69n4wgadxy2/AAC9Q7sbLSPCEdB2CzQvmoGLa?dl=3D0 in /boot/loader.conf it is set zfs_load=3D"YES" and in /etc/rc.conf it is set zfs_enable=3D"YES" system was working in production long time before that So, is there any way to fix that and what is it at all? Is it because of sw= itching from stable to releng? I'm giving up in attempts to revive it ... =2D --=20 Zeus V. Panchenko jid:zeus@im.ibs.dn.ua IT Dpt., I.B.S. LLC GMT+2 (EET) =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlRhp/8ACgkQr3jpPg/3oyrFDgCdENI+cN3PCkmwMl8k7YgJIo7v wBEAn2yix0x5DCDmgEG5UZL8KMxNj38r =3D5/Lv =2D----END PGP SIGNATURE----- From owner-freebsd-fs@FreeBSD.ORG Tue Nov 11 07:37:23 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BB12E63 for ; Tue, 11 Nov 2014 07:37:23 +0000 (UTC) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anubis.delphij.net", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 201A2D9 for ; Tue, 11 Nov 2014 07:37:22 +0000 (UTC) Received: from zeta.ixsystems.com (unknown [IPv6:2601:9:7280:1a80:8826:ab4b:7743:11f3]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 5F423230C6; Mon, 10 Nov 2014 23:37:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphij.net; s=anubis; t=1415691442; x=1415705842; bh=8v+qvdgA+ix7Lz4keGWWAOs9WK8AbOb7sDZ0M8mST6s=; h=Date:From:Reply-To:To:Subject:References:In-Reply-To; b=oZwSkE52e87UCRHxbTr4m8B9MpGl91BGhjfm64hJEdr2LNnCQL4atmKKZ9eGNfU4d al3iQ9+KcaNfdv7IJ8Q93Q8ZBIPjytaTUrA6/ZmuH+OAmmE9fp5dFqVZcVKnm7X3Ic N0Zms6cqqlrBiPjAir893nEj0Qgod2Us77zRda9U= Message-ID: <5461BCB1.5030703@delphij.net> Date: Mon, 10 Nov 2014 23:37:21 -0800 From: Xin Li Reply-To: d@delphij.net Organization: The FreeBSD Project MIME-Version: 1.0 To: Zeus Panchenko , freebsd-fs@freebsd.org Subject: Re: unsupported feature: com.delfix and can't find pool by guid after old STABLE10.0-to-RELENG10.0 upgrade References: <20141111080903.94302@smtp.new-ukraine.org> In-Reply-To: <20141111080903.94302@smtp.new-ukraine.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 07:37:23 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi, On 11/10/14 22:09, Zeus Panchenko wrote: > greetings, > > please help me to understand what am I missing ... > > I "successfully" (built/installed world/kernel without errors) > upgraded long time, fine worked root-on-zfs box from 10.0 STABLE > (last built in july) to RELENG 10.0, p11 This is a downgrade. We do not support downgrades -- it may work when you are lucky but that's not guaranteed. > but after reboot, loader complained on unsupported feature: > com.delfix:hole_birth and com.delfix:embedded_data [...] > system was working in production long time before that > > So, is there any way to fix that and what is it at all? Is it > because of switching from stable to releng? I'm giving up in > attempts to revive it ... Yes! For now you can use a FreeBSD 10.1-RC4 disc to boot and rescue your system. If you would not mind to wait for a few more days -- we will have 10.1-RELEASE really soon. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0 iQIcBAEBCgAGBQJUYbyxAAoJEJW2GBstM+nsG8cP/RS8EZUSEP7Jnldf3YPDkDam hBSo8W982Nlhr90MfMFHvrhxk44ZxQNWXBm/kv0lVoiNpEj07MzynZiMQC/XDpOV vyCbZzlth7ZizJgWJXl2cxS6Cw6WjhRIT5kSU6xKoj4u5MkxbdU/l9gmbMC5L5Pf oCqbcYpKmLlx8Ea+ddb2rpWGsv5LlNxiif/NGNuKuZOGn0lBbkB7wX/kykOXm9c+ RC4Ql3JB2k41AkyRAkzfwsyMkMQUoTgYa0sLaSdIKGVwtbRLBdYfwo6VUqP3XDh6 7Ly8ih7ayqCzSWFMiyp3FdhiiIUyVRVI1jli2IK1ENm9Z5o3eYeU/W0KHaqT1LuJ zKCKhUBUedXvzIQsjRAUMKyTmjGxDXsIIaAsxui2UfNxEJEJukJe9zxQzsdsybdu k1edE4eJ0iRH+3EC04m0WaXvka3bla7XzLdN4WNMAh7dLrbFyNkgY/Xq79nZKk0p W7tDMBrTj116qujwpRethRTwAi3/Em9jwLvd+4FZFSnax5ix7y9e4OC9ourSt8Pb ncx7pEj114/mBzkhKW1wNucivPBjQVx5kkvrTtVqfI1ofeDeZyt29buJGAuJEohV Za1pF6vKITBhK7XFE73ukTHpZhy6dYGt9cLfVytndSlCqeuY2jB0FMZKEuY95MO6 4Vd9KaND7ZZaGyPpHDwD =wcfA -----END PGP SIGNATURE----- From owner-freebsd-fs@FreeBSD.ORG Tue Nov 11 08:10:24 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BBF5794 for ; Tue, 11 Nov 2014 08:10:24 +0000 (UTC) Received: from smtp.new-ukraine.org (smtp.new-ukraine.org [148.251.53.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.new-ukraine.org", Issuer "smtp.new-ukraine.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B4EB63D3 for ; Tue, 11 Nov 2014 08:10:22 +0000 (UTC) Received: on behalf of honored client by smtp.new-ukraine.org with ESMTP id sAB8A9bK000847 on Tue, 11 Nov 2014 10:10:10 +0200 (EET) Message-ID: <20141111101004.845@smtp.new-ukraine.org> Date: Tue, 11 Nov 2014 10:10:04 +0200 From: "Zeus Panchenko" To: Subject: Re: unsupported feature: com.delfix and can't find pool by guid after old STABLE10.0-to-RELENG10.0 upgrade In-reply-to: Your message of Mon, 10 Nov 2014 23:37:21 -0800 <5461BCB1.5030703@delphij.net> References: <20141111080903.94302@smtp.new-ukraine.org> <5461BCB1.5030703@delphij.net> Organization: I.B.S. LLC Reply-To: "Zeus Panchenko" X-Attribution: zeus Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEWxsbGdnZ3U1NQTExN cXFzx8fG/v7+f8hyWAAACXUlEQVQ4jUWSwXYiIRBFi4yyhtjtWpmRdTL0ZC3TJOukDa6Rc+T/P2F eFepwtFvr8upVFVDua8mLWw6La4VIKTuMdAPOebdU55sQs3n/D1xFFPFGVGh4AHKttr5K0bS6g7N ZCge7qpVLB+f1Z2WAj2OKXwIWt/bXpdXSiu8KXbviWkHxF5td9+lg2e3xlI2SCvatK8YLfHyh9lw 15yrad8Va5eXg4Llr7QmAaC+dL9sDt9iad/DX3OKvLMBf+dm0A0QuMrTvYIevSik1IaSVvgjIHt5 lSCG2ynNRpEcBZ8cgDWk+Ns99qzsYYV3MZoppWzGtYlTO9+meG6m/g92iNO9LfQB2JZsMpoJs7QG ku2KtabRK0bZRwDLyBDvwlxTm6ZlP7qyOqLcfqtLexpDSB4M0H3I/PQy1emvjjzgK+A0LmMKl6Lq zlqzh0VGAw440F6MJd8cY0nI7wiF/fVIBGY7UNCAXy6DmfYGCLLI0wtDbVcDUMqtJLmAhLqODQAe riERAxXJ1/QYGpa0ymqyytpKC19MNXHjvFmEsfcHIrncFR4xdbYWgmfEGLCcZokpGbGj1egMR+6M 1BkNX1pDdhPcOXpAnAeLQUwQLYepgQoZVNGS61yaE8CYA7gYAcWKzwGstACY2HTFvvOwk4FXAG/a mKHni/EcA/GkOk7I0IK7UMIf3+SahU8/FJdiE7KcuWdM3MFocUDEEIX9LfJoo4xV5tnNKc3jJuSs SZWgnnhepgU1zN4Hii18yW4RwDX52CXUtk0Hqz6cHOIUkWaX8fDcB+J7y1y2xDHwjv/8Buu8Ekz6 7tXQAAAAASUVORK5CYII= X-Mailer: MH-E 8.3.1; GNU Mailutils 2.99.98; GNU Emacs 24.3.1 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-NewUkraine-Agent: mailfromd (7.99.92) X-NewUkraine-URL: http://www.ibs.dn.ua/smtp.html X-NewUkraine-VirStat: NO X-NewUkraine-VirScan: ScanPE, ScanELF, ScanOLE2, ScanMail, PhishingSignatures, ScanHTML, ScanPDF X-NewUkraine-SpamStat: NO X-NewUkraine-SpamScore: -1.600 of 3.500 X-NewUkraine-SpamKeys: AWL,BAYES_00,NO_RECEIVED,NO_RELAYS Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 08:10:24 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Xin Li wrote: > > So, is there any way to fix that and what is it at all? Is it > > because of switching from stable to releng? I'm giving up in > > attempts to revive it ... >=20 > Yes! For now you can use a FreeBSD 10.1-RC4 disc to boot and rescue > your system. may you be moe specific, please what can I do? just to boot from FreeBSD 10.1-RC4 or I can fix the system s= omehow? > If you would not mind to wait for a few more days -- we will have > 10.1-RELEASE really soon. do you mind to boot from 10.1-RELEASE and rebuild world? =2D-=20 Zeus V. Panchenko jid:zeus@im.ibs.dn.ua IT Dpt., I.B.S. LLC GMT+2 (EET) --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlRhxFwACgkQr3jpPg/3oyqDKQCdGOIFIf5NHGYUR704+kT+VQN9 NhQAoJI6GPvCQfjPK5XD8d5HAIBcUP7i =VoS2 -----END PGP SIGNATURE----- --=-=-=-- From owner-freebsd-fs@FreeBSD.ORG Tue Nov 11 10:18:29 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC444CE9 for ; Tue, 11 Nov 2014 10:18:28 +0000 (UTC) Received: from mail.tyknet.dk (mail.tyknet.dk [IPv6:2a01:4f8:201:2327:144:76:253:226]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAE40284 for ; Tue, 11 Nov 2014 10:18:28 +0000 (UTC) Received: from [10.10.2.24] (217.71.4.82.static.router4.bolignet.dk [217.71.4.82]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.tyknet.dk (Postfix) with ESMTPSA id 6E26E2AB6D8 for ; Tue, 11 Nov 2014 10:18:25 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail.tyknet.dk 6E26E2AB6D8 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gibfest.dk; s=default; t=1415701105; bh=dtnxMRyTJl5UZh2Pe0MBRtr6Rj/m4Jmm/+JUFEsiTo8=; h=Date:From:To:Subject; b=PzT5y+GeN+A/D9zYmJ15nRQnzMIWEMPtLoSm3ziw8tGyrCjOt8fagOiH++yOMllr7 9HXtP+nA65sUpsDE0vsr9HHkr81sS+Ia/OT0yn/gmmG4gQfo5aCUVDHZlWfvaTzd/n cwC1K7y4LwsSKqGclK49eRnM7HTnOkIADLYS7MS6j8IHsMllaDzGizQJ5sb76NHmQN AbEL55Nz9uhZkZ9MtdhdgcQGkBtlP/KXXPGEIajxBSkeznWUqACypxohxGfUTvYAQS L2QKD+ad0Tjnc/85QeBsYFmsunor78V+jmbet9xIK7rr6rxebjqyn30ay98SeunbzZ iL/loechtvIaw== Message-ID: <5461E271.60105@gibfest.dk> Date: Tue, 11 Nov 2014 11:18:25 +0100 From: Thomas Steen Rasmussen User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: freebsd-fs@freebsd.org Subject: "Permission denied" for jails root for jailed ZFS datasets, trouble delegating permissions Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 10:18:29 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello list, I am using jailed zfs datasets for backup purposes (I use one ezjail per remote host that needs backing up, just so if a server is compromised it can only access its own backups). My notes from setting this up: - - first set the following sysctls: ### allow zfs in jails security.jail.mount_allowed=1 security.jail.enforce_statfs=1 Then repeat for each jail/dataset: - - create a dataset - - create a jail - - jail the dataset - - set the "jailed" property on the dataset If I understand the manpage correctly this should be enough to manage the dataset with the root user inside the jail. But it isn't. The only way I've found it possible to actually do anything with the jailed dataset from inside the jail is to use zfs delegate *from the host* to a user with the same uid as one inside the jail. So I create a non-root user inside the jail with, say, uid 1001. Then I try delegating the permissions it needs, but the root user in the jail get permission denied whatever I try, including "zfs delegate". However, the root user *on the host* can successfully delegate permissions to a user inside the jail, provided that a user with the same uid exists on the host. After delegating the non-root user in the jail can manage the dataset, but the jails root user still can't. This seems wrong to me. I should be able to do stuff with the root user inside the jail, including delegating to other users in the jail. What gives ? Thanks! /Thomas ps. The behaviour is the same across various 9-stable and 10-stable machines so I haven't included svn revisions as it doesn't seem to make a difference. More details available on request. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJUYeJxAAoJEHcv938JcvpY8NkQAJBpwTulpDm7JHzySU9XBPCf 6bK9oM3GQZnd+CJoO4Zr0fe5FLnAAK3hhZ0SnFj/7d132JWhg/1H8Y8aRmd2amYc /Qp5z8RdatkSQoRPQeEqHJTHnyS2lnQ74w9NdhyIb6C5/m21kTiXYhmWNji4ctRa XnSJxPyTxU1is+c1bZnV6WcJfC6SpR4OTfE0UQU1AbgLpAaZRhPrRbjni9lluAXd iIAr8ghIuy2A7nADS0ZOssrh5StBMS5r2k2nC9zoDcOPkVDdA2+71yKzhBM5sh3a Jx2VyGyrsAJx6XAtsjcj/Hij3rQ31JrqcrIOQ+uT5wJrhI1QkFaJxSnbsVuJbnqo jwTQsdM0RQoaxn7m0TPtD/2c+UC0FDyefHLCNIYE+7PaZ2Zb6d7xa0YyXmEMRhUe 5uHQMdyQD/3oKAa4s4Tr21kFnaxZ2ExhL6MlgQyyuxwluNnFViNPkoT90cW2TsMh y5ACXSWlqhoeulwv3T+Of27+A6BZ9NtH+G9yqfA6B5ytotMnP/HGrg0jywu8FVQD Ll+EmpyIpFNxGH9U0HJIpItzFuZPPLwVPhwER6ds34yWJhZOitcWtXlIETG4B6xH Xg6PpIdxg82BrPjsPpr1l+rENi4h+1Pmgirp9Q5cV6XWjoKnWqITPtSsRXDLUZ9N zSpchj5ar8osMNXkzY8V =PpBz -----END PGP SIGNATURE----- From owner-freebsd-fs@FreeBSD.ORG Tue Nov 11 14:23:17 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC1B756F for ; Tue, 11 Nov 2014 14:23:17 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC99519F for ; Tue, 11 Nov 2014 14:23:17 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 045AE206F8 for ; Tue, 11 Nov 2014 09:23:16 -0500 (EST) Received: from web3 ([10.202.2.213]) by compute6.internal (MEProxy); Tue, 11 Nov 2014 09:23:16 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:x-sasl-enc:from:to :mime-version:content-transfer-encoding:content-type:in-reply-to :references:subject:date; s=smtpout; bh=zwOBIXEzrDwL3ymmjwYoykee JOw=; b=Qr4GTl0yH8RXCE2Dbg3e8Bfzq0IfsHuTCrMt04g0uI/dYanIsIa5mrAg hKftjcn5Nhlj3BbMHzR0w8foTxCqncqlI1GSYIvybi3b1I8LYC2SJlJCsipEoNHg qpqCe+SZDiFYv65jHjTqtZ4IogkoR57nQdFRV5CeZidqu7ekLiE= Received: by web3.nyi.internal (Postfix, from userid 99) id CF455109912; Tue, 11 Nov 2014 09:23:15 -0500 (EST) Message-Id: <1415715795.1681955.189655693.7993AEA6@webmail.messagingengine.com> X-Sasl-Enc: ++JeFNRokGTsPX2U3LfQ6FRZ0JLPQluGpYwrXHTQhu7s 1415715795 From: Mark Felder To: freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-9183bd94 In-Reply-To: <20141111101004.845@smtp.new-ukraine.org> References: <20141111080903.94302@smtp.new-ukraine.org> <5461BCB1.5030703@delphij.net> <20141111101004.845@smtp.new-ukraine.org> Subject: Re: unsupported feature: com.delfix and can't find pool by guid after old STABLE10.0-to-RELENG10.0 upgrade Date: Tue, 11 Nov 2014 08:23:15 -0600 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 14:23:18 -0000 On Tue, Nov 11, 2014, at 02:10, Zeus Panchenko wrote: > Xin Li wrote: > > > So, is there any way to fix that and what is it at all? Is it > > > because of switching from stable to releng? I'm giving up in > > > attempts to revive it ... > > > > Yes! For now you can use a FreeBSD 10.1-RC4 disc to boot and rescue > > your system. > > may you be moe specific, please > > what can I do? just to boot from FreeBSD 10.1-RC4 or I can fix the system > somehow? > > > If you would not mind to wait for a few more days -- we will have > > 10.1-RELEASE really soon. > > do you mind to boot from 10.1-RELEASE and rebuild world? > All you should need to do is boot FreeBSD 10.1-RC4 and apply the newer bootcode and put the newer kernel on the system. If this is a zfs-on-root install you may have problems with importing the zpool and getting access to your data. I would advice you import the zpool with the -N option -N Import the pool without mounting any file systems. This will prevent it from automatically mounting filesytems on top of the LiveCD OS you're booted into and causing major problems. After you've done this, change your /boot filesystem to somewhere new/accessbile that won't conflict with the running OS and copy in the kernel. The process will look something like this: zpool import -N tank zfs set mountpoint=/newboot /tank/boot zfs mount /tank/boot mv /newboot/kernel /newboot/kernel.old cp -R /boot/kernel /tank/boot/ zfs umount /tank/boot zfs set mountpoint=/boot tank/boot gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0 reboot Good luck! From owner-freebsd-fs@FreeBSD.ORG Tue Nov 11 14:27:41 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 388E769F; Tue, 11 Nov 2014 14:27:41 +0000 (UTC) Received: from mail.slu.se (tmgext2-1.slu.se [77.235.224.51]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "webmail.slu.se", Issuer "TERENA SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCA861FE; Tue, 11 Nov 2014 14:27:39 +0000 (UTC) Received: from Exchange2-2.slu.se (130.238.96.155) by Tmg2-1.slu.se (130.238.96.151) with Microsoft SMTP Server (TLS) id 14.3.210.2; Tue, 11 Nov 2014 15:27:30 +0100 Received: from Exchange2-1.slu.se ([130.238.96.154]) by exchange2-2 ([130.238.96.155]) with mapi id 14.03.0210.002; Tue, 11 Nov 2014 15:27:29 +0100 From: =?utf-8?B?S2FybGkgU2rDtmJlcmc=?= To: "feld@FreeBSD.org" Subject: Re: unsupported feature: com.delfix and can't find pool by guid after old STABLE10.0-to-RELENG10.0 upgrade Thread-Topic: unsupported feature: com.delfix and can't find pool by guid after old STABLE10.0-to-RELENG10.0 upgrade Thread-Index: AQHP/bufoDDdqqEkhEe0YcmxQdmdTA== Date: Tue, 11 Nov 2014 14:27:28 +0000 Message-ID: <5F9E965F5A80BC468BE5F40576769F099DF95E9F@exchange2-1> References: <20141111080903.94302@smtp.new-ukraine.org> <5461BCB1.5030703@delphij.net> <20141111101004.845@smtp.new-ukraine.org> <1415715795.1681955.189655693.7993AEA6@webmail.messagingengine.com> In-Reply-To: <1415715795.1681955.189655693.7993AEA6@webmail.messagingengine.com> Accept-Language: sv-SE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [77.235.228.32] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Cc: "freebsd-fs@freebsd.org" X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 14:27:41 -0000 T24gVHVlLCAyMDE0LTExLTExIGF0IDA4OjIzIC0wNjAwLCBNYXJrIEZlbGRlciB3cm90ZToKPiAK PiBPbiBUdWUsIE5vdiAxMSwgMjAxNCwgYXQgMDI6MTAsIFpldXMgUGFuY2hlbmtvIHdyb3RlOgo+ ID4gWGluIExpIDxkZWxwaGlqQGRlbHBoaWoubmV0PiB3cm90ZToKPiA+ID4gPiBTbywgaXMgdGhl cmUgYW55IHdheSB0byBmaXggdGhhdCBhbmQgd2hhdCBpcyBpdCBhdCBhbGw/IElzIGl0Cj4gPiA+ ID4gYmVjYXVzZSBvZiBzd2l0Y2hpbmcgZnJvbSBzdGFibGUgdG8gcmVsZW5nPyAgSSdtIGdpdmlu ZyB1cCBpbgo+ID4gPiA+IGF0dGVtcHRzIHRvIHJldml2ZSBpdCAuLi4KPiA+ID4gCj4gPiA+IFll cyEgIEZvciBub3cgeW91IGNhbiB1c2UgYSBGcmVlQlNEIDEwLjEtUkM0IGRpc2MgdG8gYm9vdCBh bmQgcmVzY3VlCj4gPiA+IHlvdXIgc3lzdGVtLgo+ID4gCj4gPiBtYXkgeW91IGJlIG1vZSBzcGVj aWZpYywgcGxlYXNlCj4gPiAKPiA+IHdoYXQgY2FuIEkgZG8/IGp1c3QgdG8gYm9vdCBmcm9tIEZy ZWVCU0QgMTAuMS1SQzQgb3IgSSBjYW4gZml4IHRoZSBzeXN0ZW0KPiA+IHNvbWVob3c/Cj4gPiAK PiA+ID4gSWYgeW91IHdvdWxkIG5vdCBtaW5kIHRvIHdhaXQgZm9yIGEgZmV3IG1vcmUgZGF5cyAt LSB3ZSB3aWxsIGhhdmUKPiA+ID4gMTAuMS1SRUxFQVNFIHJlYWxseSBzb29uLgo+ID4gCj4gPiBk byB5b3UgbWluZCB0byBib290IGZyb20gMTAuMS1SRUxFQVNFIGFuZCByZWJ1aWxkIHdvcmxkPwo+ ID4gCj4gCj4gQWxsIHlvdSBzaG91bGQgbmVlZCB0byBkbyBpcyBib290IEZyZWVCU0QgMTAuMS1S QzQgYW5kIGFwcGx5IHRoZSBuZXdlcgo+IGJvb3Rjb2RlIGFuZCBwdXQgdGhlIG5ld2VyIGtlcm5l bCBvbiB0aGUgc3lzdGVtLgo+IAo+IElmIHRoaXMgaXMgYSB6ZnMtb24tcm9vdCBpbnN0YWxsIHlv dSBtYXkgaGF2ZSBwcm9ibGVtcyB3aXRoIGltcG9ydGluZwo+IHRoZSB6cG9vbCBhbmQgZ2V0dGlu ZyBhY2Nlc3MgdG8geW91ciBkYXRhLiBJIHdvdWxkIGFkdmljZSB5b3UgaW1wb3J0IHRoZQo+IHpw b29sIHdpdGggdGhlIC1OIG9wdGlvbgo+IAo+ICAgICAgICAgIC1OICAgICAgSW1wb3J0IHRoZSBw b29sIHdpdGhvdXQgbW91bnRpbmcgYW55IGZpbGUgc3lzdGVtcy4KPiAKPiBUaGlzIHdpbGwgcHJl dmVudCBpdCBmcm9tIGF1dG9tYXRpY2FsbHkgbW91bnRpbmcgZmlsZXN5dGVtcyBvbiB0b3Agb2YK PiB0aGUgTGl2ZUNEIE9TIHlvdSdyZSBib290ZWQgaW50byBhbmQgY2F1c2luZyBtYWpvciBwcm9i bGVtcy4KPiAKPiBBZnRlciB5b3UndmUgZG9uZSB0aGlzLCBjaGFuZ2UgeW91ciAvYm9vdCBmaWxl c3lzdGVtIHRvIHNvbWV3aGVyZQo+IG5ldy9hY2Nlc3NiaWxlIHRoYXQgd29uJ3QgY29uZmxpY3Qg d2l0aCB0aGUgcnVubmluZyBPUyBhbmQgY29weSBpbiB0aGUKPiBrZXJuZWwuIFRoZSBwcm9jZXNz IHdpbGwgbG9vayBzb21ldGhpbmcgbGlrZSB0aGlzOgo+IAo+ICAgenBvb2wgaW1wb3J0IC1OIHRh bmsKPiAgIHpmcyBzZXQgbW91bnRwb2ludD0vbmV3Ym9vdCAvdGFuay9ib290Cj4gICB6ZnMgbW91 bnQgL3RhbmsvYm9vdAo+ICAgbXYgL25ld2Jvb3Qva2VybmVsIC9uZXdib290L2tlcm5lbC5vbGQK PiAgIGNwIC1SIC9ib290L2tlcm5lbCAvdGFuay9ib290Lwo+ICAgemZzIHVtb3VudCAvdGFuay9i b290Cj4gICB6ZnMgc2V0IG1vdW50cG9pbnQ9L2Jvb3QgdGFuay9ib290Cj4gICBncGFydCBib290 Y29kZSAtYiAvYm9vdC9wbWJyIC1wIC9ib290L2dwdGJvb3QgLWkgMSBhZGEwCj4gICByZWJvb3QK PiAKPiAKPiBHb29kIGx1Y2shCj4gX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX18KPiBmcmVlYnNkLWZzQGZyZWVic2Qub3JnIG1haWxpbmcgbGlzdAo+IGh0dHA6 Ly9saXN0cy5mcmVlYnNkLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2ZyZWVic2QtZnMKPiBUbyB1bnN1 YnNjcmliZSwgc2VuZCBhbnkgbWFpbCB0byAiZnJlZWJzZC1mcy11bnN1YnNjcmliZUBmcmVlYnNk Lm9yZyIKClpGUyBmaWxlc3lzdGVtcyBhcmUgd3JpdHRlbiB3aXRob3V0IHByZWZpeCwgbm8/Cidz Iy90YW5rI3RhbmsjJwoKCi0tIAoKTWVkIFbDpG5saWdhIEjDpGxzbmluZ2FyCgotLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tCkthcmxpIFNqw7ZiZXJnClN3ZWRpc2ggVW5pdmVyc2l0eSBvZiBBZ3JpY3Vs dHVyYWwgU2NpZW5jZXMgQm94IDcwNzkgKFZpc2l0aW5nIEFkZHJlc3MKS3JvbsOlc3bDpGdlbiA4 KQpTLTc1MCAwNyBVcHBzYWxhLCBTd2VkZW4KUGhvbmU6ICArNDYtKDApMTgtNjcgMTUgNjYKa2Fy bGkuc2pvYmVyZ0BzbHUuc2UK From owner-freebsd-fs@FreeBSD.ORG Tue Nov 11 14:41:23 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CFA29A3 for ; Tue, 11 Nov 2014 14:41:23 +0000 (UTC) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09B723EE for ; Tue, 11 Nov 2014 14:41:22 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id D0B8D20B94 for ; Tue, 11 Nov 2014 09:41:21 -0500 (EST) Received: from web3 ([10.202.2.213]) by compute2.internal (MEProxy); Tue, 11 Nov 2014 09:41:21 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:x-sasl-enc:from:to:cc :mime-version:content-transfer-encoding:content-type:in-reply-to :references:subject:date; s=smtpout; bh=FMqHitXZBqE54lrZ5NJShMqE d60=; b=CoMl2QowLKrRcLBS/xr+8O8xuozu61Sas9dFrsMxaFdRdzx2WruFLpWe 3oOz00LQHKV/YTskYhvHdpQXkS7taQksMuWtMYVUVzdIrmUDdw2+X6BVCUqEl3Rj NPvMM+y4oAGNPCR0IRwMmSKcT4Vut87WyLy1anW86x2GBLMEN8U= Received: by web3.nyi.internal (Postfix, from userid 99) id ADF08109B9E; Tue, 11 Nov 2014 09:41:21 -0500 (EST) Message-Id: <1415716881.1685998.189665617.0961C3A3@webmail.messagingengine.com> X-Sasl-Enc: ZHcQNm63aCGPON7sRHT0F/OThUk43f8RQDaf4ikpfE0G 1415716881 From: Mark Felder To: =?ISO-8859-1?Q?Karli=20Sj=F6berg?= MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: MessagingEngine.com Webmail Interface - ajax-9183bd94 In-Reply-To: <5F9E965F5A80BC468BE5F40576769F099DF95E9F@exchange2-1> References: <20141111080903.94302@smtp.new-ukraine.org> <5461BCB1.5030703@delphij.net> <20141111101004.845@smtp.new-ukraine.org> <1415715795.1681955.189655693.7993AEA6@webmail.messagingengine.com> <5F9E965F5A80BC468BE5F40576769F099DF95E9F@exchange2-1> Subject: Re: unsupported feature: com.delfix and can't find pool by guid after old STABLE10.0-to-RELENG10.0 upgrade Date: Tue, 11 Nov 2014 08:41:21 -0600 Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 14:41:23 -0000 On Tue, Nov 11, 2014, at 08:27, Karli Sj=F6berg wrote: > On Tue, 2014-11-11 at 08:23 -0600, Mark Felder wrote: > >=20 > > zfs mount /tank/boot >=20 > ZFS filesystems are written without prefix, no? > 's#/tank#tank#' >=20 Yeah I certainly buggered up that mount command. Good catch. From owner-freebsd-fs@FreeBSD.ORG Tue Nov 11 20:35:54 2014 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB4F76FE for ; Tue, 11 Nov 2014 20:35:54 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2DF39C7 for ; Tue, 11 Nov 2014 20:35:54 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sABKZsQK028185 for ; Tue, 11 Nov 2014 20:35:54 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 188187] [zfs] [panic] 10-stable: Kernel panic on zpool import: integer divide fault Date: Tue, 11 Nov 2014 20:35:54 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: danm@vivocore.com X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 20:35:54 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188187 --- Comment #11 from Dan Milgram --- Having trouble getting this info since I'm not running STABLE and I can't see a reasonably quick way to get the sources. I see now the bug title indicates STABLE, but I'm on 10.0 RELEASE. In case helps, when I run zdb on an MfBSD image I now get a source code reference to where it fails exactly: root@mfsbsd:~ # zdb -b -e zroot Traversing all blocks to verify nothing leaked ... 6.95G completed ( 228MB/s) estimated time remaining: 0hr 00min 19sec Assertion failed: (bp->blk_pad[0] == 0), file /usr/src/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c, line 2978. Abort (core dumped) -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-fs@FreeBSD.ORG Tue Nov 11 20:38:45 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F445827; Tue, 11 Nov 2014 20:38:45 +0000 (UTC) Received: from smtp.new-ukraine.org (smtp.new-ukraine.org [148.251.53.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.new-ukraine.org", Issuer "smtp.new-ukraine.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E6F99F7; Tue, 11 Nov 2014 20:38:44 +0000 (UTC) Received: on behalf of honored client by smtp.new-ukraine.org with ESMTP id sABKccpY046743 on Tue, 11 Nov 2014 22:38:39 +0200 (EET) Message-ID: <20141111223833.46741@smtp.new-ukraine.org> Date: Tue, 11 Nov 2014 22:38:33 +0200 From: "Zeus Panchenko" To: "Mark Felder" Subject: Re: unsupported feature: com.delfix and can't find pool by guid after old STABLE10.0-to-RELENG10.0 upgrade In-reply-to: Your message of Tue, 11 Nov 2014 08:23:15 -0600 <1415715795.1681955.189655693.7993AEA6@webmail.messagingengine.com> References: <20141111080903.94302@smtp.new-ukraine.org> <5461BCB1.5030703@delphij.net> <20141111101004.845@smtp.new-ukraine.org> <1415715795.1681955.189655693.7993AEA6@webmail.messagingengine.com> Organization: I.B.S. LLC Reply-To: "Zeus Panchenko" X-Attribution: zeus Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEWxsbGdnZ3U1NQTExN cXFzx8fG/v7+f8hyWAAACXUlEQVQ4jUWSwXYiIRBFi4yyhtjtWpmRdTL0ZC3TJOukDa6Rc+T/P2F eFepwtFvr8upVFVDua8mLWw6La4VIKTuMdAPOebdU55sQs3n/D1xFFPFGVGh4AHKttr5K0bS6g7N ZCge7qpVLB+f1Z2WAj2OKXwIWt/bXpdXSiu8KXbviWkHxF5td9+lg2e3xlI2SCvatK8YLfHyh9lw 15yrad8Va5eXg4Llr7QmAaC+dL9sDt9iad/DX3OKvLMBf+dm0A0QuMrTvYIevSik1IaSVvgjIHt5 lSCG2ynNRpEcBZ8cgDWk+Ns99qzsYYV3MZoppWzGtYlTO9+meG6m/g92iNO9LfQB2JZsMpoJs7QG ku2KtabRK0bZRwDLyBDvwlxTm6ZlP7qyOqLcfqtLexpDSB4M0H3I/PQy1emvjjzgK+A0LmMKl6Lq zlqzh0VGAw440F6MJd8cY0nI7wiF/fVIBGY7UNCAXy6DmfYGCLLI0wtDbVcDUMqtJLmAhLqODQAe riERAxXJ1/QYGpa0ymqyytpKC19MNXHjvFmEsfcHIrncFR4xdbYWgmfEGLCcZokpGbGj1egMR+6M 1BkNX1pDdhPcOXpAnAeLQUwQLYepgQoZVNGS61yaE8CYA7gYAcWKzwGstACY2HTFvvOwk4FXAG/a mKHni/EcA/GkOk7I0IK7UMIf3+SahU8/FJdiE7KcuWdM3MFocUDEEIX9LfJoo4xV5tnNKc3jJuSs SZWgnnhepgU1zN4Hii18yW4RwDX52CXUtk0Hqz6cHOIUkWaX8fDcB+J7y1y2xDHwjv/8Buu8Ekz6 7tXQAAAAASUVORK5CYII= X-Mailer: MH-E 8.3.1; GNU Mailutils 2.99.98; GNU Emacs 24.3.1 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-NewUkraine-Agent: mailfromd (7.99.92) X-NewUkraine-URL: http://www.ibs.dn.ua/smtp.html X-NewUkraine-VirStat: NO X-NewUkraine-VirScan: ScanPE, ScanELF, ScanOLE2, ScanMail, PhishingSignatures, ScanHTML, ScanPDF X-NewUkraine-SpamStat: NO X-NewUkraine-SpamScore: -1.700 of 3.500 X-NewUkraine-SpamKeys: AWL,BAYES_00,NO_RECEIVED,NO_RELAYS Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 20:38:45 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Mark Felder wrote: > All you should need to do is boot FreeBSD 10.1-RC4 and apply the newer > bootcode and put the newer kernel on the system. I hoped I could use my old kernel :( thanks, I'll try >=20 > If this is a zfs-on-root install you may have problems with importing > the zpool and getting access to your data. I would advice you import the > zpool with the -N option >=20 > -N Import the pool without mounting any file systems. emm ... why a not altroot ? zpool(8) altroot Alternate root directory. If set, this directory is prepended to a= ny mount points within the pool. This can be used when examining an unknown pool where the mount points cannot be trusted, or in an alternate boot environment, where the typical paths are not valid. =2D-=20 Zeus V. Panchenko jid:zeus@im.ibs.dn.ua IT Dpt., I.B.S. LLC GMT+2 (EET) --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlRic8kACgkQr3jpPg/3oyrBPACgycsBfDvg+SsBLp4YpkvKC43F pM4AnjJvWzYJLyd0MLtycxl43ck+jRFU =Vu0X -----END PGP SIGNATURE----- --=-=-=-- From owner-freebsd-fs@FreeBSD.ORG Tue Nov 11 22:13:07 2014 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A6B49E0 for ; Tue, 11 Nov 2014 22:13:07 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81C366C9 for ; Tue, 11 Nov 2014 22:13:07 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sABMD7sw066720 for ; Tue, 11 Nov 2014 22:13:07 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 188187] [zfs] [panic] 10-stable: Kernel panic on zpool import: integer divide fault Date: Tue, 11 Nov 2014 22:13:07 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: smh@FreeBSD.org X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 22:13:07 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188187 --- Comment #12 from Steven Hartland --- (In reply to Dan Milgram from comment #11) > Having trouble getting this info since I'm not running STABLE and I can't > see a reasonably quick way to get the sources. I see now the bug title > indicates STABLE, but I'm on 10.0 RELEASE. > > In case helps, when I run zdb on an MfBSD image I now get a source code > reference to where it fails exactly: > > root@mfsbsd:~ # zdb -b -e zroot > > Traversing all blocks to verify nothing leaked ... > > 6.95G completed ( 228MB/s) estimated time remaining: 0hr 00min 19sec > Assertion failed: (bp->blk_pad[0] == 0), file > /usr/src/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/ > fs/zfs/zio.c, line 2978. > Abort (core dumped) there's at least one change that directly effects this assert in 10.1 so I would recommend upgrading to at least that or stable/10 to check if its already fixed. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-fs@FreeBSD.ORG Wed Nov 12 13:25:11 2014 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BA012FD; Wed, 12 Nov 2014 13:25:11 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62244F29; Wed, 12 Nov 2014 13:25:10 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id sACDOqIS008619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 12 Nov 2014 15:24:52 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua sACDOqIS008619 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id sACDOq5H008618; Wed, 12 Nov 2014 15:24:52 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 12 Nov 2014 15:24:52 +0200 From: Konstantin Belousov To: arch@freebsd.org, fs@freebsd.org Subject: Removal of kern_xxx() no-at variants. Message-ID: <20141112132451.GM17068@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2014 13:25:11 -0000 We have 'fat' KPI for kern_open() and other vfs syscall helpers, after the at-version of the syscalls was added somewhere at 8-CURRENT. For instance, we provide kern_open() and kern_openat(). But more, we provide kern_stat() kern_lstat() kern_statat() kern_statat_vhook() first three being a trivial wrapper around kern_statat_vhook(). More, existence of two or (sometimes) three layers around basic syscall helper causes issues like r271655 making the argument validation split. Kepping the compat layer was reasonable in 8-CURRENT time when the at variants were experimental and patch to add the syscalls was already large and error-prone. Now, I think we should shave the extra call indirections, it costs nothing at callers and sometimes even improves the code. diff --git a/sys/cddl/compat/opensolaris/sys/vnode.h b/sys/cddl/compat/opensolaris/sys/vnode.h index 4e5b1c9..22256cf 100644 --- a/sys/cddl/compat/opensolaris/sys/vnode.h +++ b/sys/cddl/compat/opensolaris/sys/vnode.h @@ -282,7 +282,7 @@ vn_rename(char *from, char *to, enum uio_seg seg) ASSERT(seg == UIO_SYSSPACE); - return (kern_rename(curthread, from, to, seg)); + return (kern_renameat(curthread, AT_FDCWD, from, AT_FDCWD, to, seg)); } static __inline int @@ -292,7 +292,7 @@ vn_remove(char *fnamep, enum uio_seg seg, enum rm dirflag) ASSERT(seg == UIO_SYSSPACE); ASSERT(dirflag == RMFILE); - return (kern_unlink(curthread, fnamep, seg)); + return (kern_unlinkat(curthread, AT_FDCWD, fnamep, seg, 0)); } #endif /* _KERNEL */ diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 5ea062e..9323138 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -1235,7 +1235,8 @@ freebsd32_utimes(struct thread *td, struct freebsd32_utimes_args *uap) sp = s; } else sp = NULL; - return (kern_utimes(td, uap->path, UIO_USERSPACE, sp, UIO_SYSSPACE)); + return (kern_utimesat(td, AT_FDCWD, uap->path, UIO_USERSPACE, + sp, UIO_SYSSPACE)); } int @@ -1723,7 +1724,8 @@ freebsd32_stat(struct thread *td, struct freebsd32_stat_args *uap) struct stat32 sb32; int error; - error = kern_stat(td, uap->path, UIO_USERSPACE, &sb); + error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, + &sb, NULL); if (error) return (error); copy_stat(&sb, &sb32); @@ -1739,7 +1741,8 @@ ofreebsd32_stat(struct thread *td, struct ofreebsd32_stat_args *uap) struct ostat32 sb32; int error; - error = kern_stat(td, uap->path, UIO_USERSPACE, &sb); + error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, + &sb, NULL); if (error) return (error); copy_ostat(&sb, &sb32); @@ -1787,7 +1790,8 @@ freebsd32_fstatat(struct thread *td, struct freebsd32_fstatat_args *uap) struct stat32 ub32; int error; - error = kern_statat(td, uap->flag, uap->fd, uap->path, UIO_USERSPACE, &ub); + error = kern_statat(td, uap->flag, uap->fd, uap->path, UIO_USERSPACE, + &ub, NULL); if (error) return (error); copy_stat(&ub, &ub32); @@ -1802,7 +1806,8 @@ freebsd32_lstat(struct thread *td, struct freebsd32_lstat_args *uap) struct stat32 sb32; int error; - error = kern_lstat(td, uap->path, UIO_USERSPACE, &sb); + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path, + UIO_USERSPACE, &sb, NULL); if (error) return (error); copy_stat(&sb, &sb32); @@ -1818,7 +1823,8 @@ ofreebsd32_lstat(struct thread *td, struct ofreebsd32_lstat_args *uap) struct ostat32 sb32; int error; - error = kern_lstat(td, uap->path, UIO_USERSPACE, &sb); + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path, + UIO_USERSPACE, &sb, NULL); if (error) return (error); copy_ostat(&sb, &sb32); diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index e56e61f..88303b9 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -82,8 +82,8 @@ linux_creat(struct thread *td, struct linux_creat_args *args) if (ldebug(creat)) printf(ARGS(creat, "%s, %d"), path, args->mode); #endif - error = kern_open(td, path, UIO_SYSSPACE, O_WRONLY | O_CREAT | O_TRUNC, - args->mode); + error = kern_openat(td, AT_FDCWD, path, UIO_SYSSPACE, + O_WRONLY | O_CREAT | O_TRUNC, args->mode); LFREEPATH(path); return (error); } @@ -572,7 +572,8 @@ linux_access(struct thread *td, struct linux_access_args *args) if (ldebug(access)) printf(ARGS(access, "%s, %d"), path, args->amode); #endif - error = kern_access(td, path, UIO_SYSSPACE, args->amode); + error = kern_accessat(td, AT_FDCWD, path, UIO_SYSSPACE, 0, + args->amode); LFREEPATH(path); return (error); @@ -619,12 +620,15 @@ linux_unlink(struct thread *td, struct linux_unlink_args *args) printf(ARGS(unlink, "%s"), path); #endif - error = kern_unlink(td, path, UIO_SYSSPACE); - if (error == EPERM) + error = kern_unlinkat(td, AT_FDCWD, path, UIO_SYSSPACE, 0); + if (error == EPERM) { /* Introduce POSIX noncompliant behaviour of Linux */ - if (kern_stat(td, path, UIO_SYSSPACE, &st) == 0) + if (kern_statat(td, 0, AT_FDCWD, path, UIO_SYSSPACE, &st, + NULL) == 0) { if (S_ISDIR(st.st_mode)) error = EISDIR; + } + } LFREEPATH(path); return (error); } @@ -654,7 +658,7 @@ linux_unlinkat(struct thread *td, struct linux_unlinkat_args *args) if (error == EPERM && !(args->flag & LINUX_AT_REMOVEDIR)) { /* Introduce POSIX noncompliant behaviour of Linux */ if (kern_statat(td, AT_SYMLINK_NOFOLLOW, dfd, path, - UIO_SYSSPACE, &st) == 0 && S_ISDIR(st.st_mode)) + UIO_SYSSPACE, &st, NULL) == 0 && S_ISDIR(st.st_mode)) error = EISDIR; } LFREEPATH(path); @@ -689,7 +693,8 @@ linux_chmod(struct thread *td, struct linux_chmod_args *args) if (ldebug(chmod)) printf(ARGS(chmod, "%s, %d"), path, args->mode); #endif - error = kern_chmod(td, path, UIO_SYSSPACE, args->mode); + error = kern_fchmodat(td, AT_FDCWD, path, UIO_SYSSPACE, + args->mode, 0); LFREEPATH(path); return (error); } @@ -725,7 +730,7 @@ linux_mkdir(struct thread *td, struct linux_mkdir_args *args) if (ldebug(mkdir)) printf(ARGS(mkdir, "%s, %d"), path, args->mode); #endif - error = kern_mkdir(td, path, UIO_SYSSPACE, args->mode); + error = kern_mkdirat(td, AT_FDCWD, path, UIO_SYSSPACE, args->mode); LFREEPATH(path); return (error); } @@ -760,7 +765,7 @@ linux_rmdir(struct thread *td, struct linux_rmdir_args *args) if (ldebug(rmdir)) printf(ARGS(rmdir, "%s"), path); #endif - error = kern_rmdir(td, path, UIO_SYSSPACE); + error = kern_rmdirat(td, AT_FDCWD, path, UIO_SYSSPACE); LFREEPATH(path); return (error); } @@ -783,7 +788,7 @@ linux_rename(struct thread *td, struct linux_rename_args *args) if (ldebug(rename)) printf(ARGS(rename, "%s, %s"), from, to); #endif - error = kern_rename(td, from, to, UIO_SYSSPACE); + error = kern_renameat(td, AT_FDCWD, from, AT_FDCWD, to, UIO_SYSSPACE); LFREEPATH(from); LFREEPATH(to); return (error); @@ -833,7 +838,7 @@ linux_symlink(struct thread *td, struct linux_symlink_args *args) if (ldebug(symlink)) printf(ARGS(symlink, "%s, %s"), path, to); #endif - error = kern_symlink(td, path, to, UIO_SYSSPACE); + error = kern_symlinkat(td, path, AT_FDCWD, to, UIO_SYSSPACE); LFREEPATH(path); LFREEPATH(to); return (error); @@ -878,8 +883,8 @@ linux_readlink(struct thread *td, struct linux_readlink_args *args) printf(ARGS(readlink, "%s, %p, %d"), name, (void *)args->buf, args->count); #endif - error = kern_readlink(td, name, UIO_SYSSPACE, args->buf, UIO_USERSPACE, - args->count); + error = kern_readlinkat(td, AT_FDCWD, name, UIO_SYSSPACE, + args->buf, UIO_USERSPACE, args->count); LFREEPATH(name); return (error); } @@ -972,7 +977,8 @@ linux_link(struct thread *td, struct linux_link_args *args) if (ldebug(link)) printf(ARGS(link, "%s, %s"), path, to); #endif - error = kern_link(td, path, to, UIO_SYSSPACE); + error = kern_linkat(td, AT_FDCWD, AT_FDCWD, path, to, UIO_SYSSPACE, + FOLLOW); LFREEPATH(path); LFREEPATH(to); return (error); @@ -1487,7 +1493,8 @@ linux_chown(struct thread *td, struct linux_chown_args *args) if (ldebug(chown)) printf(ARGS(chown, "%s, %d, %d"), path, args->uid, args->gid); #endif - error = kern_chown(td, path, UIO_SYSSPACE, args->uid, args->gid); + error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, args->uid, + args->gid, 0); LFREEPATH(path); return (error); } @@ -1529,7 +1536,8 @@ linux_lchown(struct thread *td, struct linux_lchown_args *args) if (ldebug(lchown)) printf(ARGS(lchown, "%s, %d, %d"), path, args->uid, args->gid); #endif - error = kern_lchown(td, path, UIO_SYSSPACE, args->uid, args->gid); + error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, args->uid, + args->gid, AT_SYMLINK_NOFOLLOW); LFREEPATH(path); return (error); } diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index ff5e8a2..4433e18 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -777,7 +777,8 @@ linux_utime(struct thread *td, struct linux_utime_args *args) } else tvp = NULL; - error = kern_utimes(td, fname, UIO_SYSSPACE, tvp, UIO_SYSSPACE); + error = kern_utimesat(td, AT_FDCWD, fname, UIO_SYSSPACE, tvp, + UIO_SYSSPACE); LFREEPATH(fname); return (error); } @@ -809,7 +810,8 @@ linux_utimes(struct thread *td, struct linux_utimes_args *args) tvp = tv; } - error = kern_utimes(td, fname, UIO_SYSSPACE, tvp, UIO_SYSSPACE); + error = kern_utimesat(td, AT_FDCWD, fname, UIO_SYSSPACE, + tvp, UIO_SYSSPACE); LFREEPATH(fname); return (error); } @@ -914,13 +916,14 @@ linux_mknod(struct thread *td, struct linux_mknod_args *args) switch (args->mode & S_IFMT) { case S_IFIFO: case S_IFSOCK: - error = kern_mkfifo(td, path, UIO_SYSSPACE, args->mode); + error = kern_mkfifoat(td, AT_FDCWD, path, UIO_SYSSPACE, + args->mode); break; case S_IFCHR: case S_IFBLK: - error = kern_mknod(td, path, UIO_SYSSPACE, args->mode, - args->dev); + error = kern_mknodat(td, AT_FDCWD, path, UIO_SYSSPACE, + args->mode, args->dev); break; case S_IFDIR: @@ -931,7 +934,7 @@ linux_mknod(struct thread *td, struct linux_mknod_args *args) args->mode |= S_IFREG; /* FALLTHROUGH */ case S_IFREG: - error = kern_open(td, path, UIO_SYSSPACE, + error = kern_openat(td, AT_FDCWD, path, UIO_SYSSPACE, O_WRONLY | O_CREAT | O_TRUNC, args->mode); if (error == 0) kern_close(td, td->td_retval[0]); diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 43b255d..61b786f 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -731,7 +731,7 @@ linux_bind(struct thread *td, struct linux_bind_args *args) if (error) return (error); - error = kern_bind(td, args->s, sa); + error = kern_bindat(td, AT_FDCWD, args->s, sa); free(sa, M_SONAME); if (error == EADDRNOTAVAIL && args->namelen != sizeof(struct sockaddr_in)) return (EINVAL); @@ -759,7 +759,7 @@ linux_connect(struct thread *td, struct linux_connect_args *args) if (error) return (error); - error = kern_connect(td, args->s, sa); + error = kern_connectat(td, AT_FDCWD, args->s, sa); free(sa, M_SONAME); if (error != EISCONN) return (error); diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 2e05c85..b6dd86d 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -77,7 +77,7 @@ linux_kern_statat(struct thread *td, int flag, int fd, char *path, enum uio_seg pathseg, struct stat *sbp) { - return (kern_statat_vnhook(td, flag, fd, path, pathseg, sbp, + return (kern_statat(td, flag, fd, path, pathseg, sbp, translate_vnhook_major_minor)); } diff --git a/sys/compat/linux/linux_uid16.c b/sys/compat/linux/linux_uid16.c index c5bf2dd..61f3030 100644 --- a/sys/compat/linux/linux_uid16.c +++ b/sys/compat/linux/linux_uid16.c @@ -121,8 +121,8 @@ linux_chown16(struct thread *td, struct linux_chown16_args *args) args->gid); LIN_SDT_PROBE1(uid16, linux_chown16, conv_path, path); - error = kern_chown(td, path, UIO_SYSSPACE, CAST_NOCHG(args->uid), - CAST_NOCHG(args->gid)); + error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, + CAST_NOCHG(args->uid), CAST_NOCHG(args->gid), 0); LFREEPATH(path); LIN_SDT_PROBE1(uid16, linux_chown16, return, error); @@ -146,8 +146,8 @@ linux_lchown16(struct thread *td, struct linux_lchown16_args *args) args->gid); LIN_SDT_PROBE1(uid16, linux_lchown16, conv_path, path); - error = kern_lchown(td, path, UIO_SYSSPACE, CAST_NOCHG(args->uid), - CAST_NOCHG(args->gid)); + error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, + CAST_NOCHG(args->uid), CAST_NOCHG(args->gid), AT_SYMLINK_NOFOLLOW); LFREEPATH(path); LIN_SDT_PROBE1(uid16, linux_lchown16, return, error); diff --git a/sys/compat/svr4/svr4_fcntl.c b/sys/compat/svr4/svr4_fcntl.c index c604675..edcfcc107 100644 --- a/sys/compat/svr4/svr4_fcntl.c +++ b/sys/compat/svr4/svr4_fcntl.c @@ -390,7 +390,8 @@ svr4_sys_open(td, uap) CHECKALTEXIST(td, uap->path, &newpath); bsd_flags = svr4_to_bsd_flags(uap->flags); - error = kern_open(td, newpath, UIO_SYSSPACE, bsd_flags, uap->mode); + error = kern_openat(td, AT_FDCWD, newpath, UIO_SYSSPACE, bsd_flags, + uap->mode); free(newpath, M_TEMP); if (error) { @@ -450,8 +451,8 @@ svr4_sys_creat(td, uap) CHECKALTEXIST(td, uap->path, &newpath); - error = kern_open(td, newpath, UIO_SYSSPACE, O_WRONLY | O_CREAT | - O_TRUNC, uap->mode); + error = kern_openat(td, AT_FDCWD, newpath, UIO_SYSSPACE, + O_WRONLY | O_CREAT | O_TRUNC, uap->mode); free(newpath, M_TEMP); return (error); } @@ -494,7 +495,8 @@ svr4_sys_access(td, uap) int error; CHECKALTEXIST(td, uap->path, &newpath); - error = kern_access(td, newpath, UIO_SYSSPACE, uap->amode); + error = kern_accessat(td, AT_FDCWD, newpath, UIO_SYSSPACE, + 0, uap->amode); free(newpath, M_TEMP); return (error); } diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c index 0db5453..9e9b020 100644 --- a/sys/compat/svr4/svr4_misc.c +++ b/sys/compat/svr4/svr4_misc.c @@ -653,10 +653,13 @@ svr4_mknod(td, retval, path, mode, dev) CHECKALTEXIST(td, path, &newpath); - if (S_ISFIFO(mode)) - error = kern_mkfifo(td, newpath, UIO_SYSSPACE, mode); - else - error = kern_mknod(td, newpath, UIO_SYSSPACE, mode, dev); + if (S_ISFIFO(mode)) { + error = kern_mkfifoat(td, AT_FDCWD, newpath, UIO_SYSSPACE, + mode); + } else { + error = kern_mknodat(td, AT_FDCWD, newpath, UIO_SYSSPACE, + mode, dev); + } free(newpath, M_TEMP); return (error); } diff --git a/sys/compat/svr4/svr4_stat.c b/sys/compat/svr4/svr4_stat.c index b686642..6ed9873 100644 --- a/sys/compat/svr4/svr4_stat.c +++ b/sys/compat/svr4/svr4_stat.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -170,7 +171,7 @@ svr4_sys_stat(td, uap) CHECKALTEXIST(td, uap->path, &path); - error = kern_stat(td, path, UIO_SYSSPACE, &st); + error = kern_statat(td, 0, AT_FDCWD, path, UIO_SYSSPACE, &st, NULL); free(path, M_TEMP); if (error) return (error); @@ -195,7 +196,8 @@ svr4_sys_lstat(td, uap) CHECKALTEXIST(td, uap->path, &path); - error = kern_lstat(td, path, UIO_SYSSPACE, &st); + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, path, + UIO_SYSSPACE, &st, NULL); free(path, M_TEMP); if (error) return (error); @@ -238,7 +240,7 @@ svr4_sys_xstat(td, uap) CHECKALTEXIST(td, uap->path, &path); - error = kern_stat(td, path, UIO_SYSSPACE, &st); + error = kern_statat(td, 0, AT_FDCWD, path, UIO_SYSSPACE, &st, NULL); free(path, M_TEMP); if (error) return (error); @@ -265,7 +267,8 @@ svr4_sys_lxstat(td, uap) CHECKALTEXIST(td, uap->path, &path); - error = kern_lstat(td, path, UIO_SYSSPACE, &st); + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, path, + UIO_SYSSPACE, &st, NULL); free(path, M_TEMP); if (error) return (error); @@ -309,7 +312,7 @@ svr4_sys_stat64(td, uap) CHECKALTEXIST(td, uap->path, &path); - error = kern_stat(td, path, UIO_SYSSPACE, &st); + error = kern_statat(td, 0, AT_FDCWD, path, UIO_SYSSPACE, &st, NULL); free(path, M_TEMP); if (error) return (error); @@ -335,7 +338,8 @@ svr4_sys_lstat64(td, uap) CHECKALTEXIST(td, uap->path, &path); - error = kern_lstat(td, path, UIO_SYSSPACE, &st); + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, path, + UIO_SYSSPACE, &st, NULL); free(path, M_TEMP); if (error) return (error); @@ -582,7 +586,8 @@ svr4_sys_utime(td, uap) tp = NULL; CHECKALTEXIST(td, uap->path, &path); - error = kern_utimes(td, path, UIO_SYSSPACE, tp, UIO_SYSSPACE); + error = kern_utimesat(td, AT_FDCWD, path, UIO_SYSSPACE, + tp, UIO_SYSSPACE); free(path, M_TEMP); return (error); } @@ -597,7 +602,8 @@ svr4_sys_utimes(td, uap) int error; CHECKALTEXIST(td, uap->path, &path); - error = kern_utimes(td, path, UIO_SYSSPACE, uap->tptr, UIO_USERSPACE); + error = kern_utimesat(td, AT_FDCWD, path, UIO_SYSSPACE, + uap->tptr, UIO_USERSPACE); free(path, M_TEMP); return (error); } diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c index 91c393f..d287d5d 100644 --- a/sys/compat/svr4/svr4_stream.c +++ b/sys/compat/svr4/svr4_stream.c @@ -282,7 +282,8 @@ clean_pipe(td, path) struct stat st; int error; - error = kern_lstat(td, path, UIO_SYSSPACE, &st); + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, path, + UIO_SYSSPACE, &st, NULL); /* * Make sure we are dealing with a mode 0 named pipe. @@ -293,7 +294,7 @@ clean_pipe(td, path) if ((st.st_mode & ALLPERMS) != 0) return (0); - error = kern_unlink(td, path, UIO_SYSSPACE); + error = kern_unlinkat(td, AT_FDCWD, path, UIO_SYSSPACE, 0); if (error) DPRINTF(("clean_pipe: unlink failed %d\n", error)); return (error); @@ -812,7 +813,7 @@ ti_bind(fp, fd, ioc, td) DPRINTF(("TI_BIND: fileno %d\n", fd)); - if ((error = kern_bind(td, fd, skp)) != 0) { + if ((error = kern_bindat(td, AT_FDCWD, fd, skp)) != 0) { DPRINTF(("TI_BIND: bind failed %d\n", error)); return error; } @@ -1586,7 +1587,7 @@ svr4_do_putmsg(td, uap, fp) case SVR4_TI_CONNECT_REQUEST: /* connect */ { - return (kern_connect(td, uap->fd, sa)); + return (kern_connectat(td, AT_FDCWD, uap->fd, sa)); } case SVR4_TI_SENDTO_REQUEST: /* sendto */ diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c index 42265a4..6a9219e 100644 --- a/sys/dev/streams/streams.c +++ b/sys/dev/streams/streams.c @@ -302,7 +302,8 @@ svr4_ptm_alloc(td) ptyname[8] = ttyletters[l]; ptyname[9] = ttynumbers[n]; - error = kern_open(td, ptyname, UIO_SYSSPACE, O_RDWR, 0); + error = kern_openat(td, AT_FDCWD, ptyname, UIO_SYSSPACE, + O_RDWR, 0); switch (error) { case ENOENT: case ENXIO: diff --git a/sys/i386/ibcs2/ibcs2_fcntl.c b/sys/i386/ibcs2/ibcs2_fcntl.c index d2489df..5d06d4d 100644 --- a/sys/i386/ibcs2/ibcs2_fcntl.c +++ b/sys/i386/ibcs2/ibcs2_fcntl.c @@ -189,7 +189,7 @@ ibcs2_open(td, uap) CHECKALTCREAT(td, uap->path, &path); else CHECKALTEXIST(td, uap->path, &path); - ret = kern_open(td, path, UIO_SYSSPACE, flags, uap->mode); + ret = kern_openat(td, AT_FDCWD, path, UIO_SYSSPACE, flags, uap->mode); #ifdef SPX_HACK if (ret == ENXIO) { @@ -230,8 +230,8 @@ ibcs2_creat(td, uap) int error; CHECKALTCREAT(td, uap->path, &path); - error = kern_open(td, path, UIO_SYSSPACE, O_WRONLY | O_CREAT | O_TRUNC, - uap->mode); + error = kern_openat(td, AT_FDCWD, path, UIO_SYSSPACE, + O_WRONLY | O_CREAT | O_TRUNC, uap->mode); free(path, M_TEMP); return (error); } @@ -245,7 +245,7 @@ ibcs2_access(td, uap) int error; CHECKALTEXIST(td, uap->path, &path); - error = kern_access(td, path, UIO_SYSSPACE, uap->amode); + error = kern_accessat(td, AT_FDCWD, path, UIO_SYSSPACE, 0, uap->amode); free(path, M_TEMP); return (error); } diff --git a/sys/i386/ibcs2/ibcs2_misc.c b/sys/i386/ibcs2/ibcs2_misc.c index 42bc4b7..d81cfee 100644 --- a/sys/i386/ibcs2/ibcs2_misc.c +++ b/sys/i386/ibcs2/ibcs2_misc.c @@ -646,10 +646,13 @@ ibcs2_mknod(td, uap) int error; CHECKALTCREAT(td, uap->path, &path); - if (S_ISFIFO(uap->mode)) - error = kern_mkfifo(td, path, UIO_SYSSPACE, uap->mode); - else - error = kern_mknod(td, path, UIO_SYSSPACE, uap->mode, uap->dev); + if (S_ISFIFO(uap->mode)) { + error = kern_mkfifoat(td, AT_FDCWD, path, + UIO_SYSSPACE, uap->mode); + } else { + error = kern_mknodat(td, AT_FDCWD, path, UIO_SYSSPACE, + uap->mode, uap->dev); + } free(path, M_TEMP); return (error); } @@ -938,7 +941,8 @@ ibcs2_utime(td, uap) tp = NULL; CHECKALTEXIST(td, uap->path, &path); - error = kern_utimes(td, path, UIO_SYSSPACE, tp, UIO_SYSSPACE); + error = kern_utimesat(td, AT_FDCWD, path, UIO_SYSSPACE, + tp, UIO_SYSSPACE); free(path, M_TEMP); return (error); } @@ -1119,7 +1123,7 @@ ibcs2_unlink(td, uap) int error; CHECKALTEXIST(td, uap->path, &path); - error = kern_unlink(td, path, UIO_SYSSPACE); + error = kern_unlinkat(td, AT_FDCWD, path, UIO_SYSSPACE, 0); free(path, M_TEMP); return (error); } @@ -1147,7 +1151,7 @@ ibcs2_chmod(td, uap) int error; CHECKALTEXIST(td, uap->path, &path); - error = kern_chmod(td, path, UIO_SYSSPACE, uap->mode); + error = kern_fchmodat(td, AT_FDCWD, path, UIO_SYSSPACE, uap->mode, 0); free(path, M_TEMP); return (error); } @@ -1161,7 +1165,8 @@ ibcs2_chown(td, uap) int error; CHECKALTEXIST(td, uap->path, &path); - error = kern_chown(td, path, UIO_SYSSPACE, uap->uid, uap->gid); + error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, uap->uid, + uap->gid, 0); free(path, M_TEMP); return (error); } @@ -1175,7 +1180,7 @@ ibcs2_rmdir(td, uap) int error; CHECKALTEXIST(td, uap->path, &path); - error = kern_rmdir(td, path, UIO_SYSSPACE); + error = kern_rmdirat(td, AT_FDCWD, path, UIO_SYSSPACE); free(path, M_TEMP); return (error); } @@ -1189,7 +1194,7 @@ ibcs2_mkdir(td, uap) int error; CHECKALTEXIST(td, uap->path, &path); - error = kern_mkdir(td, path, UIO_SYSSPACE, uap->mode); + error = kern_mkdirat(td, AT_FDCWD, path, UIO_SYSSPACE, uap->mode); free(path, M_TEMP); return (error); } @@ -1213,7 +1218,7 @@ ibcs2_symlink(td, uap) free(path, M_TEMP); return (error); } - error = kern_symlink(td, path, link, UIO_SYSSPACE); + error = kern_symlinkat(td, path, AT_FDCWD, link, UIO_SYSSPACE); free(path, M_TEMP); free(link, M_TEMP); return (error); @@ -1238,7 +1243,7 @@ ibcs2_rename(td, uap) free(from, M_TEMP); return (error); } - error = kern_rename(td, from, to, UIO_SYSSPACE); + error = kern_renameat(td, AT_FDCWD, from, AT_FDCWD, to, UIO_SYSSPACE); free(from, M_TEMP); free(to, M_TEMP); return (error); @@ -1253,8 +1258,8 @@ ibcs2_readlink(td, uap) int error; CHECKALTEXIST(td, uap->path, &path); - error = kern_readlink(td, path, UIO_SYSSPACE, uap->buf, UIO_USERSPACE, - uap->count); + error = kern_readlinkat(td, AT_FDCWD, path, UIO_SYSSPACE, + uap->buf, UIO_USERSPACE, uap->count); free(path, M_TEMP); return (error); } diff --git a/sys/i386/ibcs2/ibcs2_other.c b/sys/i386/ibcs2/ibcs2_other.c index f688661..b49e605 100644 --- a/sys/i386/ibcs2/ibcs2_other.c +++ b/sys/i386/ibcs2/ibcs2_other.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -107,7 +108,7 @@ spx_open(struct thread *td) sun.sun_len = sizeof(struct sockaddr_un) - sizeof(sun.sun_path) + strlen(sun.sun_path) + 1; - error = kern_connect(td, fd, (struct sockaddr *)&sun); + error = kern_connectat(td, AT_FDCWD, fd, (struct sockaddr *)&sun); if (error) { kern_close(td, fd); return error; diff --git a/sys/i386/ibcs2/ibcs2_stat.c b/sys/i386/ibcs2/ibcs2_stat.c index c1097a3..55d14af 100644 --- a/sys/i386/ibcs2/ibcs2_stat.c +++ b/sys/i386/ibcs2/ibcs2_stat.c @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -145,7 +146,7 @@ ibcs2_stat(td, uap) CHECKALTEXIST(td, uap->path, &path); - error = kern_stat(td, path, UIO_SYSSPACE, &st); + error = kern_statat(td, 0, AT_FDCWD, path, UIO_SYSSPACE, &st, NULL); free(path, M_TEMP); if (error) return (error); @@ -166,7 +167,8 @@ ibcs2_lstat(td, uap) CHECKALTEXIST(td, uap->path, &path); - error = kern_lstat(td, path, UIO_SYSSPACE, &st); + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, path, + UIO_SYSSPACE, &st, NULL); free(path, M_TEMP); if (error) return (error); diff --git a/sys/i386/ibcs2/ibcs2_xenix.c b/sys/i386/ibcs2/ibcs2_xenix.c index c5416fb..829f6ab 100644 --- a/sys/i386/ibcs2/ibcs2_xenix.c +++ b/sys/i386/ibcs2/ibcs2_xenix.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -209,7 +210,8 @@ xenix_eaccess(struct thread *td, struct xenix_eaccess_args *uap) bsd_flags |= X_OK; CHECKALTEXIST(td, uap->path, &path); - error = kern_eaccess(td, path, UIO_SYSSPACE, bsd_flags); + error = kern_accessat(td, AT_FDCWD, path, UIO_SYSSPACE, + AT_EACCESS, bsd_flags); free(path, M_TEMP); return (error); } diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 32c837c..7f88a6c 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2215,8 +2215,8 @@ fdcheckstd(struct thread *td) if (devnull != -1) { error = do_dup(td, DUP_FIXED, devnull, i); } else { - error = kern_open(td, "/dev/null", UIO_SYSSPACE, - O_RDWR, 0); + error = kern_openat(td, AT_FDCWD, "/dev/null", + UIO_SYSSPACE, O_RDWR, 0); if (error == 0) { devnull = td->td_retval[0]; KASSERT(devnull == i, ("we didn't get our fd")); diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 6d423ba..24a4436 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -283,13 +283,13 @@ sys_bind(td, uap) error = getsockaddr(&sa, uap->name, uap->namelen); if (error == 0) { - error = kern_bind(td, uap->s, sa); + error = kern_bindat(td, AT_FDCWD, uap->s, sa); free(sa, M_SONAME); } return (error); } -static int +int kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa) { struct socket *so; @@ -323,13 +323,6 @@ kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa) return (error); } -int -kern_bind(struct thread *td, int fd, struct sockaddr *sa) -{ - - return (kern_bindat(td, AT_FDCWD, fd, sa)); -} - /* ARGSUSED */ int sys_bindat(td, uap) @@ -636,13 +629,13 @@ sys_connect(td, uap) error = getsockaddr(&sa, uap->name, uap->namelen); if (error == 0) { - error = kern_connect(td, uap->s, sa); + error = kern_connectat(td, AT_FDCWD, uap->s, sa); free(sa, M_SONAME); } return (error); } -static int +int kern_connectat(struct thread *td, int dirfd, int fd, struct sockaddr *sa) { struct socket *so; @@ -705,13 +698,6 @@ done1: return (error); } -int -kern_connect(struct thread *td, int fd, struct sockaddr *sa) -{ - - return (kern_connectat(td, AT_FDCWD, fd, sa)); -} - /* ARGSUSED */ int sys_connectat(td, uap) diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c index 2816e1b..a050099 100644 --- a/sys/kern/vfs_mountroot.c +++ b/sys/kern/vfs_mountroot.c @@ -238,7 +238,7 @@ vfs_mountroot_devfs(struct thread *td, struct mount **mpp) *mpp = mp; set_rootvnode(); - error = kern_symlink(td, "/", "dev", UIO_SYSSPACE); + error = kern_symlinkat(td, "/", AT_FDCWD, "dev", UIO_SYSSPACE); if (error) printf("kern_symlink /dev -> / returns %d\n", error); @@ -350,7 +350,8 @@ vfs_mountroot_shuffle(struct thread *td, struct mount *mpdevfs) if (mporoot == mpdevfs) { vfs_unbusy(mpdevfs); /* Unlink the no longer needed /dev/dev -> / symlink */ - error = kern_unlink(td, "/dev/dev", UIO_SYSSPACE); + error = kern_unlinkat(td, AT_FDCWD, "/dev/dev", + UIO_SYSSPACE, 0); if (error && bootverbose) printf("mountroot: unable to unlink /dev/dev " "(error %d)\n", error); @@ -524,12 +525,13 @@ parse_dir_md(char **conf) free(tok, M_TEMP); /* Get file status. */ - error = kern_stat(td, path, UIO_SYSSPACE, &sb); + error = kern_statat(td, 0, AT_FDCWD, path, UIO_SYSSPACE, &sb, NULL); if (error) goto out; /* Open /dev/mdctl so that we can attach/detach. */ - error = kern_open(td, "/dev/" MDCTL_NAME, UIO_SYSSPACE, O_RDWR, 0); + error = kern_openat(td, AT_FDCWD, "/dev/" MDCTL_NAME, UIO_SYSSPACE, + O_RDWR, 0); if (error) goto out; diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 04c1c7b..f6a8ae0 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1017,7 +1017,8 @@ sys_open(td, uap) } */ *uap; { - return (kern_open(td, uap->path, UIO_USERSPACE, uap->flags, uap->mode)); + return (kern_openat(td, AT_FDCWD, uap->path, UIO_USERSPACE, + uap->flags, uap->mode)); } #ifndef _SYS_SYSPROTO_H_ @@ -1037,14 +1038,6 @@ sys_openat(struct thread *td, struct openat_args *uap) } int -kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags, - int mode) -{ - - return (kern_openat(td, AT_FDCWD, path, pathseg, flags, mode)); -} - -int kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg, int flags, int mode) { @@ -1202,7 +1195,7 @@ ocreat(td, uap) } */ *uap; { - return (kern_open(td, uap->path, UIO_USERSPACE, + return (kern_openat(td, AT_FDCWD, uap->path, UIO_USERSPACE, O_WRONLY | O_CREAT | O_TRUNC, uap->mode)); } #endif /* COMPAT_43 */ @@ -1227,7 +1220,8 @@ sys_mknod(td, uap) } */ *uap; { - return (kern_mknod(td, uap->path, UIO_USERSPACE, uap->mode, uap->dev)); + return (kern_mknodat(td, AT_FDCWD, uap->path, UIO_USERSPACE, + uap->mode, uap->dev)); } #ifndef _SYS_SYSPROTO_H_ @@ -1247,14 +1241,6 @@ sys_mknodat(struct thread *td, struct mknodat_args *uap) } int -kern_mknod(struct thread *td, char *path, enum uio_seg pathseg, int mode, - int dev) -{ - - return (kern_mknodat(td, AT_FDCWD, path, pathseg, mode, dev)); -} - -int kern_mknodat(struct thread *td, int fd, char *path, enum uio_seg pathseg, int mode, int dev) { @@ -1373,7 +1359,8 @@ sys_mkfifo(td, uap) } */ *uap; { - return (kern_mkfifo(td, uap->path, UIO_USERSPACE, uap->mode)); + return (kern_mkfifoat(td, AT_FDCWD, uap->path, UIO_USERSPACE, + uap->mode)); } #ifndef _SYS_SYSPROTO_H_ @@ -1392,13 +1379,6 @@ sys_mkfifoat(struct thread *td, struct mkfifoat_args *uap) } int -kern_mkfifo(struct thread *td, char *path, enum uio_seg pathseg, int mode) -{ - - return (kern_mkfifoat(td, AT_FDCWD, path, pathseg, mode)); -} - -int kern_mkfifoat(struct thread *td, int fd, char *path, enum uio_seg pathseg, int mode) { @@ -1470,7 +1450,8 @@ sys_link(td, uap) } */ *uap; { - return (kern_link(td, uap->path, uap->link, UIO_USERSPACE)); + return (kern_linkat(td, AT_FDCWD, AT_FDCWD, uap->path, uap->link, + UIO_USERSPACE, FOLLOW)); } #ifndef _SYS_SYSPROTO_H_ @@ -1535,13 +1516,6 @@ can_hardlink(struct vnode *vp, struct ucred *cred) } int -kern_link(struct thread *td, char *path, char *link, enum uio_seg segflg) -{ - - return (kern_linkat(td, AT_FDCWD, AT_FDCWD, path,link, segflg, FOLLOW)); -} - -int kern_linkat(struct thread *td, int fd1, int fd2, char *path1, char *path2, enum uio_seg segflg, int follow) { @@ -1643,7 +1617,8 @@ sys_symlink(td, uap) } */ *uap; { - return (kern_symlink(td, uap->path, uap->link, UIO_USERSPACE)); + return (kern_symlinkat(td, uap->path, AT_FDCWD, uap->link, + UIO_USERSPACE)); } #ifndef _SYS_SYSPROTO_H_ @@ -1662,13 +1637,6 @@ sys_symlinkat(struct thread *td, struct symlinkat_args *uap) } int -kern_symlink(struct thread *td, char *path, char *link, enum uio_seg segflg) -{ - - return (kern_symlinkat(td, path, AT_FDCWD, link, segflg)); -} - -int kern_symlinkat(struct thread *td, char *path1, int fd, char *path2, enum uio_seg segflg) { @@ -1796,7 +1764,7 @@ sys_unlink(td, uap) } */ *uap; { - return (kern_unlink(td, uap->path, UIO_USERSPACE)); + return (kern_unlinkat(td, AT_FDCWD, uap->path, UIO_USERSPACE, 0)); } #ifndef _SYS_SYSPROTO_H_ @@ -1823,13 +1791,6 @@ sys_unlinkat(struct thread *td, struct unlinkat_args *uap) } int -kern_unlink(struct thread *td, char *path, enum uio_seg pathseg) -{ - - return (kern_unlinkat(td, AT_FDCWD, path, pathseg, 0)); -} - -int kern_unlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg, ino_t oldinum) { @@ -2032,7 +1993,8 @@ sys_access(td, uap) } */ *uap; { - return (kern_access(td, uap->path, UIO_USERSPACE, uap->amode)); + return (kern_accessat(td, AT_FDCWD, uap->path, UIO_USERSPACE, + 0, uap->amode)); } #ifndef _SYS_SYSPROTO_H_ @@ -2047,20 +2009,11 @@ int sys_faccessat(struct thread *td, struct faccessat_args *uap) { - if (uap->flag & ~AT_EACCESS) - return (EINVAL); return (kern_accessat(td, uap->fd, uap->path, UIO_USERSPACE, uap->flag, uap->amode)); } int -kern_access(struct thread *td, char *path, enum uio_seg pathseg, int amode) -{ - - return (kern_accessat(td, AT_FDCWD, path, pathseg, 0, amode)); -} - -int kern_accessat(struct thread *td, int fd, char *path, enum uio_seg pathseg, int flag, int amode) { @@ -2070,6 +2023,8 @@ kern_accessat(struct thread *td, int fd, char *path, enum uio_seg pathseg, cap_rights_t rights; int error; + if (flag & ~AT_EACCESS) + return (EINVAL); if (amode != F_OK && (amode & ~(R_OK | W_OK | X_OK)) != 0) return (EINVAL); @@ -2124,14 +2079,8 @@ sys_eaccess(td, uap) } */ *uap; { - return (kern_eaccess(td, uap->path, UIO_USERSPACE, uap->amode)); -} - -int -kern_eaccess(struct thread *td, char *path, enum uio_seg pathseg, int amode) -{ - - return (kern_accessat(td, AT_FDCWD, path, pathseg, AT_EACCESS, amode)); + return (kern_accessat(td, AT_FDCWD, uap->path, UIO_USERSPACE, + AT_EACCESS, uap->amode)); } #if defined(COMPAT_43) @@ -2156,7 +2105,8 @@ ostat(td, uap) struct ostat osb; int error; - error = kern_stat(td, uap->path, UIO_USERSPACE, &sb); + error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, + &sb, NULL); if (error != 0) return (error); cvtstat(&sb, &osb); @@ -2184,7 +2134,8 @@ olstat(td, uap) struct ostat osb; int error; - error = kern_lstat(td, uap->path, UIO_USERSPACE, &sb); + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path, + UIO_USERSPACE, &sb, NULL); if (error != 0) return (error); cvtstat(&sb, &osb); @@ -2241,7 +2192,8 @@ sys_stat(td, uap) struct stat sb; int error; - error = kern_stat(td, uap->path, UIO_USERSPACE, &sb); + error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, + &sb, NULL); if (error == 0) error = copyout(&sb, uap->ub, sizeof (sb)); return (error); @@ -2262,29 +2214,14 @@ sys_fstatat(struct thread *td, struct fstatat_args *uap) int error; error = kern_statat(td, uap->flag, uap->fd, uap->path, - UIO_USERSPACE, &sb); + UIO_USERSPACE, &sb, NULL); if (error == 0) error = copyout(&sb, uap->buf, sizeof (sb)); return (error); } int -kern_stat(struct thread *td, char *path, enum uio_seg pathseg, struct stat *sbp) -{ - - return (kern_statat(td, 0, AT_FDCWD, path, pathseg, sbp)); -} - -int kern_statat(struct thread *td, int flag, int fd, char *path, - enum uio_seg pathseg, struct stat *sbp) -{ - - return (kern_statat_vnhook(td, flag, fd, path, pathseg, sbp, NULL)); -} - -int -kern_statat_vnhook(struct thread *td, int flag, int fd, char *path, enum uio_seg pathseg, struct stat *sbp, void (*hook)(struct vnode *vp, struct stat *sbp)) { @@ -2342,20 +2279,13 @@ sys_lstat(td, uap) struct stat sb; int error; - error = kern_lstat(td, uap->path, UIO_USERSPACE, &sb); + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path, + UIO_USERSPACE, &sb, NULL); if (error == 0) error = copyout(&sb, uap->ub, sizeof (sb)); return (error); } -int -kern_lstat(struct thread *td, char *path, enum uio_seg pathseg, struct stat *sbp) -{ - - return (kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, path, pathseg, - sbp)); -} - /* * Implementation of the NetBSD [l]stat() functions. */ @@ -2402,7 +2332,8 @@ sys_nstat(td, uap) struct nstat nsb; int error; - error = kern_stat(td, uap->path, UIO_USERSPACE, &sb); + error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, + &sb, NULL); if (error != 0) return (error); cvtnstat(&sb, &nsb); @@ -2430,7 +2361,8 @@ sys_nlstat(td, uap) struct nstat nsb; int error; - error = kern_lstat(td, uap->path, UIO_USERSPACE, &sb); + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path, + UIO_USERSPACE, &sb, NULL); if (error != 0) return (error); cvtnstat(&sb, &nsb); @@ -2519,8 +2451,8 @@ sys_readlink(td, uap) } */ *uap; { - return (kern_readlink(td, uap->path, UIO_USERSPACE, uap->buf, - UIO_USERSPACE, uap->count)); + return (kern_readlinkat(td, AT_FDCWD, uap->path, UIO_USERSPACE, + uap->buf, UIO_USERSPACE, uap->count)); } #ifndef _SYS_SYSPROTO_H_ struct readlinkat_args { @@ -2539,15 +2471,6 @@ sys_readlinkat(struct thread *td, struct readlinkat_args *uap) } int -kern_readlink(struct thread *td, char *path, enum uio_seg pathseg, char *buf, - enum uio_seg bufseg, size_t count) -{ - - return (kern_readlinkat(td, AT_FDCWD, path, pathseg, buf, bufseg, - count)); -} - -int kern_readlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg, char *buf, enum uio_seg bufseg, size_t count) { @@ -2655,7 +2578,8 @@ sys_chflags(td, uap) } */ *uap; { - return (kern_chflags(td, uap->path, UIO_USERSPACE, uap->flags)); + return (kern_chflagsat(td, AT_FDCWD, uap->path, UIO_USERSPACE, + uap->flags, 0)); } #ifndef _SYS_SYSPROTO_H_ @@ -2680,14 +2604,6 @@ sys_chflagsat(struct thread *td, struct chflagsat_args *uap) return (kern_chflagsat(td, fd, path, UIO_USERSPACE, flags, atflag)); } -static int -kern_chflags(struct thread *td, const char *path, enum uio_seg pathseg, - u_long flags) -{ - - return (kern_chflagsat(td, AT_FDCWD, path, pathseg, flags, 0)); -} - /* * Same as chflags() but doesn't follow symlinks. */ @@ -2808,7 +2724,8 @@ sys_chmod(td, uap) } */ *uap; { - return (kern_chmod(td, uap->path, UIO_USERSPACE, uap->mode)); + return (kern_fchmodat(td, AT_FDCWD, uap->path, UIO_USERSPACE, + uap->mode, 0)); } #ifndef _SYS_SYSPROTO_H_ @@ -2833,13 +2750,6 @@ sys_fchmodat(struct thread *td, struct fchmodat_args *uap) return (kern_fchmodat(td, fd, path, UIO_USERSPACE, mode, flag)); } -int -kern_chmod(struct thread *td, char *path, enum uio_seg pathseg, int mode) -{ - - return (kern_fchmodat(td, AT_FDCWD, path, pathseg, mode, 0)); -} - /* * Change mode of a file given path name (don't follow links.) */ @@ -2961,7 +2871,8 @@ sys_chown(td, uap) } */ *uap; { - return (kern_chown(td, uap->path, UIO_USERSPACE, uap->uid, uap->gid)); + return (kern_fchownat(td, 0, uap->path, UIO_USERSPACE, uap->uid, + uap->gid, 0)); } #ifndef _SYS_SYSPROTO_H_ @@ -2987,14 +2898,6 @@ sys_fchownat(struct thread *td, struct fchownat_args *uap) } int -kern_chown(struct thread *td, char *path, enum uio_seg pathseg, int uid, - int gid) -{ - - return (kern_fchownat(td, AT_FDCWD, path, pathseg, uid, gid, 0)); -} - -int kern_fchownat(struct thread *td, int fd, char *path, enum uio_seg pathseg, int uid, int gid, int flag) { @@ -3035,16 +2938,8 @@ sys_lchown(td, uap) } */ *uap; { - return (kern_lchown(td, uap->path, UIO_USERSPACE, uap->uid, uap->gid)); -} - -int -kern_lchown(struct thread *td, char *path, enum uio_seg pathseg, int uid, - int gid) -{ - - return (kern_fchownat(td, AT_FDCWD, path, pathseg, uid, gid, - AT_SYMLINK_NOFOLLOW)); + return (kern_fchownat(td, AT_FDCWD, uap->path, UIO_USERSPACE, + uap->uid, uap->gid, AT_SYMLINK_NOFOLLOW)); } /* @@ -3174,8 +3069,8 @@ sys_utimes(td, uap) } */ *uap; { - return (kern_utimes(td, uap->path, UIO_USERSPACE, uap->tptr, - UIO_USERSPACE)); + return (kern_utimesat(td, AT_FDCWD, uap->path, UIO_USERSPACE, + uap->tptr, UIO_USERSPACE)); } #ifndef _SYS_SYSPROTO_H_ @@ -3194,14 +3089,6 @@ sys_futimesat(struct thread *td, struct futimesat_args *uap) } int -kern_utimes(struct thread *td, char *path, enum uio_seg pathseg, - struct timeval *tptr, enum uio_seg tptrseg) -{ - - return (kern_utimesat(td, AT_FDCWD, path, pathseg, tptr, tptrseg)); -} - -int kern_utimesat(struct thread *td, int fd, char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg) { @@ -3500,7 +3387,8 @@ sys_rename(td, uap) } */ *uap; { - return (kern_rename(td, uap->from, uap->to, UIO_USERSPACE)); + return (kern_renameat(td, AT_FDCWD, uap->from, AT_FDCWD, + uap->to, UIO_USERSPACE)); } #ifndef _SYS_SYSPROTO_H_ @@ -3520,13 +3408,6 @@ sys_renameat(struct thread *td, struct renameat_args *uap) } int -kern_rename(struct thread *td, char *from, char *to, enum uio_seg pathseg) -{ - - return (kern_renameat(td, AT_FDCWD, from, AT_FDCWD, to, pathseg)); -} - -int kern_renameat(struct thread *td, int oldfd, char *old, int newfd, char *new, enum uio_seg pathseg) { @@ -3675,7 +3556,8 @@ sys_mkdir(td, uap) } */ *uap; { - return (kern_mkdir(td, uap->path, UIO_USERSPACE, uap->mode)); + return (kern_mkdirat(td, AT_FDCWD, uap->path, UIO_USERSPACE, + uap->mode)); } #ifndef _SYS_SYSPROTO_H_ @@ -3693,13 +3575,6 @@ sys_mkdirat(struct thread *td, struct mkdirat_args *uap) } int -kern_mkdir(struct thread *td, char *path, enum uio_seg segflg, int mode) -{ - - return (kern_mkdirat(td, AT_FDCWD, path, segflg, mode)); -} - -int kern_mkdirat(struct thread *td, int fd, char *path, enum uio_seg segflg, int mode) { @@ -3777,14 +3652,7 @@ sys_rmdir(td, uap) } */ *uap; { - return (kern_rmdir(td, uap->path, UIO_USERSPACE)); -} - -int -kern_rmdir(struct thread *td, char *path, enum uio_seg pathseg) -{ - - return (kern_rmdirat(td, AT_FDCWD, path, pathseg)); + return (kern_rmdirat(td, AT_FDCWD, uap->path, UIO_USERSPACE)); } int diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 7098c43..266c619 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -62,22 +62,16 @@ int kern_accept(struct thread *td, int s, struct sockaddr **name, socklen_t *namelen, struct file **fp); int kern_accept4(struct thread *td, int s, struct sockaddr **name, socklen_t *namelen, int flags, struct file **fp); -int kern_access(struct thread *td, char *path, enum uio_seg pathseg, - int flags); int kern_accessat(struct thread *td, int fd, char *path, enum uio_seg pathseg, int flags, int mode); int kern_adjtime(struct thread *td, struct timeval *delta, struct timeval *olddelta); int kern_alternate_path(struct thread *td, const char *prefix, const char *path, enum uio_seg pathseg, char **pathbuf, int create, int dirfd); -int kern_bind(struct thread *td, int fd, struct sockaddr *sa); +int kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa); int kern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds, size_t ncmds); int kern_chdir(struct thread *td, char *path, enum uio_seg pathseg); -int kern_chmod(struct thread *td, char *path, enum uio_seg pathseg, - int mode); -int kern_chown(struct thread *td, char *path, enum uio_seg pathseg, int uid, - int gid); int kern_clock_getcpuclockid2(struct thread *td, id_t id, int which, clockid_t *clk_id); int kern_clock_getres(struct thread *td, clockid_t clock_id, @@ -87,9 +81,8 @@ int kern_clock_gettime(struct thread *td, clockid_t clock_id, int kern_clock_settime(struct thread *td, clockid_t clock_id, struct timespec *ats); int kern_close(struct thread *td, int fd); -int kern_connect(struct thread *td, int fd, struct sockaddr *sa); -int kern_eaccess(struct thread *td, char *path, enum uio_seg pathseg, - int flags); +int kern_connectat(struct thread *td, int dirfd, int fd, + struct sockaddr *sa); int kern_execve(struct thread *td, struct image_args *args, struct mac *mac_p); int kern_fchmodat(struct thread *td, int fd, char *path, @@ -127,26 +120,14 @@ int kern_kevent(struct thread *td, int fd, int nchanges, int nevents, int kern_kldload(struct thread *td, const char *file, int *fileid); int kern_kldstat(struct thread *td, int fileid, struct kld_file_stat *stat); int kern_kldunload(struct thread *td, int fileid, int flags); -int kern_lchown(struct thread *td, char *path, enum uio_seg pathseg, - int uid, int gid); -int kern_link(struct thread *td, char *path, char *link, - enum uio_seg segflg); int kern_linkat(struct thread *td, int fd1, int fd2, char *path1, char *path2, enum uio_seg segflg, int follow); -int kern_lstat(struct thread *td, char *path, enum uio_seg pathseg, - struct stat *sbp); int kern_lutimes(struct thread *td, char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); -int kern_mkdir(struct thread *td, char *path, enum uio_seg segflg, - int mode); int kern_mkdirat(struct thread *td, int fd, char *path, enum uio_seg segflg, int mode); -int kern_mkfifo(struct thread *td, char *path, enum uio_seg pathseg, - int mode); int kern_mkfifoat(struct thread *td, int fd, char *path, enum uio_seg pathseg, int mode); -int kern_mknod(struct thread *td, char *path, enum uio_seg pathseg, - int mode, int dev); int kern_mknodat(struct thread *td, int fd, char *path, enum uio_seg pathseg, int mode, int dev); int kern_msgctl(struct thread *, int, int, struct msqid_ds *); @@ -156,8 +137,6 @@ int kern_nanosleep(struct thread *td, struct timespec *rqt, struct timespec *rmt); int kern_ogetdirentries(struct thread *td, struct ogetdirentries_args *uap, long *ploff); -int kern_open(struct thread *td, char *path, enum uio_seg pathseg, - int flags, int mode); int kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg, int flags, int mode); int kern_pathconf(struct thread *td, char *path, enum uio_seg pathseg, @@ -176,18 +155,13 @@ int kern_pselect(struct thread *td, int nd, fd_set *in, fd_set *ou, int kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data); int kern_pwritev(struct thread *td, int fd, struct uio *auio, off_t offset); -int kern_readlink(struct thread *td, char *path, enum uio_seg pathseg, - char *buf, enum uio_seg bufseg, size_t count); int kern_readlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg, char *buf, enum uio_seg bufseg, size_t count); int kern_readv(struct thread *td, int fd, struct uio *auio); int kern_recvit(struct thread *td, int s, struct msghdr *mp, enum uio_seg fromseg, struct mbuf **controlp); -int kern_rename(struct thread *td, char *from, char *to, - enum uio_seg pathseg); int kern_renameat(struct thread *td, int oldfd, char *old, int newfd, char *new, enum uio_seg pathseg); -int kern_rmdir(struct thread *td, char *path, enum uio_seg pathseg); int kern_rmdirat(struct thread *td, int fd, char *path, enum uio_seg pathseg); int kern_sched_rr_get_interval(struct thread *td, pid_t pid, @@ -220,17 +194,11 @@ int kern_sigprocmask(struct thread *td, int how, int kern_sigsuspend(struct thread *td, sigset_t mask); int kern_sigtimedwait(struct thread *td, sigset_t waitset, struct ksiginfo *ksi, struct timespec *timeout); -int kern_stat(struct thread *td, char *path, enum uio_seg pathseg, - struct stat *sbp); int kern_statat(struct thread *td, int flag, int fd, char *path, - enum uio_seg pathseg, struct stat *sbp); -int kern_statat_vnhook(struct thread *td, int flag, int fd, char *path, enum uio_seg pathseg, struct stat *sbp, void (*hook)(struct vnode *vp, struct stat *sbp)); int kern_statfs(struct thread *td, char *path, enum uio_seg pathseg, struct statfs *buf); -int kern_symlink(struct thread *td, char *path, char *link, - enum uio_seg segflg); int kern_symlinkat(struct thread *td, char *path1, int fd, char *path2, enum uio_seg segflg); int kern_ktimer_create(struct thread *td, clockid_t clock_id, @@ -245,11 +213,8 @@ int kern_thr_new(struct thread *td, struct thr_param *param); int kern_thr_suspend(struct thread *td, struct timespec *tsp); int kern_truncate(struct thread *td, char *path, enum uio_seg pathseg, off_t length); -int kern_unlink(struct thread *td, char *path, enum uio_seg pathseg); int kern_unlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg, ino_t oldinum); -int kern_utimes(struct thread *td, char *path, enum uio_seg pathseg, - struct timeval *tptr, enum uio_seg tptrseg); int kern_utimesat(struct thread *td, int fd, char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); int kern_wait(struct thread *td, pid_t pid, int *status, int options, From owner-freebsd-fs@FreeBSD.ORG Wed Nov 12 15:58:46 2014 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C57324B4; Wed, 12 Nov 2014 15:58:46 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A042E23D; Wed, 12 Nov 2014 15:58:46 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 22EDBB94F; Wed, 12 Nov 2014 10:58:45 -0500 (EST) From: John Baldwin To: freebsd-arch@freebsd.org Subject: Re: Removal of kern_xxx() no-at variants. Date: Wed, 12 Nov 2014 10:14:04 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <20141112132451.GM17068@kib.kiev.ua> In-Reply-To: <20141112132451.GM17068@kib.kiev.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201411121014.04482.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 12 Nov 2014 10:58:45 -0500 (EST) Cc: arch@freebsd.org, fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2014 15:58:46 -0000 On Wednesday, November 12, 2014 8:24:52 am Konstantin Belousov wrote: > We have 'fat' KPI for kern_open() and other vfs syscall helpers, after > the at-version of the syscalls was added somewhere at 8-CURRENT. > For instance, we provide > kern_open() and kern_openat(). > But more, we provide > kern_stat() > kern_lstat() > kern_statat() > kern_statat_vhook() > first three being a trivial wrapper around kern_statat_vhook(). > More, existence of two or (sometimes) three layers around basic > syscall helper causes issues like r271655 making the argument > validation split. > > Kepping the compat layer was reasonable in 8-CURRENT time when the > at variants were experimental and patch to add the syscalls was > already large and error-prone. Now, I think we should shave the > extra call indirections, it costs nothing at callers and sometimes > even improves the code. The idea sounds fine to me. Note that I only did a glance over the diff rather than a thorough review. -- John Baldwin From owner-freebsd-fs@FreeBSD.ORG Wed Nov 12 18:02:15 2014 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACEDCD1 for ; Wed, 12 Nov 2014 18:02:15 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95049229 for ; Wed, 12 Nov 2014 18:02:15 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sACI2FYY074650 for ; Wed, 12 Nov 2014 18:02:15 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 188187] [zfs] [panic] 10-stable: Kernel panic on zpool import: integer divide fault Date: Wed, 12 Nov 2014 18:02:15 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: danm@vivocore.com X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2014 18:02:15 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188187 --- Comment #13 from Dan Milgram --- Thanks, I tried w/ FreeBSD 10.1 RC4 - fails w/ the same assert at essentially the same place (i.e. different LoC due to whatever other changes were made but same function, and same relative line within) 6.90G completed ( 233MB/s) estimated time remaining: 0hr 00min 18sec Assertion failed: (bp->blk_pad[0] == 0), file /usr/src/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c, line 3088. Abort -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-fs@FreeBSD.ORG Wed Nov 12 18:24:15 2014 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2983557 for ; Wed, 12 Nov 2014 18:24:15 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA3DA687 for ; Wed, 12 Nov 2014 18:24:15 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sACIOFSV059374 for ; Wed, 12 Nov 2014 18:24:15 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 188187] [zfs] [panic] 10-stable: Kernel panic on zpool import: integer divide fault Date: Wed, 12 Nov 2014 18:24:15 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: smh@FreeBSD.org X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2014 18:24:15 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188187 --- Comment #14 from Steven Hartland --- (In reply to Dan Milgram from comment #13) > Thanks, I tried w/ FreeBSD 10.1 RC4 - fails w/ the same assert at > essentially the same place (i.e. different LoC due to whatever other changes > were made but same function, and same relative line within) > > 6.90G completed ( 233MB/s) estimated time remaining: 0hr 00min 18sec > Assertion failed: (bp->blk_pad[0] == 0), file > /usr/src/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/ > fs/zfs/zio.c, line 3088. > Abort That's basically saying something wrote the padding bytes which is unexpected so either a coding error or something nasty is happening and the data in that memory location is being overwritten by something else. You might want to run the zdb via gdb and put a break point at that location. When it trips output the state of the zio. Might help show what's going on. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-fs@FreeBSD.ORG Wed Nov 12 19:51:50 2014 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED74B226; Wed, 12 Nov 2014 19:51:50 +0000 (UTC) Received: from dmz-mailsec-scanner-3.mit.edu (dmz-mailsec-scanner-3.mit.edu [18.9.25.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FF8EE8C; Wed, 12 Nov 2014 19:51:49 +0000 (UTC) X-AuditID: 1209190e-f79d46d000003643-12-5463ba4e9337 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) (using TLS with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP id 3F.B0.13891.E4AB3645; Wed, 12 Nov 2014 14:51:42 -0500 (EST) Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id sACJpflK009081; Wed, 12 Nov 2014 14:51:41 -0500 Received: from multics.mit.edu (system-low-sipb.mit.edu [18.187.2.37]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id sACJpdUr031128 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 12 Nov 2014 14:51:40 -0500 Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id sACJpctC005479; Wed, 12 Nov 2014 14:51:38 -0500 (EST) Date: Wed, 12 Nov 2014 14:51:38 -0500 (EST) From: Benjamin Kaduk X-X-Sender: kaduk@multics.mit.edu To: Konstantin Belousov Subject: Re: Removal of kern_xxx() no-at variants. In-Reply-To: <201411121014.04482.jhb@freebsd.org> Message-ID: References: <20141112132451.GM17068@kib.kiev.ua> <201411121014.04482.jhb@freebsd.org> User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplleLIzCtJLcpLzFFi42IRYrdT0fXblRxi0NYnYrFkxjxmi9nTpzFZ HH7iYrH3yHVmi4Zpj9kcWD1mfJrP4rFz1l32AKYoLpuU1JzMstQifbsEroy3T3awFPRwVqye 9ouxgXEWexcjB4eEgInEjPXhXYycQKaYxIV769m6GLk4hARmM0ks/fODGcLZyCjxsGc6C0iV kMAhJom31wMhEg2MEj1n1jCBJFgEtCUmXZjHCmKzCahJPN7bzAoxVlFi86lJzCC2iICuxMcF e8BsZoF0iVuXL7GB2MICRhJ7rv8Eq+cUMJTYM+8+WA2vgKPE7DsXWUEuFRIIlbg3MwAkLCqg I7F6/xQWiBJBiZMzn7BAjNSSWD59G8sERqFZSFKzkKQWMDKtYpRNya3SzU3MzClOTdYtTk7M y0st0jXWy80s0UtNKd3ECAptTkm+HYxfDyodYhTgYFTi4eVYlRQixJpYVlyZe4hRkoNJSZT3 0frkECG+pPyUyozE4oz4otKc1OJDjBIczEoivGxLgHK8KYmVValF+TApaQ4WJXHeTT/4QoQE 0hNLUrNTUwtSi2CyMhwcShK8FjuBGgWLUtNTK9Iyc0oQ0kwcnCDDeYCGf9oBMry4IDG3ODMd In+KUVFKnHc2SEIAJJFRmgfXC0s9rxjFgV4R5tUFWcEDTFtw3a+ABjMBDf4WngQyuCQRISXV wOi/aXWwgdjnK+smewZO+7/K3KFCKFNjlm6rt9IsMXtprbx7bwWz0mQq9bruNSn2HbeL0d/i Ene1TPmE307zlY+T/8SHTLX/l7TIYeJFqciS0v3fS/cJuGcsEr678liKmUr9bx3V+ky9yupL F1yPb1YyFJZ4K+X1bJrbmwcLZrWd8eP79vQwmxJLcUaioRZzUXEiAJDMi+4YAwAA Cc: arch@freebsd.org, fs@freebsd.org, freebsd-arch@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2014 19:51:51 -0000 On Wed, 12 Nov 2014, John Baldwin wrote: > On Wednesday, November 12, 2014 8:24:52 am Konstantin Belousov wrote: > > We have 'fat' KPI for kern_open() and other vfs syscall helpers, after > > the at-version of the syscalls was added somewhere at 8-CURRENT. > > For instance, we provide > > kern_open() and kern_openat(). > > But more, we provide > > kern_stat() > > kern_lstat() > > kern_statat() > > kern_statat_vhook() > > first three being a trivial wrapper around kern_statat_vhook(). > > More, existence of two or (sometimes) three layers around basic > > syscall helper causes issues like r271655 making the argument > > validation split. > > > > Kepping the compat layer was reasonable in 8-CURRENT time when the > > at variants were experimental and patch to add the syscalls was > > already large and error-prone. Now, I think we should shave the > > extra call indirections, it costs nothing at callers and sometimes > > even improves the code. > > The idea sounds fine to me. Note that I only did a glance over the diff > rather than a thorough review. Please do bump __FreeBSD_version along with the change. -Ben From owner-freebsd-fs@FreeBSD.ORG Wed Nov 12 20:23:39 2014 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AACBF17; Wed, 12 Nov 2014 20:23:39 +0000 (UTC) Received: from chez.mckusick.com (chez.mckusick.com [IPv6:2001:5a8:4:7e72:4a5b:39ff:fe12:452]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E425227E; Wed, 12 Nov 2014 20:23:38 +0000 (UTC) Received: from chez.mckusick.com (localhost [127.0.0.1]) by chez.mckusick.com (8.14.3/8.14.3) with ESMTP id sACKNTm7087881; Wed, 12 Nov 2014 12:23:29 -0800 (PST) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201411122023.sACKNTm7087881@chez.mckusick.com> To: Konstantin Belousov Subject: Re: Removal of kern_xxx() no-at variants. In-reply-to: <20141112132451.GM17068@kib.kiev.ua> Date: Wed, 12 Nov 2014 12:23:29 -0800 From: Kirk McKusick Cc: arch@freebsd.org, fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2014 20:23:39 -0000 On Wednesday, November 12, 2014 8:24:52 am Konstantin Belousov wrote: > We have 'fat' KPI for kern_open() and other vfs syscall helpers, after > the at-version of the syscalls was added somewhere at 8-CURRENT. > For instance, we provide > kern_open() and kern_openat(). > But more, we provide > kern_stat() > kern_lstat() > kern_statat() > kern_statat_vhook() > first three being a trivial wrapper around kern_statat_vhook(). > More, existence of two or (sometimes) three layers around basic > syscall helper causes issues like r271655 making the argument > validation split. > > Kepping the compat layer was reasonable in 8-CURRENT time when the > at variants were experimental and patch to add the syscalls was > already large and error-prone. Now, I think we should shave the > extra call indirections, it costs nothing at callers and sometimes > even improves the code. I think this is an excellent idea and helps maintain the FreeBSD philosophy of keeping its code base clean. I have reviewed the diffs and they all look good. Kirk McKusick From owner-freebsd-fs@FreeBSD.ORG Wed Nov 12 20:31:26 2014 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6AF14534; Wed, 12 Nov 2014 20:31:26 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55E3F3A6; Wed, 12 Nov 2014 20:31:26 +0000 (UTC) Received: from janderson.engr.mun.ca (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id sACKVOXf000285; Wed, 12 Nov 2014 20:31:24 GMT (envelope-from jonathan@FreeBSD.org) Message-ID: <5463C39C.2010204@FreeBSD.org> Date: Wed, 12 Nov 2014 17:01:24 -0330 From: Jonathan Anderson User-Agent: Postbox 3.0.11 (Macintosh/20140602) MIME-Version: 1.0 To: Benjamin Kaduk Subject: Re: Removal of kern_xxx() no-at variants. References: <20141112132451.GM17068@kib.kiev.ua> <201411121014.04482.jhb@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, fs@freebsd.org, freebsd-arch@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2014 20:31:26 -0000 A thought: If we're only going to have one of {kern_open,kern_openat}, might it make sense to keep the shorter name rather than the longer one? kern_openat as a name seems meaningful to me only if we're trying to disambiguate it from an also-existent-but-different-meaning kern_open. Jon > Benjamin Kaduk > 12 November 2014 at 16:21 > > Please do bump __FreeBSD_version along with the change. > > -Ben > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > John Baldwin > 12 November 2014 at 11:44 > > The idea sounds fine to me. Note that I only did a glance over the diff > rather than a thorough review. > > Konstantin Belousov > 12 November 2014 at 9:54 > We have 'fat' KPI for kern_open() and other vfs syscall helpers, after > the at-version of the syscalls was added somewhere at 8-CURRENT. > For instance, we provide > kern_open() and kern_openat(). > But more, we provide > kern_stat() > kern_lstat() > kern_statat() > kern_statat_vhook() > first three being a trivial wrapper around kern_statat_vhook(). > More, existence of two or (sometimes) three layers around basic > syscall helper causes issues like r271655 making the argument > validation split. > > Kepping the compat layer was reasonable in 8-CURRENT time when the > at variants were experimental and patch to add the syscalls was > already large and error-prone. Now, I think we should shave the > extra call indirections, it costs nothing at callers and sometimes > even improves the code. > > diff --git a/sys/cddl/compat/opensolaris/sys/vnode.h > b/sys/cddl/compat/opensolaris/sys/vnode.h > index 4e5b1c9..22256cf 100644 > --- a/sys/cddl/compat/opensolaris/sys/vnode.h > +++ b/sys/cddl/compat/opensolaris/sys/vnode.h > @@ -282,7 +282,7 @@ vn_rename(char *from, char *to, enum uio_seg seg) > > ASSERT(seg == UIO_SYSSPACE); > > - return (kern_rename(curthread, from, to, seg)); > + return (kern_renameat(curthread, AT_FDCWD, from, AT_FDCWD, to, seg)); > } > > static __inline int > @@ -292,7 +292,7 @@ vn_remove(char *fnamep, enum uio_seg seg, enum rm > dirflag) > ASSERT(seg == UIO_SYSSPACE); > ASSERT(dirflag == RMFILE); > > - return (kern_unlink(curthread, fnamep, seg)); > + return (kern_unlinkat(curthread, AT_FDCWD, fnamep, seg, 0)); > } > > #endif /* _KERNEL */ > diff --git a/sys/compat/freebsd32/freebsd32_misc.c > b/sys/compat/freebsd32/freebsd32_misc.c > index 5ea062e..9323138 100644 > --- a/sys/compat/freebsd32/freebsd32_misc.c > +++ b/sys/compat/freebsd32/freebsd32_misc.c > @@ -1235,7 +1235,8 @@ freebsd32_utimes(struct thread *td, struct > freebsd32_utimes_args *uap) > sp = s; > } else > sp = NULL; > - return (kern_utimes(td, uap->path, UIO_USERSPACE, sp, UIO_SYSSPACE)); > + return (kern_utimesat(td, AT_FDCWD, uap->path, UIO_USERSPACE, > + sp, UIO_SYSSPACE)); > } > > int > @@ -1723,7 +1724,8 @@ freebsd32_stat(struct thread *td, struct > freebsd32_stat_args *uap) > struct stat32 sb32; > int error; > > - error = kern_stat(td, uap->path, UIO_USERSPACE, &sb); > + error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, > + &sb, NULL); > if (error) > return (error); > copy_stat(&sb, &sb32); > @@ -1739,7 +1741,8 @@ ofreebsd32_stat(struct thread *td, struct > ofreebsd32_stat_args *uap) > struct ostat32 sb32; > int error; > > - error = kern_stat(td, uap->path, UIO_USERSPACE, &sb); > + error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, > + &sb, NULL); > if (error) > return (error); > copy_ostat(&sb, &sb32); > @@ -1787,7 +1790,8 @@ freebsd32_fstatat(struct thread *td, struct > freebsd32_fstatat_args *uap) > struct stat32 ub32; > int error; > > - error = kern_statat(td, uap->flag, uap->fd, uap->path, > UIO_USERSPACE, &ub); > + error = kern_statat(td, uap->flag, uap->fd, uap->path, UIO_USERSPACE, > + &ub, NULL); > if (error) > return (error); > copy_stat(&ub, &ub32); > @@ -1802,7 +1806,8 @@ freebsd32_lstat(struct thread *td, struct > freebsd32_lstat_args *uap) > struct stat32 sb32; > int error; > > - error = kern_lstat(td, uap->path, UIO_USERSPACE, &sb); > + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path, > + UIO_USERSPACE, &sb, NULL); > if (error) > return (error); > copy_stat(&sb, &sb32); > @@ -1818,7 +1823,8 @@ ofreebsd32_lstat(struct thread *td, struct > ofreebsd32_lstat_args *uap) > struct ostat32 sb32; > int error; > > - error = kern_lstat(td, uap->path, UIO_USERSPACE, &sb); > + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path, > + UIO_USERSPACE, &sb, NULL); > if (error) > return (error); > copy_ostat(&sb, &sb32); > diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c > index e56e61f..88303b9 100644 > --- a/sys/compat/linux/linux_file.c > +++ b/sys/compat/linux/linux_file.c > @@ -82,8 +82,8 @@ linux_creat(struct thread *td, struct > linux_creat_args *args) > if (ldebug(creat)) > printf(ARGS(creat, "%s, %d"), path, args->mode); > #endif > - error = kern_open(td, path, UIO_SYSSPACE, O_WRONLY | O_CREAT | O_TRUNC, > - args->mode); > + error = kern_openat(td, AT_FDCWD, path, UIO_SYSSPACE, > + O_WRONLY | O_CREAT | O_TRUNC, args->mode); > LFREEPATH(path); > return (error); > } > @@ -572,7 +572,8 @@ linux_access(struct thread *td, struct > linux_access_args *args) > if (ldebug(access)) > printf(ARGS(access, "%s, %d"), path, args->amode); > #endif > - error = kern_access(td, path, UIO_SYSSPACE, args->amode); > + error = kern_accessat(td, AT_FDCWD, path, UIO_SYSSPACE, 0, > + args->amode); > LFREEPATH(path); > > return (error); > @@ -619,12 +620,15 @@ linux_unlink(struct thread *td, struct > linux_unlink_args *args) > printf(ARGS(unlink, "%s"), path); > #endif > > - error = kern_unlink(td, path, UIO_SYSSPACE); > - if (error == EPERM) > + error = kern_unlinkat(td, AT_FDCWD, path, UIO_SYSSPACE, 0); > + if (error == EPERM) { > /* Introduce POSIX noncompliant behaviour of Linux */ > - if (kern_stat(td, path, UIO_SYSSPACE, &st) == 0) > + if (kern_statat(td, 0, AT_FDCWD, path, UIO_SYSSPACE, &st, > + NULL) == 0) { > if (S_ISDIR(st.st_mode)) > error = EISDIR; > + } > + } > LFREEPATH(path); > return (error); > } > @@ -654,7 +658,7 @@ linux_unlinkat(struct thread *td, struct > linux_unlinkat_args *args) > if (error == EPERM && !(args->flag & LINUX_AT_REMOVEDIR)) { > /* Introduce POSIX noncompliant behaviour of Linux */ > if (kern_statat(td, AT_SYMLINK_NOFOLLOW, dfd, path, > - UIO_SYSSPACE, &st) == 0 && S_ISDIR(st.st_mode)) > + UIO_SYSSPACE, &st, NULL) == 0 && S_ISDIR(st.st_mode)) > error = EISDIR; > } > LFREEPATH(path); > @@ -689,7 +693,8 @@ linux_chmod(struct thread *td, struct > linux_chmod_args *args) > if (ldebug(chmod)) > printf(ARGS(chmod, "%s, %d"), path, args->mode); > #endif > - error = kern_chmod(td, path, UIO_SYSSPACE, args->mode); > + error = kern_fchmodat(td, AT_FDCWD, path, UIO_SYSSPACE, > + args->mode, 0); > LFREEPATH(path); > return (error); > } > @@ -725,7 +730,7 @@ linux_mkdir(struct thread *td, struct > linux_mkdir_args *args) > if (ldebug(mkdir)) > printf(ARGS(mkdir, "%s, %d"), path, args->mode); > #endif > - error = kern_mkdir(td, path, UIO_SYSSPACE, args->mode); > + error = kern_mkdirat(td, AT_FDCWD, path, UIO_SYSSPACE, args->mode); > LFREEPATH(path); > return (error); > } > @@ -760,7 +765,7 @@ linux_rmdir(struct thread *td, struct > linux_rmdir_args *args) > if (ldebug(rmdir)) > printf(ARGS(rmdir, "%s"), path); > #endif > - error = kern_rmdir(td, path, UIO_SYSSPACE); > + error = kern_rmdirat(td, AT_FDCWD, path, UIO_SYSSPACE); > LFREEPATH(path); > return (error); > } > @@ -783,7 +788,7 @@ linux_rename(struct thread *td, struct > linux_rename_args *args) > if (ldebug(rename)) > printf(ARGS(rename, "%s, %s"), from, to); > #endif > - error = kern_rename(td, from, to, UIO_SYSSPACE); > + error = kern_renameat(td, AT_FDCWD, from, AT_FDCWD, to, UIO_SYSSPACE); > LFREEPATH(from); > LFREEPATH(to); > return (error); > @@ -833,7 +838,7 @@ linux_symlink(struct thread *td, struct > linux_symlink_args *args) > if (ldebug(symlink)) > printf(ARGS(symlink, "%s, %s"), path, to); > #endif > - error = kern_symlink(td, path, to, UIO_SYSSPACE); > + error = kern_symlinkat(td, path, AT_FDCWD, to, UIO_SYSSPACE); > LFREEPATH(path); > LFREEPATH(to); > return (error); > @@ -878,8 +883,8 @@ linux_readlink(struct thread *td, struct > linux_readlink_args *args) > printf(ARGS(readlink, "%s, %p, %d"), name, (void *)args->buf, > args->count); > #endif > - error = kern_readlink(td, name, UIO_SYSSPACE, args->buf, UIO_USERSPACE, > - args->count); > + error = kern_readlinkat(td, AT_FDCWD, name, UIO_SYSSPACE, > + args->buf, UIO_USERSPACE, args->count); > LFREEPATH(name); > return (error); > } > @@ -972,7 +977,8 @@ linux_link(struct thread *td, struct > linux_link_args *args) > if (ldebug(link)) > printf(ARGS(link, "%s, %s"), path, to); > #endif > - error = kern_link(td, path, to, UIO_SYSSPACE); > + error = kern_linkat(td, AT_FDCWD, AT_FDCWD, path, to, UIO_SYSSPACE, > + FOLLOW); > LFREEPATH(path); > LFREEPATH(to); > return (error); > @@ -1487,7 +1493,8 @@ linux_chown(struct thread *td, struct > linux_chown_args *args) > if (ldebug(chown)) > printf(ARGS(chown, "%s, %d, %d"), path, args->uid, args->gid); > #endif > - error = kern_chown(td, path, UIO_SYSSPACE, args->uid, args->gid); > + error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, args->uid, > + args->gid, 0); > LFREEPATH(path); > return (error); > } > @@ -1529,7 +1536,8 @@ linux_lchown(struct thread *td, struct > linux_lchown_args *args) > if (ldebug(lchown)) > printf(ARGS(lchown, "%s, %d, %d"), path, args->uid, args->gid); > #endif > - error = kern_lchown(td, path, UIO_SYSSPACE, args->uid, args->gid); > + error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, args->uid, > + args->gid, AT_SYMLINK_NOFOLLOW); > LFREEPATH(path); > return (error); > } > diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c > index ff5e8a2..4433e18 100644 > --- a/sys/compat/linux/linux_misc.c > +++ b/sys/compat/linux/linux_misc.c > @@ -777,7 +777,8 @@ linux_utime(struct thread *td, struct > linux_utime_args *args) > } else > tvp = NULL; > > - error = kern_utimes(td, fname, UIO_SYSSPACE, tvp, UIO_SYSSPACE); > + error = kern_utimesat(td, AT_FDCWD, fname, UIO_SYSSPACE, tvp, > + UIO_SYSSPACE); > LFREEPATH(fname); > return (error); > } > @@ -809,7 +810,8 @@ linux_utimes(struct thread *td, struct > linux_utimes_args *args) > tvp = tv; > } > > - error = kern_utimes(td, fname, UIO_SYSSPACE, tvp, UIO_SYSSPACE); > + error = kern_utimesat(td, AT_FDCWD, fname, UIO_SYSSPACE, > + tvp, UIO_SYSSPACE); > LFREEPATH(fname); > return (error); > } > @@ -914,13 +916,14 @@ linux_mknod(struct thread *td, struct > linux_mknod_args *args) > switch (args->mode & S_IFMT) { > case S_IFIFO: > case S_IFSOCK: > - error = kern_mkfifo(td, path, UIO_SYSSPACE, args->mode); > + error = kern_mkfifoat(td, AT_FDCWD, path, UIO_SYSSPACE, > + args->mode); > break; > > case S_IFCHR: > case S_IFBLK: > - error = kern_mknod(td, path, UIO_SYSSPACE, args->mode, > - args->dev); > + error = kern_mknodat(td, AT_FDCWD, path, UIO_SYSSPACE, > + args->mode, args->dev); > break; > > case S_IFDIR: > @@ -931,7 +934,7 @@ linux_mknod(struct thread *td, struct > linux_mknod_args *args) > args->mode |= S_IFREG; > /* FALLTHROUGH */ > case S_IFREG: > - error = kern_open(td, path, UIO_SYSSPACE, > + error = kern_openat(td, AT_FDCWD, path, UIO_SYSSPACE, > O_WRONLY | O_CREAT | O_TRUNC, args->mode); > if (error == 0) > kern_close(td, td->td_retval[0]); > diff --git a/sys/compat/linux/linux_socket.c > b/sys/compat/linux/linux_socket.c > index 43b255d..61b786f 100644 > --- a/sys/compat/linux/linux_socket.c > +++ b/sys/compat/linux/linux_socket.c > @@ -731,7 +731,7 @@ linux_bind(struct thread *td, struct > linux_bind_args *args) > if (error) > return (error); > > - error = kern_bind(td, args->s, sa); > + error = kern_bindat(td, AT_FDCWD, args->s, sa); > free(sa, M_SONAME); > if (error == EADDRNOTAVAIL && args->namelen != sizeof(struct sockaddr_in)) > return (EINVAL); > @@ -759,7 +759,7 @@ linux_connect(struct thread *td, struct > linux_connect_args *args) > if (error) > return (error); > > - error = kern_connect(td, args->s, sa); > + error = kern_connectat(td, AT_FDCWD, args->s, sa); > free(sa, M_SONAME); > if (error != EISCONN) > return (error); > diff --git a/sys/compat/linux/linux_stats.c > b/sys/compat/linux/linux_stats.c > index 2e05c85..b6dd86d 100644 > --- a/sys/compat/linux/linux_stats.c > +++ b/sys/compat/linux/linux_stats.c > @@ -77,7 +77,7 @@ linux_kern_statat(struct thread *td, int flag, int > fd, char *path, > enum uio_seg pathseg, struct stat *sbp) > { > > - return (kern_statat_vnhook(td, flag, fd, path, pathseg, sbp, > + return (kern_statat(td, flag, fd, path, pathseg, sbp, > translate_vnhook_major_minor)); > } > > diff --git a/sys/compat/linux/linux_uid16.c > b/sys/compat/linux/linux_uid16.c > index c5bf2dd..61f3030 100644 > --- a/sys/compat/linux/linux_uid16.c > +++ b/sys/compat/linux/linux_uid16.c > @@ -121,8 +121,8 @@ linux_chown16(struct thread *td, struct > linux_chown16_args *args) > args->gid); > LIN_SDT_PROBE1(uid16, linux_chown16, conv_path, path); > > - error = kern_chown(td, path, UIO_SYSSPACE, CAST_NOCHG(args->uid), > - CAST_NOCHG(args->gid)); > + error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, > + CAST_NOCHG(args->uid), CAST_NOCHG(args->gid), 0); > LFREEPATH(path); > > LIN_SDT_PROBE1(uid16, linux_chown16, return, error); > @@ -146,8 +146,8 @@ linux_lchown16(struct thread *td, struct > linux_lchown16_args *args) > args->gid); > LIN_SDT_PROBE1(uid16, linux_lchown16, conv_path, path); > > - error = kern_lchown(td, path, UIO_SYSSPACE, CAST_NOCHG(args->uid), > - CAST_NOCHG(args->gid)); > + error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, > + CAST_NOCHG(args->uid), CAST_NOCHG(args->gid), AT_SYMLINK_NOFOLLOW); > LFREEPATH(path); > > LIN_SDT_PROBE1(uid16, linux_lchown16, return, error); > diff --git a/sys/compat/svr4/svr4_fcntl.c b/sys/compat/svr4/svr4_fcntl.c > index c604675..edcfcc107 100644 > --- a/sys/compat/svr4/svr4_fcntl.c > +++ b/sys/compat/svr4/svr4_fcntl.c > @@ -390,7 +390,8 @@ svr4_sys_open(td, uap) > CHECKALTEXIST(td, uap->path, &newpath); > > bsd_flags = svr4_to_bsd_flags(uap->flags); > - error = kern_open(td, newpath, UIO_SYSSPACE, bsd_flags, uap->mode); > + error = kern_openat(td, AT_FDCWD, newpath, UIO_SYSSPACE, bsd_flags, > + uap->mode); > free(newpath, M_TEMP); > > if (error) { > @@ -450,8 +451,8 @@ svr4_sys_creat(td, uap) > > CHECKALTEXIST(td, uap->path, &newpath); > > - error = kern_open(td, newpath, UIO_SYSSPACE, O_WRONLY | O_CREAT | > - O_TRUNC, uap->mode); > + error = kern_openat(td, AT_FDCWD, newpath, UIO_SYSSPACE, > + O_WRONLY | O_CREAT | O_TRUNC, uap->mode); > free(newpath, M_TEMP); > return (error); > } > @@ -494,7 +495,8 @@ svr4_sys_access(td, uap) > int error; > > CHECKALTEXIST(td, uap->path, &newpath); > - error = kern_access(td, newpath, UIO_SYSSPACE, uap->amode); > + error = kern_accessat(td, AT_FDCWD, newpath, UIO_SYSSPACE, > + 0, uap->amode); > free(newpath, M_TEMP); > return (error); > } > diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c > index 0db5453..9e9b020 100644 > --- a/sys/compat/svr4/svr4_misc.c > +++ b/sys/compat/svr4/svr4_misc.c > @@ -653,10 +653,13 @@ svr4_mknod(td, retval, path, mode, dev) > > CHECKALTEXIST(td, path, &newpath); > > - if (S_ISFIFO(mode)) > - error = kern_mkfifo(td, newpath, UIO_SYSSPACE, mode); > - else > - error = kern_mknod(td, newpath, UIO_SYSSPACE, mode, dev); > + if (S_ISFIFO(mode)) { > + error = kern_mkfifoat(td, AT_FDCWD, newpath, UIO_SYSSPACE, > + mode); > + } else { > + error = kern_mknodat(td, AT_FDCWD, newpath, UIO_SYSSPACE, > + mode, dev); > + } > free(newpath, M_TEMP); > return (error); > } > diff --git a/sys/compat/svr4/svr4_stat.c b/sys/compat/svr4/svr4_stat.c > index b686642..6ed9873 100644 > --- a/sys/compat/svr4/svr4_stat.c > +++ b/sys/compat/svr4/svr4_stat.c > @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -170,7 +171,7 @@ svr4_sys_stat(td, uap) > > CHECKALTEXIST(td, uap->path, &path); > > - error = kern_stat(td, path, UIO_SYSSPACE, &st); > + error = kern_statat(td, 0, AT_FDCWD, path, UIO_SYSSPACE, &st, NULL); > free(path, M_TEMP); > if (error) > return (error); > @@ -195,7 +196,8 @@ svr4_sys_lstat(td, uap) > > CHECKALTEXIST(td, uap->path, &path); > > - error = kern_lstat(td, path, UIO_SYSSPACE, &st); > + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, path, > + UIO_SYSSPACE, &st, NULL); > free(path, M_TEMP); > if (error) > return (error); > @@ -238,7 +240,7 @@ svr4_sys_xstat(td, uap) > > CHECKALTEXIST(td, uap->path, &path); > > - error = kern_stat(td, path, UIO_SYSSPACE, &st); > + error = kern_statat(td, 0, AT_FDCWD, path, UIO_SYSSPACE, &st, NULL); > free(path, M_TEMP); > if (error) > return (error); > @@ -265,7 +267,8 @@ svr4_sys_lxstat(td, uap) > > CHECKALTEXIST(td, uap->path, &path); > > - error = kern_lstat(td, path, UIO_SYSSPACE, &st); > + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, path, > + UIO_SYSSPACE, &st, NULL); > free(path, M_TEMP); > if (error) > return (error); > @@ -309,7 +312,7 @@ svr4_sys_stat64(td, uap) > > CHECKALTEXIST(td, uap->path, &path); > > - error = kern_stat(td, path, UIO_SYSSPACE, &st); > + error = kern_statat(td, 0, AT_FDCWD, path, UIO_SYSSPACE, &st, NULL); > free(path, M_TEMP); > if (error) > return (error); > @@ -335,7 +338,8 @@ svr4_sys_lstat64(td, uap) > > CHECKALTEXIST(td, uap->path, &path); > > - error = kern_lstat(td, path, UIO_SYSSPACE, &st); > + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, path, > + UIO_SYSSPACE, &st, NULL); > free(path, M_TEMP); > if (error) > return (error); > @@ -582,7 +586,8 @@ svr4_sys_utime(td, uap) > tp = NULL; > > CHECKALTEXIST(td, uap->path, &path); > - error = kern_utimes(td, path, UIO_SYSSPACE, tp, UIO_SYSSPACE); > + error = kern_utimesat(td, AT_FDCWD, path, UIO_SYSSPACE, > + tp, UIO_SYSSPACE); > free(path, M_TEMP); > return (error); > } > @@ -597,7 +602,8 @@ svr4_sys_utimes(td, uap) > int error; > > CHECKALTEXIST(td, uap->path, &path); > - error = kern_utimes(td, path, UIO_SYSSPACE, uap->tptr, UIO_USERSPACE); > + error = kern_utimesat(td, AT_FDCWD, path, UIO_SYSSPACE, > + uap->tptr, UIO_USERSPACE); > free(path, M_TEMP); > return (error); > } > diff --git a/sys/compat/svr4/svr4_stream.c b/sys/compat/svr4/svr4_stream.c > index 91c393f..d287d5d 100644 > --- a/sys/compat/svr4/svr4_stream.c > +++ b/sys/compat/svr4/svr4_stream.c > @@ -282,7 +282,8 @@ clean_pipe(td, path) > struct stat st; > int error; > > - error = kern_lstat(td, path, UIO_SYSSPACE, &st); > + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, path, > + UIO_SYSSPACE, &st, NULL); > > /* > * Make sure we are dealing with a mode 0 named pipe. > @@ -293,7 +294,7 @@ clean_pipe(td, path) > if ((st.st_mode & ALLPERMS) != 0) > return (0); > > - error = kern_unlink(td, path, UIO_SYSSPACE); > + error = kern_unlinkat(td, AT_FDCWD, path, UIO_SYSSPACE, 0); > if (error) > DPRINTF(("clean_pipe: unlink failed %d\n", error)); > return (error); > @@ -812,7 +813,7 @@ ti_bind(fp, fd, ioc, td) > > DPRINTF(("TI_BIND: fileno %d\n", fd)); > > - if ((error = kern_bind(td, fd, skp)) != 0) { > + if ((error = kern_bindat(td, AT_FDCWD, fd, skp)) != 0) { > DPRINTF(("TI_BIND: bind failed %d\n", error)); > return error; > } > @@ -1586,7 +1587,7 @@ svr4_do_putmsg(td, uap, fp) > case SVR4_TI_CONNECT_REQUEST: /* connect */ > { > > - return (kern_connect(td, uap->fd, sa)); > + return (kern_connectat(td, AT_FDCWD, uap->fd, sa)); > } > > case SVR4_TI_SENDTO_REQUEST: /* sendto */ > diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c > index 42265a4..6a9219e 100644 > --- a/sys/dev/streams/streams.c > +++ b/sys/dev/streams/streams.c > @@ -302,7 +302,8 @@ svr4_ptm_alloc(td) > ptyname[8] = ttyletters[l]; > ptyname[9] = ttynumbers[n]; > > - error = kern_open(td, ptyname, UIO_SYSSPACE, O_RDWR, 0); > + error = kern_openat(td, AT_FDCWD, ptyname, UIO_SYSSPACE, > + O_RDWR, 0); > switch (error) { > case ENOENT: > case ENXIO: > diff --git a/sys/i386/ibcs2/ibcs2_fcntl.c b/sys/i386/ibcs2/ibcs2_fcntl.c > index d2489df..5d06d4d 100644 > --- a/sys/i386/ibcs2/ibcs2_fcntl.c > +++ b/sys/i386/ibcs2/ibcs2_fcntl.c > @@ -189,7 +189,7 @@ ibcs2_open(td, uap) > CHECKALTCREAT(td, uap->path, &path); > else > CHECKALTEXIST(td, uap->path, &path); > - ret = kern_open(td, path, UIO_SYSSPACE, flags, uap->mode); > + ret = kern_openat(td, AT_FDCWD, path, UIO_SYSSPACE, flags, uap->mode); > > #ifdef SPX_HACK > if (ret == ENXIO) { > @@ -230,8 +230,8 @@ ibcs2_creat(td, uap) > int error; > > CHECKALTCREAT(td, uap->path, &path); > - error = kern_open(td, path, UIO_SYSSPACE, O_WRONLY | O_CREAT | O_TRUNC, > - uap->mode); > + error = kern_openat(td, AT_FDCWD, path, UIO_SYSSPACE, > + O_WRONLY | O_CREAT | O_TRUNC, uap->mode); > free(path, M_TEMP); > return (error); > } > @@ -245,7 +245,7 @@ ibcs2_access(td, uap) > int error; > > CHECKALTEXIST(td, uap->path, &path); > - error = kern_access(td, path, UIO_SYSSPACE, uap->amode); > + error = kern_accessat(td, AT_FDCWD, path, UIO_SYSSPACE, 0, uap->amode); > free(path, M_TEMP); > return (error); > } > diff --git a/sys/i386/ibcs2/ibcs2_misc.c b/sys/i386/ibcs2/ibcs2_misc.c > index 42bc4b7..d81cfee 100644 > --- a/sys/i386/ibcs2/ibcs2_misc.c > +++ b/sys/i386/ibcs2/ibcs2_misc.c > @@ -646,10 +646,13 @@ ibcs2_mknod(td, uap) > int error; > > CHECKALTCREAT(td, uap->path, &path); > - if (S_ISFIFO(uap->mode)) > - error = kern_mkfifo(td, path, UIO_SYSSPACE, uap->mode); > - else > - error = kern_mknod(td, path, UIO_SYSSPACE, uap->mode, uap->dev); > + if (S_ISFIFO(uap->mode)) { > + error = kern_mkfifoat(td, AT_FDCWD, path, > + UIO_SYSSPACE, uap->mode); > + } else { > + error = kern_mknodat(td, AT_FDCWD, path, UIO_SYSSPACE, > + uap->mode, uap->dev); > + } > free(path, M_TEMP); > return (error); > } > @@ -938,7 +941,8 @@ ibcs2_utime(td, uap) > tp = NULL; > > CHECKALTEXIST(td, uap->path, &path); > - error = kern_utimes(td, path, UIO_SYSSPACE, tp, UIO_SYSSPACE); > + error = kern_utimesat(td, AT_FDCWD, path, UIO_SYSSPACE, > + tp, UIO_SYSSPACE); > free(path, M_TEMP); > return (error); > } > @@ -1119,7 +1123,7 @@ ibcs2_unlink(td, uap) > int error; > > CHECKALTEXIST(td, uap->path, &path); > - error = kern_unlink(td, path, UIO_SYSSPACE); > + error = kern_unlinkat(td, AT_FDCWD, path, UIO_SYSSPACE, 0); > free(path, M_TEMP); > return (error); > } > @@ -1147,7 +1151,7 @@ ibcs2_chmod(td, uap) > int error; > > CHECKALTEXIST(td, uap->path, &path); > - error = kern_chmod(td, path, UIO_SYSSPACE, uap->mode); > + error = kern_fchmodat(td, AT_FDCWD, path, UIO_SYSSPACE, uap->mode, 0); > free(path, M_TEMP); > return (error); > } > @@ -1161,7 +1165,8 @@ ibcs2_chown(td, uap) > int error; > > CHECKALTEXIST(td, uap->path, &path); > - error = kern_chown(td, path, UIO_SYSSPACE, uap->uid, uap->gid); > + error = kern_fchownat(td, AT_FDCWD, path, UIO_SYSSPACE, uap->uid, > + uap->gid, 0); > free(path, M_TEMP); > return (error); > } > @@ -1175,7 +1180,7 @@ ibcs2_rmdir(td, uap) > int error; > > CHECKALTEXIST(td, uap->path, &path); > - error = kern_rmdir(td, path, UIO_SYSSPACE); > + error = kern_rmdirat(td, AT_FDCWD, path, UIO_SYSSPACE); > free(path, M_TEMP); > return (error); > } > @@ -1189,7 +1194,7 @@ ibcs2_mkdir(td, uap) > int error; > > CHECKALTEXIST(td, uap->path, &path); > - error = kern_mkdir(td, path, UIO_SYSSPACE, uap->mode); > + error = kern_mkdirat(td, AT_FDCWD, path, UIO_SYSSPACE, uap->mode); > free(path, M_TEMP); > return (error); > } > @@ -1213,7 +1218,7 @@ ibcs2_symlink(td, uap) > free(path, M_TEMP); > return (error); > } > - error = kern_symlink(td, path, link, UIO_SYSSPACE); > + error = kern_symlinkat(td, path, AT_FDCWD, link, UIO_SYSSPACE); > free(path, M_TEMP); > free(link, M_TEMP); > return (error); > @@ -1238,7 +1243,7 @@ ibcs2_rename(td, uap) > free(from, M_TEMP); > return (error); > } > - error = kern_rename(td, from, to, UIO_SYSSPACE); > + error = kern_renameat(td, AT_FDCWD, from, AT_FDCWD, to, UIO_SYSSPACE); > free(from, M_TEMP); > free(to, M_TEMP); > return (error); > @@ -1253,8 +1258,8 @@ ibcs2_readlink(td, uap) > int error; > > CHECKALTEXIST(td, uap->path, &path); > - error = kern_readlink(td, path, UIO_SYSSPACE, uap->buf, UIO_USERSPACE, > - uap->count); > + error = kern_readlinkat(td, AT_FDCWD, path, UIO_SYSSPACE, > + uap->buf, UIO_USERSPACE, uap->count); > free(path, M_TEMP); > return (error); > } > diff --git a/sys/i386/ibcs2/ibcs2_other.c b/sys/i386/ibcs2/ibcs2_other.c > index f688661..b49e605 100644 > --- a/sys/i386/ibcs2/ibcs2_other.c > +++ b/sys/i386/ibcs2/ibcs2_other.c > @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#include > #include > #include > #include > @@ -107,7 +108,7 @@ spx_open(struct thread *td) > sun.sun_len = sizeof(struct sockaddr_un) - sizeof(sun.sun_path) + > strlen(sun.sun_path) + 1; > > - error = kern_connect(td, fd, (struct sockaddr *)&sun); > + error = kern_connectat(td, AT_FDCWD, fd, (struct sockaddr *)&sun); > if (error) { > kern_close(td, fd); > return error; > diff --git a/sys/i386/ibcs2/ibcs2_stat.c b/sys/i386/ibcs2/ibcs2_stat.c > index c1097a3..55d14af 100644 > --- a/sys/i386/ibcs2/ibcs2_stat.c > +++ b/sys/i386/ibcs2/ibcs2_stat.c > @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -145,7 +146,7 @@ ibcs2_stat(td, uap) > > CHECKALTEXIST(td, uap->path, &path); > > - error = kern_stat(td, path, UIO_SYSSPACE, &st); > + error = kern_statat(td, 0, AT_FDCWD, path, UIO_SYSSPACE, &st, NULL); > free(path, M_TEMP); > if (error) > return (error); > @@ -166,7 +167,8 @@ ibcs2_lstat(td, uap) > > CHECKALTEXIST(td, uap->path, &path); > > - error = kern_lstat(td, path, UIO_SYSSPACE, &st); > + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, path, > + UIO_SYSSPACE, &st, NULL); > free(path, M_TEMP); > if (error) > return (error); > diff --git a/sys/i386/ibcs2/ibcs2_xenix.c b/sys/i386/ibcs2/ibcs2_xenix.c > index c5416fb..829f6ab 100644 > --- a/sys/i386/ibcs2/ibcs2_xenix.c > +++ b/sys/i386/ibcs2/ibcs2_xenix.c > @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#include > #include > #include > #include > @@ -209,7 +210,8 @@ xenix_eaccess(struct thread *td, struct > xenix_eaccess_args *uap) > bsd_flags |= X_OK; > > CHECKALTEXIST(td, uap->path, &path); > - error = kern_eaccess(td, path, UIO_SYSSPACE, bsd_flags); > + error = kern_accessat(td, AT_FDCWD, path, UIO_SYSSPACE, > + AT_EACCESS, bsd_flags); > free(path, M_TEMP); > return (error); > } > diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c > index 32c837c..7f88a6c 100644 > --- a/sys/kern/kern_descrip.c > +++ b/sys/kern/kern_descrip.c > @@ -2215,8 +2215,8 @@ fdcheckstd(struct thread *td) > if (devnull != -1) { > error = do_dup(td, DUP_FIXED, devnull, i); > } else { > - error = kern_open(td, "/dev/null", UIO_SYSSPACE, > - O_RDWR, 0); > + error = kern_openat(td, AT_FDCWD, "/dev/null", > + UIO_SYSSPACE, O_RDWR, 0); > if (error == 0) { > devnull = td->td_retval[0]; > KASSERT(devnull == i, ("we didn't get our fd")); > diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c > index 6d423ba..24a4436 100644 > --- a/sys/kern/uipc_syscalls.c > +++ b/sys/kern/uipc_syscalls.c > @@ -283,13 +283,13 @@ sys_bind(td, uap) > > error = getsockaddr(&sa, uap->name, uap->namelen); > if (error == 0) { > - error = kern_bind(td, uap->s, sa); > + error = kern_bindat(td, AT_FDCWD, uap->s, sa); > free(sa, M_SONAME); > } > return (error); > } > > -static int > +int > kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa) > { > struct socket *so; > @@ -323,13 +323,6 @@ kern_bindat(struct thread *td, int dirfd, int fd, > struct sockaddr *sa) > return (error); > } > > -int > -kern_bind(struct thread *td, int fd, struct sockaddr *sa) > -{ > - > - return (kern_bindat(td, AT_FDCWD, fd, sa)); > -} > - > /* ARGSUSED */ > int > sys_bindat(td, uap) > @@ -636,13 +629,13 @@ sys_connect(td, uap) > > error = getsockaddr(&sa, uap->name, uap->namelen); > if (error == 0) { > - error = kern_connect(td, uap->s, sa); > + error = kern_connectat(td, AT_FDCWD, uap->s, sa); > free(sa, M_SONAME); > } > return (error); > } > > -static int > +int > kern_connectat(struct thread *td, int dirfd, int fd, struct sockaddr *sa) > { > struct socket *so; > @@ -705,13 +698,6 @@ done1: > return (error); > } > > -int > -kern_connect(struct thread *td, int fd, struct sockaddr *sa) > -{ > - > - return (kern_connectat(td, AT_FDCWD, fd, sa)); > -} > - > /* ARGSUSED */ > int > sys_connectat(td, uap) > diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c > index 2816e1b..a050099 100644 > --- a/sys/kern/vfs_mountroot.c > +++ b/sys/kern/vfs_mountroot.c > @@ -238,7 +238,7 @@ vfs_mountroot_devfs(struct thread *td, struct > mount **mpp) > *mpp = mp; > set_rootvnode(); > > - error = kern_symlink(td, "/", "dev", UIO_SYSSPACE); > + error = kern_symlinkat(td, "/", AT_FDCWD, "dev", UIO_SYSSPACE); > if (error) > printf("kern_symlink /dev -> / returns %d\n", error); > > @@ -350,7 +350,8 @@ vfs_mountroot_shuffle(struct thread *td, struct > mount *mpdevfs) > if (mporoot == mpdevfs) { > vfs_unbusy(mpdevfs); > /* Unlink the no longer needed /dev/dev -> / symlink */ > - error = kern_unlink(td, "/dev/dev", UIO_SYSSPACE); > + error = kern_unlinkat(td, AT_FDCWD, "/dev/dev", > + UIO_SYSSPACE, 0); > if (error && bootverbose) > printf("mountroot: unable to unlink /dev/dev " > "(error %d)\n", error); > @@ -524,12 +525,13 @@ parse_dir_md(char **conf) > free(tok, M_TEMP); > > /* Get file status. */ > - error = kern_stat(td, path, UIO_SYSSPACE, &sb); > + error = kern_statat(td, 0, AT_FDCWD, path, UIO_SYSSPACE, &sb, NULL); > if (error) > goto out; > > /* Open /dev/mdctl so that we can attach/detach. */ > - error = kern_open(td, "/dev/" MDCTL_NAME, UIO_SYSSPACE, O_RDWR, 0); > + error = kern_openat(td, AT_FDCWD, "/dev/" MDCTL_NAME, UIO_SYSSPACE, > + O_RDWR, 0); > if (error) > goto out; > > diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c > index 04c1c7b..f6a8ae0 100644 > --- a/sys/kern/vfs_syscalls.c > +++ b/sys/kern/vfs_syscalls.c > @@ -1017,7 +1017,8 @@ sys_open(td, uap) > } */ *uap; > { > > - return (kern_open(td, uap->path, UIO_USERSPACE, uap->flags, uap->mode)); > + return (kern_openat(td, AT_FDCWD, uap->path, UIO_USERSPACE, > + uap->flags, uap->mode)); > } > > #ifndef _SYS_SYSPROTO_H_ > @@ -1037,14 +1038,6 @@ sys_openat(struct thread *td, struct > openat_args *uap) > } > > int > -kern_open(struct thread *td, char *path, enum uio_seg pathseg, int flags, > - int mode) > -{ > - > - return (kern_openat(td, AT_FDCWD, path, pathseg, flags, mode)); > -} > - > -int > kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg, > int flags, int mode) > { > @@ -1202,7 +1195,7 @@ ocreat(td, uap) > } */ *uap; > { > > - return (kern_open(td, uap->path, UIO_USERSPACE, > + return (kern_openat(td, AT_FDCWD, uap->path, UIO_USERSPACE, > O_WRONLY | O_CREAT | O_TRUNC, uap->mode)); > } > #endif /* COMPAT_43 */ > @@ -1227,7 +1220,8 @@ sys_mknod(td, uap) > } */ *uap; > { > > - return (kern_mknod(td, uap->path, UIO_USERSPACE, uap->mode, uap->dev)); > + return (kern_mknodat(td, AT_FDCWD, uap->path, UIO_USERSPACE, > + uap->mode, uap->dev)); > } > > #ifndef _SYS_SYSPROTO_H_ > @@ -1247,14 +1241,6 @@ sys_mknodat(struct thread *td, struct > mknodat_args *uap) > } > > int > -kern_mknod(struct thread *td, char *path, enum uio_seg pathseg, int mode, > - int dev) > -{ > - > - return (kern_mknodat(td, AT_FDCWD, path, pathseg, mode, dev)); > -} > - > -int > kern_mknodat(struct thread *td, int fd, char *path, enum uio_seg pathseg, > int mode, int dev) > { > @@ -1373,7 +1359,8 @@ sys_mkfifo(td, uap) > } */ *uap; > { > > - return (kern_mkfifo(td, uap->path, UIO_USERSPACE, uap->mode)); > + return (kern_mkfifoat(td, AT_FDCWD, uap->path, UIO_USERSPACE, > + uap->mode)); > } > > #ifndef _SYS_SYSPROTO_H_ > @@ -1392,13 +1379,6 @@ sys_mkfifoat(struct thread *td, struct > mkfifoat_args *uap) > } > > int > -kern_mkfifo(struct thread *td, char *path, enum uio_seg pathseg, int > mode) > -{ > - > - return (kern_mkfifoat(td, AT_FDCWD, path, pathseg, mode)); > -} > - > -int > kern_mkfifoat(struct thread *td, int fd, char *path, enum uio_seg pathseg, > int mode) > { > @@ -1470,7 +1450,8 @@ sys_link(td, uap) > } */ *uap; > { > > - return (kern_link(td, uap->path, uap->link, UIO_USERSPACE)); > + return (kern_linkat(td, AT_FDCWD, AT_FDCWD, uap->path, uap->link, > + UIO_USERSPACE, FOLLOW)); > } > > #ifndef _SYS_SYSPROTO_H_ > @@ -1535,13 +1516,6 @@ can_hardlink(struct vnode *vp, struct ucred *cred) > } > > int > -kern_link(struct thread *td, char *path, char *link, enum uio_seg segflg) > -{ > - > - return (kern_linkat(td, AT_FDCWD, AT_FDCWD, path,link, segflg, FOLLOW)); > -} > - > -int > kern_linkat(struct thread *td, int fd1, int fd2, char *path1, char *path2, > enum uio_seg segflg, int follow) > { > @@ -1643,7 +1617,8 @@ sys_symlink(td, uap) > } */ *uap; > { > > - return (kern_symlink(td, uap->path, uap->link, UIO_USERSPACE)); > + return (kern_symlinkat(td, uap->path, AT_FDCWD, uap->link, > + UIO_USERSPACE)); > } > > #ifndef _SYS_SYSPROTO_H_ > @@ -1662,13 +1637,6 @@ sys_symlinkat(struct thread *td, struct > symlinkat_args *uap) > } > > int > -kern_symlink(struct thread *td, char *path, char *link, enum uio_seg > segflg) > -{ > - > - return (kern_symlinkat(td, path, AT_FDCWD, link, segflg)); > -} > - > -int > kern_symlinkat(struct thread *td, char *path1, int fd, char *path2, > enum uio_seg segflg) > { > @@ -1796,7 +1764,7 @@ sys_unlink(td, uap) > } */ *uap; > { > > - return (kern_unlink(td, uap->path, UIO_USERSPACE)); > + return (kern_unlinkat(td, AT_FDCWD, uap->path, UIO_USERSPACE, 0)); > } > > #ifndef _SYS_SYSPROTO_H_ > @@ -1823,13 +1791,6 @@ sys_unlinkat(struct thread *td, struct > unlinkat_args *uap) > } > > int > -kern_unlink(struct thread *td, char *path, enum uio_seg pathseg) > -{ > - > - return (kern_unlinkat(td, AT_FDCWD, path, pathseg, 0)); > -} > - > -int > kern_unlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg, > ino_t oldinum) > { > @@ -2032,7 +1993,8 @@ sys_access(td, uap) > } */ *uap; > { > > - return (kern_access(td, uap->path, UIO_USERSPACE, uap->amode)); > + return (kern_accessat(td, AT_FDCWD, uap->path, UIO_USERSPACE, > + 0, uap->amode)); > } > > #ifndef _SYS_SYSPROTO_H_ > @@ -2047,20 +2009,11 @@ int > sys_faccessat(struct thread *td, struct faccessat_args *uap) > { > > - if (uap->flag & ~AT_EACCESS) > - return (EINVAL); > return (kern_accessat(td, uap->fd, uap->path, UIO_USERSPACE, uap->flag, > uap->amode)); > } > > int > -kern_access(struct thread *td, char *path, enum uio_seg pathseg, int > amode) > -{ > - > - return (kern_accessat(td, AT_FDCWD, path, pathseg, 0, amode)); > -} > - > -int > kern_accessat(struct thread *td, int fd, char *path, enum uio_seg pathseg, > int flag, int amode) > { > @@ -2070,6 +2023,8 @@ kern_accessat(struct thread *td, int fd, char > *path, enum uio_seg pathseg, > cap_rights_t rights; > int error; > > + if (flag & ~AT_EACCESS) > + return (EINVAL); > if (amode != F_OK && (amode & ~(R_OK | W_OK | X_OK)) != 0) > return (EINVAL); > > @@ -2124,14 +2079,8 @@ sys_eaccess(td, uap) > } */ *uap; > { > > - return (kern_eaccess(td, uap->path, UIO_USERSPACE, uap->amode)); > -} > - > -int > -kern_eaccess(struct thread *td, char *path, enum uio_seg pathseg, int > amode) > -{ > - > - return (kern_accessat(td, AT_FDCWD, path, pathseg, AT_EACCESS, amode)); > + return (kern_accessat(td, AT_FDCWD, uap->path, UIO_USERSPACE, > + AT_EACCESS, uap->amode)); > } > > #if defined(COMPAT_43) > @@ -2156,7 +2105,8 @@ ostat(td, uap) > struct ostat osb; > int error; > > - error = kern_stat(td, uap->path, UIO_USERSPACE, &sb); > + error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, > + &sb, NULL); > if (error != 0) > return (error); > cvtstat(&sb, &osb); > @@ -2184,7 +2134,8 @@ olstat(td, uap) > struct ostat osb; > int error; > > - error = kern_lstat(td, uap->path, UIO_USERSPACE, &sb); > + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path, > + UIO_USERSPACE, &sb, NULL); > if (error != 0) > return (error); > cvtstat(&sb, &osb); > @@ -2241,7 +2192,8 @@ sys_stat(td, uap) > struct stat sb; > int error; > > - error = kern_stat(td, uap->path, UIO_USERSPACE, &sb); > + error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, > + &sb, NULL); > if (error == 0) > error = copyout(&sb, uap->ub, sizeof (sb)); > return (error); > @@ -2262,29 +2214,14 @@ sys_fstatat(struct thread *td, struct > fstatat_args *uap) > int error; > > error = kern_statat(td, uap->flag, uap->fd, uap->path, > - UIO_USERSPACE, &sb); > + UIO_USERSPACE, &sb, NULL); > if (error == 0) > error = copyout(&sb, uap->buf, sizeof (sb)); > return (error); > } > > int > -kern_stat(struct thread *td, char *path, enum uio_seg pathseg, struct > stat *sbp) > -{ > - > - return (kern_statat(td, 0, AT_FDCWD, path, pathseg, sbp)); > -} > - > -int > kern_statat(struct thread *td, int flag, int fd, char *path, > - enum uio_seg pathseg, struct stat *sbp) > -{ > - > - return (kern_statat_vnhook(td, flag, fd, path, pathseg, sbp, NULL)); > -} > - > -int > -kern_statat_vnhook(struct thread *td, int flag, int fd, char *path, > enum uio_seg pathseg, struct stat *sbp, > void (*hook)(struct vnode *vp, struct stat *sbp)) > { > @@ -2342,20 +2279,13 @@ sys_lstat(td, uap) > struct stat sb; > int error; > > - error = kern_lstat(td, uap->path, UIO_USERSPACE, &sb); > + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path, > + UIO_USERSPACE, &sb, NULL); > if (error == 0) > error = copyout(&sb, uap->ub, sizeof (sb)); > return (error); > } > > -int > -kern_lstat(struct thread *td, char *path, enum uio_seg pathseg, > struct stat *sbp) > -{ > - > - return (kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, path, pathseg, > - sbp)); > -} > - > /* > * Implementation of the NetBSD [l]stat() functions. > */ > @@ -2402,7 +2332,8 @@ sys_nstat(td, uap) > struct nstat nsb; > int error; > > - error = kern_stat(td, uap->path, UIO_USERSPACE, &sb); > + error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, > + &sb, NULL); > if (error != 0) > return (error); > cvtnstat(&sb, &nsb); > @@ -2430,7 +2361,8 @@ sys_nlstat(td, uap) > struct nstat nsb; > int error; > > - error = kern_lstat(td, uap->path, UIO_USERSPACE, &sb); > + error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path, > + UIO_USERSPACE, &sb, NULL); > if (error != 0) > return (error); > cvtnstat(&sb, &nsb); > @@ -2519,8 +2451,8 @@ sys_readlink(td, uap) > } */ *uap; > { > > - return (kern_readlink(td, uap->path, UIO_USERSPACE, uap->buf, > - UIO_USERSPACE, uap->count)); > + return (kern_readlinkat(td, AT_FDCWD, uap->path, UIO_USERSPACE, > + uap->buf, UIO_USERSPACE, uap->count)); > } > #ifndef _SYS_SYSPROTO_H_ > struct readlinkat_args { > @@ -2539,15 +2471,6 @@ sys_readlinkat(struct thread *td, struct > readlinkat_args *uap) > } > > int > -kern_readlink(struct thread *td, char *path, enum uio_seg pathseg, > char *buf, > - enum uio_seg bufseg, size_t count) > -{ > - > - return (kern_readlinkat(td, AT_FDCWD, path, pathseg, buf, bufseg, > - count)); > -} > - > -int > kern_readlinkat(struct thread *td, int fd, char *path, enum uio_seg > pathseg, > char *buf, enum uio_seg bufseg, size_t count) > { > @@ -2655,7 +2578,8 @@ sys_chflags(td, uap) > } */ *uap; > { > > - return (kern_chflags(td, uap->path, UIO_USERSPACE, uap->flags)); > + return (kern_chflagsat(td, AT_FDCWD, uap->path, UIO_USERSPACE, > + uap->flags, 0)); > } > > #ifndef _SYS_SYSPROTO_H_ > @@ -2680,14 +2604,6 @@ sys_chflagsat(struct thread *td, struct > chflagsat_args *uap) > return (kern_chflagsat(td, fd, path, UIO_USERSPACE, flags, atflag)); > } > > -static int > -kern_chflags(struct thread *td, const char *path, enum uio_seg pathseg, > - u_long flags) > -{ > - > - return (kern_chflagsat(td, AT_FDCWD, path, pathseg, flags, 0)); > -} > - > /* > * Same as chflags() but doesn't follow symlinks. > */ > @@ -2808,7 +2724,8 @@ sys_chmod(td, uap) > } */ *uap; > { > > - return (kern_chmod(td, uap->path, UIO_USERSPACE, uap->mode)); > + return (kern_fchmodat(td, AT_FDCWD, uap->path, UIO_USERSPACE, > + uap->mode, 0)); > } > > #ifndef _SYS_SYSPROTO_H_ > @@ -2833,13 +2750,6 @@ sys_fchmodat(struct thread *td, struct > fchmodat_args *uap) > return (kern_fchmodat(td, fd, path, UIO_USERSPACE, mode, flag)); > } > > -int > -kern_chmod(struct thread *td, char *path, enum uio_seg pathseg, int mode) > -{ > - > - return (kern_fchmodat(td, AT_FDCWD, path, pathseg, mode, 0)); > -} > - > /* > * Change mode of a file given path name (don't follow links.) > */ > @@ -2961,7 +2871,8 @@ sys_chown(td, uap) > } */ *uap; > { > > - return (kern_chown(td, uap->path, UIO_USERSPACE, uap->uid, uap->gid)); > + return (kern_fchownat(td, 0, uap->path, UIO_USERSPACE, uap->uid, > + uap->gid, 0)); > } > > #ifndef _SYS_SYSPROTO_H_ > @@ -2987,14 +2898,6 @@ sys_fchownat(struct thread *td, struct > fchownat_args *uap) > } > > int > -kern_chown(struct thread *td, char *path, enum uio_seg pathseg, int uid, > - int gid) > -{ > - > - return (kern_fchownat(td, AT_FDCWD, path, pathseg, uid, gid, 0)); > -} > - > -int > kern_fchownat(struct thread *td, int fd, char *path, enum uio_seg pathseg, > int uid, int gid, int flag) > { > @@ -3035,16 +2938,8 @@ sys_lchown(td, uap) > } */ *uap; > { > > - return (kern_lchown(td, uap->path, UIO_USERSPACE, uap->uid, uap->gid)); > -} > - > -int > -kern_lchown(struct thread *td, char *path, enum uio_seg pathseg, int uid, > - int gid) > -{ > - > - return (kern_fchownat(td, AT_FDCWD, path, pathseg, uid, gid, > - AT_SYMLINK_NOFOLLOW)); > + return (kern_fchownat(td, AT_FDCWD, uap->path, UIO_USERSPACE, > + uap->uid, uap->gid, AT_SYMLINK_NOFOLLOW)); > } > > /* > @@ -3174,8 +3069,8 @@ sys_utimes(td, uap) > } */ *uap; > { > > - return (kern_utimes(td, uap->path, UIO_USERSPACE, uap->tptr, > - UIO_USERSPACE)); > + return (kern_utimesat(td, AT_FDCWD, uap->path, UIO_USERSPACE, > + uap->tptr, UIO_USERSPACE)); > } > > #ifndef _SYS_SYSPROTO_H_ > @@ -3194,14 +3089,6 @@ sys_futimesat(struct thread *td, struct > futimesat_args *uap) > } > > int > -kern_utimes(struct thread *td, char *path, enum uio_seg pathseg, > - struct timeval *tptr, enum uio_seg tptrseg) > -{ > - > - return (kern_utimesat(td, AT_FDCWD, path, pathseg, tptr, tptrseg)); > -} > - > -int > kern_utimesat(struct thread *td, int fd, char *path, enum uio_seg pathseg, > struct timeval *tptr, enum uio_seg tptrseg) > { > @@ -3500,7 +3387,8 @@ sys_rename(td, uap) > } */ *uap; > { > > - return (kern_rename(td, uap->from, uap->to, UIO_USERSPACE)); > + return (kern_renameat(td, AT_FDCWD, uap->from, AT_FDCWD, > + uap->to, UIO_USERSPACE)); > } > > #ifndef _SYS_SYSPROTO_H_ > @@ -3520,13 +3408,6 @@ sys_renameat(struct thread *td, struct > renameat_args *uap) > } > > int > -kern_rename(struct thread *td, char *from, char *to, enum uio_seg > pathseg) > -{ > - > - return (kern_renameat(td, AT_FDCWD, from, AT_FDCWD, to, pathseg)); > -} > - > -int > kern_renameat(struct thread *td, int oldfd, char *old, int newfd, char > *new, > enum uio_seg pathseg) > { > @@ -3675,7 +3556,8 @@ sys_mkdir(td, uap) > } */ *uap; > { > > - return (kern_mkdir(td, uap->path, UIO_USERSPACE, uap->mode)); > + return (kern_mkdirat(td, AT_FDCWD, uap->path, UIO_USERSPACE, > + uap->mode)); > } > > #ifndef _SYS_SYSPROTO_H_ > @@ -3693,13 +3575,6 @@ sys_mkdirat(struct thread *td, struct > mkdirat_args *uap) > } > > int > -kern_mkdir(struct thread *td, char *path, enum uio_seg segflg, int mode) > -{ > - > - return (kern_mkdirat(td, AT_FDCWD, path, segflg, mode)); > -} > - > -int > kern_mkdirat(struct thread *td, int fd, char *path, enum uio_seg segflg, > int mode) > { > @@ -3777,14 +3652,7 @@ sys_rmdir(td, uap) > } */ *uap; > { > > - return (kern_rmdir(td, uap->path, UIO_USERSPACE)); > -} > - > -int > -kern_rmdir(struct thread *td, char *path, enum uio_seg pathseg) > -{ > - > - return (kern_rmdirat(td, AT_FDCWD, path, pathseg)); > + return (kern_rmdirat(td, AT_FDCWD, uap->path, UIO_USERSPACE)); > } > > int > diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h > index 7098c43..266c619 100644 > --- a/sys/sys/syscallsubr.h > +++ b/sys/sys/syscallsubr.h > @@ -62,22 +62,16 @@ int kern_accept(struct thread *td, int s, struct > sockaddr **name, > socklen_t *namelen, struct file **fp); > int kern_accept4(struct thread *td, int s, struct sockaddr **name, > socklen_t *namelen, int flags, struct file **fp); > -int kern_access(struct thread *td, char *path, enum uio_seg pathseg, > - int flags); > int kern_accessat(struct thread *td, int fd, char *path, > enum uio_seg pathseg, int flags, int mode); > int kern_adjtime(struct thread *td, struct timeval *delta, > struct timeval *olddelta); > int kern_alternate_path(struct thread *td, const char *prefix, const > char *path, > enum uio_seg pathseg, char **pathbuf, int create, int dirfd); > -int kern_bind(struct thread *td, int fd, struct sockaddr *sa); > +int kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr > *sa); > int kern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds, > size_t ncmds); > int kern_chdir(struct thread *td, char *path, enum uio_seg pathseg); > -int kern_chmod(struct thread *td, char *path, enum uio_seg pathseg, > - int mode); > -int kern_chown(struct thread *td, char *path, enum uio_seg pathseg, > int uid, > - int gid); > int kern_clock_getcpuclockid2(struct thread *td, id_t id, int which, > clockid_t *clk_id); > int kern_clock_getres(struct thread *td, clockid_t clock_id, > @@ -87,9 +81,8 @@ int kern_clock_gettime(struct thread *td, clockid_t > clock_id, > int kern_clock_settime(struct thread *td, clockid_t clock_id, > struct timespec *ats); > int kern_close(struct thread *td, int fd); > -int kern_connect(struct thread *td, int fd, struct sockaddr *sa); > -int kern_eaccess(struct thread *td, char *path, enum uio_seg pathseg, > - int flags); > +int kern_connectat(struct thread *td, int dirfd, int fd, > + struct sockaddr *sa); > int kern_execve(struct thread *td, struct image_args *args, > struct mac *mac_p); > int kern_fchmodat(struct thread *td, int fd, char *path, > @@ -127,26 +120,14 @@ int kern_kevent(struct thread *td, int fd, int > nchanges, int nevents, > int kern_kldload(struct thread *td, const char *file, int *fileid); > int kern_kldstat(struct thread *td, int fileid, struct kld_file_stat > *stat); > int kern_kldunload(struct thread *td, int fileid, int flags); > -int kern_lchown(struct thread *td, char *path, enum uio_seg pathseg, > - int uid, int gid); > -int kern_link(struct thread *td, char *path, char *link, > - enum uio_seg segflg); > int kern_linkat(struct thread *td, int fd1, int fd2, char *path1, > char *path2, enum uio_seg segflg, int follow); > -int kern_lstat(struct thread *td, char *path, enum uio_seg pathseg, > - struct stat *sbp); > int kern_lutimes(struct thread *td, char *path, enum uio_seg pathseg, > struct timeval *tptr, enum uio_seg tptrseg); > -int kern_mkdir(struct thread *td, char *path, enum uio_seg segflg, > - int mode); > int kern_mkdirat(struct thread *td, int fd, char *path, > enum uio_seg segflg, int mode); > -int kern_mkfifo(struct thread *td, char *path, enum uio_seg pathseg, > - int mode); > int kern_mkfifoat(struct thread *td, int fd, char *path, > enum uio_seg pathseg, int mode); > -int kern_mknod(struct thread *td, char *path, enum uio_seg pathseg, > - int mode, int dev); > int kern_mknodat(struct thread *td, int fd, char *path, > enum uio_seg pathseg, int mode, int dev); > int kern_msgctl(struct thread *, int, int, struct msqid_ds *); > @@ -156,8 +137,6 @@ int kern_nanosleep(struct thread *td, struct > timespec *rqt, > struct timespec *rmt); > int kern_ogetdirentries(struct thread *td, struct ogetdirentries_args > *uap, > long *ploff); > -int kern_open(struct thread *td, char *path, enum uio_seg pathseg, > - int flags, int mode); > int kern_openat(struct thread *td, int fd, char *path, > enum uio_seg pathseg, int flags, int mode); > int kern_pathconf(struct thread *td, char *path, enum uio_seg pathseg, > @@ -176,18 +155,13 @@ int kern_pselect(struct thread *td, int nd, > fd_set *in, fd_set *ou, > int kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, > int data); > int kern_pwritev(struct thread *td, int fd, struct uio *auio, off_t > offset); > -int kern_readlink(struct thread *td, char *path, enum uio_seg pathseg, > - char *buf, enum uio_seg bufseg, size_t count); > int kern_readlinkat(struct thread *td, int fd, char *path, > enum uio_seg pathseg, char *buf, enum uio_seg bufseg, size_t count); > int kern_readv(struct thread *td, int fd, struct uio *auio); > int kern_recvit(struct thread *td, int s, struct msghdr *mp, > enum uio_seg fromseg, struct mbuf **controlp); > -int kern_rename(struct thread *td, char *from, char *to, > - enum uio_seg pathseg); > int kern_renameat(struct thread *td, int oldfd, char *old, int newfd, > char *new, enum uio_seg pathseg); > -int kern_rmdir(struct thread *td, char *path, enum uio_seg pathseg); > int kern_rmdirat(struct thread *td, int fd, char *path, > enum uio_seg pathseg); > int kern_sched_rr_get_interval(struct thread *td, pid_t pid, > @@ -220,17 +194,11 @@ int kern_sigprocmask(struct thread *td, int how, > int kern_sigsuspend(struct thread *td, sigset_t mask); > int kern_sigtimedwait(struct thread *td, sigset_t waitset, > struct ksiginfo *ksi, struct timespec *timeout); > -int kern_stat(struct thread *td, char *path, enum uio_seg pathseg, > - struct stat *sbp); > int kern_statat(struct thread *td, int flag, int fd, char *path, > - enum uio_seg pathseg, struct stat *sbp); > -int kern_statat_vnhook(struct thread *td, int flag, int fd, char *path, > enum uio_seg pathseg, struct stat *sbp, > void (*hook)(struct vnode *vp, struct stat *sbp)); > int kern_statfs(struct thread *td, char *path, enum uio_seg pathseg, > struct statfs *buf); > -int kern_symlink(struct thread *td, char *path, char *link, > - enum uio_seg segflg); > int kern_symlinkat(struct thread *td, char *path1, int fd, char *path2, > enum uio_seg segflg); > int kern_ktimer_create(struct thread *td, clockid_t clock_id, > @@ -245,11 +213,8 @@ int kern_thr_new(struct thread *td, struct > thr_param *param); > int kern_thr_suspend(struct thread *td, struct timespec *tsp); > int kern_truncate(struct thread *td, char *path, enum uio_seg pathseg, > off_t length); > -int kern_unlink(struct thread *td, char *path, enum uio_seg pathseg); > int kern_unlinkat(struct thread *td, int fd, char *path, > enum uio_seg pathseg, ino_t oldinum); > -int kern_utimes(struct thread *td, char *path, enum uio_seg pathseg, > - struct timeval *tptr, enum uio_seg tptrseg); > int kern_utimesat(struct thread *td, int fd, char *path, > enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); > int kern_wait(struct thread *td, pid_t pid, int *status, int options, > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" -- Jonathan Anderson jonathan@FreeBSD.org From owner-freebsd-fs@FreeBSD.ORG Wed Nov 12 21:15:08 2014 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19F8AE76 for ; Wed, 12 Nov 2014 21:15:08 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01C4C9DE for ; Wed, 12 Nov 2014 21:15:08 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sACLF7e6030545 for ; Wed, 12 Nov 2014 21:15:07 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 188187] [zfs] [panic] 10-stable: Kernel panic on zpool import: integer divide fault Date: Wed, 12 Nov 2014 21:15:07 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: danm@vivocore.com X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2014 21:15:08 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188187 --- Comment #15 from Dan Milgram --- Thanks very much for your help! I re-attempted another import on the zpool after zdb failed, and 10.1 RC4 seems to have done the trick for me. It imported without problem, and zpool status doesn't show any errors. This may be moot at at this point but trying to run zdb through gdb doesn't seem to work for me (no debugging symbols). Not sure if I'm just not running it correctly, or if I would have to build a custom zdb that includes debugging info. If there's any info I can provide that would be of value though, let me know though. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-fs@FreeBSD.ORG Wed Nov 12 22:31:48 2014 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76CE0AB0; Wed, 12 Nov 2014 22:31:48 +0000 (UTC) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3AD462FB; Wed, 12 Nov 2014 22:31:48 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 2A8F33592DE; Wed, 12 Nov 2014 23:31:45 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 18C8F28494; Wed, 12 Nov 2014 23:31:45 +0100 (CET) Date: Wed, 12 Nov 2014 23:31:45 +0100 From: Jilles Tjoelker To: Jonathan Anderson Subject: Re: Removal of kern_xxx() no-at variants. Message-ID: <20141112223144.GA90037@stack.nl> References: <20141112132451.GM17068@kib.kiev.ua> <201411121014.04482.jhb@freebsd.org> <5463C39C.2010204@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5463C39C.2010204@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Benjamin Kaduk , freebsd-arch@freebsd.org, fs@freebsd.org, arch@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2014 22:31:48 -0000 On Wed, Nov 12, 2014 at 05:01:24PM -0330, Jonathan Anderson wrote: > A thought: > If we're only going to have one of {kern_open,kern_openat}, might it > make sense to keep the shorter name rather than the longer one? > kern_openat as a name seems meaningful to me only if we're trying to > disambiguate it from an also-existent-but-different-meaning kern_open. The name kern_openat makes sense in that the functionality is like the openat() system call. -- Jilles Tjoelker From owner-freebsd-fs@FreeBSD.ORG Thu Nov 13 09:38:58 2014 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95EA1EFB; Thu, 13 Nov 2014 09:38:58 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0642BCA6; Thu, 13 Nov 2014 09:38:57 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id sAD9cquY099473 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 13 Nov 2014 11:38:52 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua sAD9cquY099473 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id sAD9cqM9099472; Thu, 13 Nov 2014 11:38:52 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 13 Nov 2014 11:38:52 +0200 From: Konstantin Belousov To: Jilles Tjoelker Subject: Re: Removal of kern_xxx() no-at variants. Message-ID: <20141113093852.GU17068@kib.kiev.ua> References: <20141112132451.GM17068@kib.kiev.ua> <201411121014.04482.jhb@freebsd.org> <5463C39C.2010204@FreeBSD.org> <20141112223144.GA90037@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141112223144.GA90037@stack.nl> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: Benjamin Kaduk , freebsd-arch@freebsd.org, fs@freebsd.org, Jonathan Anderson , arch@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2014 09:38:58 -0000 On Wed, Nov 12, 2014 at 11:31:45PM +0100, Jilles Tjoelker wrote: > On Wed, Nov 12, 2014 at 05:01:24PM -0330, Jonathan Anderson wrote: > > A thought: > > > If we're only going to have one of {kern_open,kern_openat}, might it > > make sense to keep the shorter name rather than the longer one? > > kern_openat as a name seems meaningful to me only if we're trying to > > disambiguate it from an also-existent-but-different-meaning kern_open. > > The name kern_openat makes sense in that the functionality is like the > openat() system call. I like the proposal, but think that it is premature, unfortunately. Issue is the MFC to stable branches, which still have old functions used in code. I do not mean merge of this change to stable, but other merges which intersect with the at/no-at modifications. Having kern_open() as different functions in HEAD and stable is too confusing without real value IMO. Note that it is possible to partially MFC the commit into stable, leaving the removal of the no-at variants out of the patch. From owner-freebsd-fs@FreeBSD.ORG Thu Nov 13 14:56:16 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98CAEA85 for ; Thu, 13 Nov 2014 14:56:16 +0000 (UTC) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67DA03F1 for ; Thu, 13 Nov 2014 14:56:15 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C8648208F7 for ; Thu, 13 Nov 2014 09:56:07 -0500 (EST) Received: from web3 ([10.202.2.213]) by compute6.internal (MEProxy); Thu, 13 Nov 2014 09:56:07 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:x-sasl-enc:from:to:cc :mime-version:content-transfer-encoding:content-type:subject :date:in-reply-to:references; s=smtpout; bh=CIy1+ouOCKnGbuCZeDzE WwYxfIc=; b=rJr570jpVNpBoK1o1cuvGjtmio22UV9UghmW+TR7qzyLZG0RB3RL EqSr0o24vzJMuvayLEhDOyaiIFSWaVthK23W5I2Epygt2LaHLFjR9W/wyTE/QiZb vcLDSOt5kfE/FUTx/tL5rgzxqzk72TIpxqcUBYXF24pUL/8yk+weRpU= Received: by web3.nyi.internal (Postfix, from userid 99) id A0D16117A78; Thu, 13 Nov 2014 09:56:07 -0500 (EST) Message-Id: <1415890567.2670730.190586365.02618860@webmail.messagingengine.com> X-Sasl-Enc: JPB+FrfWcJxiQSPtD3ovAgKydoqvaW1Qpei5Er73KJ5W 1415890567 From: Mark Felder To: Zeus Panchenko MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-9183bd94 Subject: Re: unsupported feature: com.delfix and can't find pool by guid after old STABLE10.0-to-RELENG10.0 upgrade Date: Thu, 13 Nov 2014 08:56:07 -0600 In-Reply-To: <20141111223833.46741@smtp.new-ukraine.org> References: <20141111080903.94302@smtp.new-ukraine.org> <5461BCB1.5030703@delphij.net> <20141111101004.845@smtp.new-ukraine.org> <1415715795.1681955.189655693.7993AEA6@webmail.messagingengine.com> <20141111223833.46741@smtp.new-ukraine.org> Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2014 14:56:16 -0000 On Tue, Nov 11, 2014, at 14:38, Zeus Panchenko wrote: > Mark Felder wrote: > > All you should need to do is boot FreeBSD 10.1-RC4 and apply the newer > > bootcode and put the newer kernel on the system. > > I hoped I could use my old kernel :( > thanks, I'll try > > > > > If this is a zfs-on-root install you may have problems with importing > > the zpool and getting access to your data. I would advice you import the > > zpool with the -N option > > > > -N Import the pool without mounting any file systems. > > emm ... why a not altroot ? > > zpool(8) > > altroot > Alternate root directory. If set, this directory is prepended to > any > mount points within the pool. This can be used when examining an > unknown pool where the mount points cannot be trusted, or in an > alternate boot environment, where the typical paths are not > valid. > Altroot looks viable, but I haven't tested how it behaves. This my question: tank mountpoint=/ tank/var mountpoint=/var (inherited) tank/tmp mountpoint=/tmp (directly set) I expect altroot will correctly move the root (tank) and /var (tank/var) to the altroot, but how does it handle other zfs filesystems that have a very specific mountpoint set like /tmp in this situation? Does it gracefully mount it into the mountroot, or does that only work for the root and filesystems that inherit their mountpoint? As I have not tested it, I do not trust it. I'll certainly test this in the near future, though. Thanks for the tip! From owner-freebsd-fs@FreeBSD.ORG Thu Nov 13 16:06:11 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99209943; Thu, 13 Nov 2014 16:06:11 +0000 (UTC) Received: from mail-vc0-x22e.google.com (mail-vc0-x22e.google.com [IPv6:2607:f8b0:400c:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D3D7EFB; Thu, 13 Nov 2014 16:06:11 +0000 (UTC) Received: by mail-vc0-f174.google.com with SMTP id la4so3896516vcb.33 for ; Thu, 13 Nov 2014 08:06:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=r89uvSsTXBS+47VOlI1U0OpjELiv/HPzJIIktcLuzP8=; b=gSL68YWoW+2AaGGJlLR+uisbyFQa4rBwvgLmuPgibc5MqOFIu4gzmd4Pyt7Uxw8xBt ba1omX4hPJRErc30vrA/qbwDWpOoj766z9vtxAxAhNHKz2ra0utG/gNgkq1JtR9J2iQQ tgBC2bIBXpz9YSJ/i4CvENnL/4bZ5/JUYFLlCXPvCxcJZK2/Q81E/UF9sU6/3E9PGuIH g+O1zCsls45eOka2vBehDlre1Lmtow4T2QtRhuWoGlOG7NoOHnrvCy7P3vsAepSLhCE3 OXFPnrlqU5ajMJSspmUH0/2aQPKJwCI3E3eY73lgJ3PMgXrVq20V4AgldFp2dwUhNBWX Njiw== MIME-Version: 1.0 X-Received: by 10.52.163.202 with SMTP id yk10mr1918796vdb.14.1415894770279; Thu, 13 Nov 2014 08:06:10 -0800 (PST) Received: by 10.31.142.2 with HTTP; Thu, 13 Nov 2014 08:06:10 -0800 (PST) In-Reply-To: <1415890567.2670730.190586365.02618860@webmail.messagingengine.com> References: <20141111080903.94302@smtp.new-ukraine.org> <5461BCB1.5030703@delphij.net> <20141111101004.845@smtp.new-ukraine.org> <1415715795.1681955.189655693.7993AEA6@webmail.messagingengine.com> <20141111223833.46741@smtp.new-ukraine.org> <1415890567.2670730.190586365.02618860@webmail.messagingengine.com> Date: Thu, 13 Nov 2014 18:06:10 +0200 Message-ID: Subject: Re: unsupported feature: com.delfix and can't find pool by guid after old STABLE10.0-to-RELENG10.0 upgrade From: Kimmo Paasiala To: Mark Felder Content-Type: text/plain; charset=UTF-8 Cc: freebsd-fs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2014 16:06:11 -0000 Altroot does the right thing (tm) and moves all mountpoints to be relative to the altroot property, in other words the value of the altroot property is prepended to every mountpoint. Both inherited and explicitly set mountpoints behave exactly as you expect with altroot. -Kimmo On Thu, Nov 13, 2014 at 4:56 PM, Mark Felder wrote: > > > On Tue, Nov 11, 2014, at 14:38, Zeus Panchenko wrote: >> Mark Felder wrote: >> > All you should need to do is boot FreeBSD 10.1-RC4 and apply the newer >> > bootcode and put the newer kernel on the system. >> >> I hoped I could use my old kernel :( >> thanks, I'll try >> >> > >> > If this is a zfs-on-root install you may have problems with importing >> > the zpool and getting access to your data. I would advice you import the >> > zpool with the -N option >> > >> > -N Import the pool without mounting any file systems. >> >> emm ... why a not altroot ? >> >> zpool(8) >> >> altroot >> Alternate root directory. If set, this directory is prepended to >> any >> mount points within the pool. This can be used when examining an >> unknown pool where the mount points cannot be trusted, or in an >> alternate boot environment, where the typical paths are not >> valid. >> > > Altroot looks viable, but I haven't tested how it behaves. This my > question: > > > tank mountpoint=/ > tank/var mountpoint=/var (inherited) > tank/tmp mountpoint=/tmp (directly set) > > I expect altroot will correctly move the root (tank) and /var > (tank/var) to the altroot, but how does it handle other zfs filesystems > that have a very specific mountpoint set like /tmp in this situation? > Does it gracefully mount it into the mountroot, or does that only work > for the root and filesystems that inherit their mountpoint? > > As I have not tested it, I do not trust it. I'll certainly test this in > the near future, though. Thanks for the tip! > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" From owner-freebsd-fs@FreeBSD.ORG Thu Nov 13 19:43:58 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69010D18 for ; Thu, 13 Nov 2014 19:43:58 +0000 (UTC) Received: from mail-la0-x236.google.com (mail-la0-x236.google.com [IPv6:2a00:1450:4010:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E0A29C25 for ; Thu, 13 Nov 2014 19:43:57 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id gf13so1946963lab.27 for ; Thu, 13 Nov 2014 11:43:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=ItoOwxe8aYFhNLfWVxNhMxP00KFRZN/gG9+IyaEML6M=; b=El7EysUX+hLJ2b5t13WmX0FMqY9eVRc6GpVmq2fxDWOcvKUB59cDwBhSXVQqV+m3nl CUAm2r7yXwwJlUcDZWpUDulwN4P8r0rz41d7S4rXrUiK8p/MUxmec3cdHoq/2/hMI1p9 BHyDmuGF/YAiSETscbVHXr/R1Apos2wWHf+WWbAwgJNLKgpBP2Z26aX3aAK5+UW5zoMP VsjeKjX+cBUQeAEhTZMPVcEBA2KAAMKyVHUGdgBTtK3G2tKWuNItRoQqaHe+TwSrzmyf 8wJLhfCNk9JPuC6I1j+By2xstVacCZ/EulMaOm1LEDbxlvb0zCQCWI89fIkjGReh7E0v L7PA== MIME-Version: 1.0 X-Received: by 10.112.235.196 with SMTP id uo4mr4183026lbc.66.1415907835947; Thu, 13 Nov 2014 11:43:55 -0800 (PST) Received: by 10.114.245.38 with HTTP; Thu, 13 Nov 2014 11:43:55 -0800 (PST) Date: Thu, 13 Nov 2014 11:43:55 -0800 Message-ID: Subject: ZFS + xattr -> panic loop From: javocado To: FreeBSD Filesystems Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2014 19:43:58 -0000 After running an rsync (upload) into my zfs filesystem using the --fake-super option (which stores permissions in extended attributes) the zfs filesystem has somehow become corrupt. When booting the system it panic's upon zfs startup: panic: solaris assert: VFS_ROOT(vfsp, LK_EXCLUSIVE, &vp) == 0, file: /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c , line: 1170 cpuid = 12 KDB: stack backtrace: #0 0xffffffff8034b3ae at kdb_backtrace+0x5e #1 0xffffffff803185c7 at panic+0x187 #2 0xffffffff80ab8213 at zfs_mount+0x563 #3 0xffffffff803a2635 at vfs_donmount+0xdc5 #4 0xffffffff803a3133 at nmount+0x63 #5 0xffffffff80553284 at amd64_syscall+0x1f4 #6 0xffffffff8053bc2c at Xfast_syscall+0xfc I was able to boot the system by setting the filesystem: canmount=off However, I am still unable to mount it manually without causing a similar panic. So, setting the cause of the panic aside for the moment, I just want to get to the data. I'd like to think I can do that by turning off xattrs and mounting it read-only however: # zfs set xattr=off pool/data property 'xattr' not supported on FreeBSD: permission denied How can I turn that off? Second or alternately, if I want to just dump the filesystem out excluding the extended attributes, so that I have a clean, mountable data set, how would I do that? Thank you! From owner-freebsd-fs@FreeBSD.ORG Thu Nov 13 20:19:47 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D20C3504 for ; Thu, 13 Nov 2014 20:19:47 +0000 (UTC) Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 66BAAF1C for ; Thu, 13 Nov 2014 20:19:46 +0000 (UTC) Received: by mail-wi0-f176.google.com with SMTP id ex7so718848wid.9 for ; Thu, 13 Nov 2014 12:19:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=xNjfBmPRLUlDzOTy9SIJvG1/r9YgPibmgyYD6OSaguY=; b=c5XlbKufh2LwNaLv3ieVkd4ypiFebVSczZNCdOY5AGd9TsZZvci+MfXeD5bewOZNZF XyildObYbUdsgA3g2kwoW0IT74pIFe+sStFxuYHIPb8A89gWzM/pkC4GCwczwi8XE2Mm 8GBANrXqWDb8rpQ1MRy/LW/KX+uv4LfBxlelyn9eQZpp7vmYRFGU5ecqa0P/qnfBslJ8 xN7P0Jzu1gjP4kzWRvVYp87k6dXtiVOKIHc3nylqOe/fpINR30sg/WzrAH9Mr1kilrTf 17kcnwkOQnISW1Ej/TeHUa7UAyz55tYL8h5scCptotMIkRkc8kaOFJFYRu7XvUwipx77 R+gQ== X-Gm-Message-State: ALoCoQkiU7FIy5S3uikzdXniekoVrWSgv8bw6kabZtCAKwwoEo1+/6gRLRjJ7Q2WdZt/QSR6aaUO X-Received: by 10.194.3.2 with SMTP id 2mr7184052wjy.89.1415909984626; Thu, 13 Nov 2014 12:19:44 -0800 (PST) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id rx8sm36842132wjb.30.2014.11.13.12.19.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Nov 2014 12:19:43 -0800 (PST) Message-ID: <5465129C.7020606@multiplay.co.uk> Date: Thu, 13 Nov 2014 20:20:44 +0000 From: Steven Hartland User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: freebsd-fs@freebsd.org Subject: Re: ZFS + xattr -> panic loop References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2014 20:19:48 -0000 Alwas good to include which version of the OS your talking about (uname -a) On 13/11/2014 19:43, javocado wrote: > After running an rsync (upload) into my zfs filesystem using the > --fake-super option (which stores permissions in extended attributes) the > zfs filesystem has somehow become corrupt. When booting the system it > panic's upon zfs startup: > > panic: solaris assert: VFS_ROOT(vfsp, LK_EXCLUSIVE, &vp) == 0, file: > /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c > , line: 1170 > cpuid = 12 > KDB: stack backtrace: > #0 0xffffffff8034b3ae at kdb_backtrace+0x5e > #1 0xffffffff803185c7 at panic+0x187 > #2 0xffffffff80ab8213 at zfs_mount+0x563 > #3 0xffffffff803a2635 at vfs_donmount+0xdc5 > #4 0xffffffff803a3133 at nmount+0x63 > #5 0xffffffff80553284 at amd64_syscall+0x1f4 > #6 0xffffffff8053bc2c at Xfast_syscall+0xfc > > I was able to boot the system by setting the filesystem: > > canmount=off > > However, I am still unable to mount it manually without causing a similar > panic. > > So, setting the cause of the panic aside for the moment, I just want to get > to the data. I'd like to think I can do that by turning off xattrs and > mounting it read-only however: > > # zfs set xattr=off pool/data > property 'xattr' not supported on FreeBSD: permission denied > > How can I turn that off? > > Second or alternately, if I want to just dump the filesystem out excluding > the extended attributes, so that I have a clean, mountable data set, how > would I do that? > > Thank you! > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" From owner-freebsd-fs@FreeBSD.ORG Thu Nov 13 20:23:45 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BDD2D5AF for ; Thu, 13 Nov 2014 20:23:45 +0000 (UTC) Received: from mailbox.reptiles.org (www.reptiles.org [198.96.117.3]) by mx1.freebsd.org (Postfix) with ESMTP id 93E26FCD for ; Thu, 13 Nov 2014 20:23:44 +0000 (UTC) Received: from localhost by mailbox.reptiles.org via sendmail with STDIO (2898 bytes) (sender: ) (ident using UNIX) id for ; Thu, 13 Nov 2014 15:20:50 -0500 (EST) (Smail-3.2.0.121 2005-Nov-17 #10 built 2010-Jul-16) Date: Thu, 13 Nov 2014 15:20:50 -0500 From: Jim Mercer To: freebsd-fs@freebsd.org Subject: Re: leaking lots of unreferenced inodes (pg_xlog files?), maybe after moving tables and indexes to tablespace on different volume Message-ID: <20141113202050.GA45077@reptiles.org> References: <51439243.5020604@FreeBSD.org> <201303160401.r2G41Um7026132@chez.mckusick.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201303160401.r2G41Um7026132@chez.mckusick.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2014 20:23:45 -0000 On Fri, Mar 15, 2013 at 09:01:30PM -0700, Kirk McKusick wrote: > I don't know how, but somehow something is holding references to > the removed files causing them to fail to be reclaimed. > > Could you run your system for a while to build up a new set of > these files, then run a script with the `df -ih' as before. Then > run `vmstat -m', `sysctl debug', and fstat -f /usr' both before > and after doing the umount/mount. Hopefully that will give us > some more clues as to what is happening. i am seeing a similar behaviour: FreeBSD db02 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Mon Aug 12 18:40:42 PKT 2013 root@rms-db02.telenor.innexiv.com:/usr/obj/usr/src/sys/INXVMPG amd64 postgresql-server-9.2.4 however, i'm unsure its xlog files in my case. i have postgres installed on /home root@rms-db02 /var/log]# df -h Filesystem Size Used Avail Capacity Mounted on /dev/da0p3 11G 3.2G 7.5G 30% / devfs 1.0k 1.0k 0B 100% /dev /dev/da1p1 1.5T 671G 754G 47% /home procfs 4.0k 4.0k 0B 100% /proc [root@rms-db02 /var/log]# ls -ld /usr/local/pgsql lrwxr-xr-x 1 root wheel 11 Aug 12 2013 /usr/local/pgsql -> /home/pgsql in my case, it over the course of 17 days (it seems to be happening faster now, at one point it was 6 months or more, now sooner). the "Used" space on root goes up to approx 95% at which point i halt the applications and reboot. i hunted around with lsof and such, and had another guy also poke about, and neither of us could find the place where the space was being used. i wanted to follow through on the diagnostic you provided, but since it was the root filesystem, it wasn't straightforward. best i could do was a 'df -i', which showed, immediately after reboot, into single user, before fsck, that the space had been recovered. comparing the inode count between singleuser and booted up multiuser, the booted up multiuser had +9 inodes, so, no vast difference. i am going to be upgrading to more recent freebsd and postgres soon, but, in the meantime, was there any further investigation of this? --jim -- Jim Mercer Reptilian Research jim@reptiles.org +1 416 410-5633 "He who dies with the most toys is nonetheless dead" From owner-freebsd-fs@FreeBSD.ORG Thu Nov 13 23:18:40 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 158076A9 for ; Thu, 13 Nov 2014 23:18:40 +0000 (UTC) Received: from mail-lb0-x235.google.com (mail-lb0-x235.google.com [IPv6:2a00:1450:4010:c04::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AFFB6EB for ; Thu, 13 Nov 2014 23:18:39 +0000 (UTC) Received: by mail-lb0-f181.google.com with SMTP id l4so12135509lbv.12 for ; Thu, 13 Nov 2014 15:18:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xF5Et+cNMUyufUOLFvV+3hbRTKuzXDxkfqjSTNMuCrY=; b=gpm16Thu0vRLbobctmXMfPlY6Ha63wdkNYxsXEoEMFsqaucEbA1SkkPnoHtkzVRJPJ EC69Gy89/Vr9094rles4dwVptetduvZP265hCPwB1c0m9E4JtJ0uaHy8OHrTG33lBVku yrKqxdi0Cd3z0ETdkFifdW5Ou4irGGJvcRq7QTVmra4fdG0hdBa9Cu10VOZ1Mmd5FVui rZr0ODoWkiPY3gzF7kyf/h/AyLouqoKP2aw7u4j9fZGwY5qA2Q/Hu2AcS9FWkZry7Qee n5GoABBNKoj31rSBA8EdrXqzDDvONJ/Q2golBb/SFLybsxYo059ePQD8OEdbUbcBPMi8 iqUg== MIME-Version: 1.0 X-Received: by 10.152.20.199 with SMTP id p7mr4995150lae.49.1415920717642; Thu, 13 Nov 2014 15:18:37 -0800 (PST) Received: by 10.114.245.38 with HTTP; Thu, 13 Nov 2014 15:18:37 -0800 (PST) In-Reply-To: <5465129C.7020606@multiplay.co.uk> References: <5465129C.7020606@multiplay.co.uk> Date: Thu, 13 Nov 2014 15:18:37 -0800 Message-ID: Subject: Re: ZFS + xattr -> panic loop From: javocado To: Steven Hartland Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: FreeBSD Filesystems X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2014 23:18:40 -0000 Apologies: FreeBSD hostname 8.3-RELEASE FreeBSD 8.3-RELEASE #1: Wed Sep 18 16:59:03 MDT 2013 amd64 On Thu, Nov 13, 2014 at 12:20 PM, Steven Hartland wrote: > Alwas good to include which version of the OS your talking about (uname -a) > > > On 13/11/2014 19:43, javocado wrote: > >> After running an rsync (upload) into my zfs filesystem using the >> --fake-super option (which stores permissions in extended attributes) the >> zfs filesystem has somehow become corrupt. When booting the system it >> panic's upon zfs startup: >> >> panic: solaris assert: VFS_ROOT(vfsp, LK_EXCLUSIVE, &vp) == 0, file: >> /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/ >> common/fs/zfs/zfs_vfsops.c >> , line: 1170 >> cpuid = 12 >> KDB: stack backtrace: >> #0 0xffffffff8034b3ae at kdb_backtrace+0x5e >> #1 0xffffffff803185c7 at panic+0x187 >> #2 0xffffffff80ab8213 at zfs_mount+0x563 >> #3 0xffffffff803a2635 at vfs_donmount+0xdc5 >> #4 0xffffffff803a3133 at nmount+0x63 >> #5 0xffffffff80553284 at amd64_syscall+0x1f4 >> #6 0xffffffff8053bc2c at Xfast_syscall+0xfc >> >> I was able to boot the system by setting the filesystem: >> >> canmount=off >> >> However, I am still unable to mount it manually without causing a similar >> panic. >> >> So, setting the cause of the panic aside for the moment, I just want to >> get >> to the data. I'd like to think I can do that by turning off xattrs and >> mounting it read-only however: >> >> # zfs set xattr=off pool/data >> property 'xattr' not supported on FreeBSD: permission denied >> >> How can I turn that off? >> >> Second or alternately, if I want to just dump the filesystem out excluding >> the extended attributes, so that I have a clean, mountable data set, how >> would I do that? >> >> Thank you! >> _______________________________________________ >> freebsd-fs@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-fs >> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" >> > > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > From owner-freebsd-fs@FreeBSD.ORG Thu Nov 13 23:20:15 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8030472D for ; Thu, 13 Nov 2014 23:20:15 +0000 (UTC) Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0EC53755 for ; Thu, 13 Nov 2014 23:20:14 +0000 (UTC) Received: by mail-wg0-f46.google.com with SMTP id x13so18223505wgg.19 for ; Thu, 13 Nov 2014 15:20:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=3+ynpXa3b1A4WG1ZDbLmqfdngKlhoXrZbNOhUDJQMt0=; b=ZgoGxoskmf+oZVIlIdBM4W46A6NxIXg2tO0S01EXea7NYUh5TE2EF/XV8jWuiCY3lm zf3mqY41KbF/HsgDApacO7y4aCa+dKg38wM4Mv0nPk3Vy21P/McrukQlRWtGQw6lFY3g atSepg4NHgJa7V4qJ+7a7cy6kYGN08gON3FtOMCcZxhRoI5j6ZPc4eMg1YojsuE6GRGf OIMnkqZqlYzIzpmHAzal9yVCbQ1gVqQI/zlOdHT8jtd4KsLhcMwEEseMXH70nPRDmgVd UJN1yU8mEea53/AKpN5UjJ0HxgBlO7c4/nTAwKjpNRYWhQQaUodgULXRz3fVoqY22YdL W6Eg== X-Gm-Message-State: ALoCoQnq2es6t0hcfGiR+bszOK8oqx7Mjh+rejnn8aK6M23p0M4dDlae4Wt6Vb8i7nBUxQs9vepj X-Received: by 10.180.75.116 with SMTP id b20mr2220524wiw.49.1415920812789; Thu, 13 Nov 2014 15:20:12 -0800 (PST) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id lp14sm1138776wic.20.2014.11.13.15.20.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Nov 2014 15:20:12 -0800 (PST) Message-ID: <54653CE6.2090301@multiplay.co.uk> Date: Thu, 13 Nov 2014 23:21:10 +0000 From: Steven Hartland User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: javocado Subject: Re: ZFS + xattr -> panic loop References: <5465129C.7020606@multiplay.co.uk> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: FreeBSD Filesystems X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2014 23:20:15 -0000 I've recommend moving to 10.1 and seeing if your still see the same issue. If your zpool is corrupt and this can't recover from it you may need to restore from a backup. On 13/11/2014 23:18, javocado wrote: > Apologies: > > FreeBSD hostname 8.3-RELEASE FreeBSD 8.3-RELEASE #1: Wed Sep 18 > 16:59:03 MDT 2013 amd64 > > On Thu, Nov 13, 2014 at 12:20 PM, Steven Hartland > > wrote: > > Alwas good to include which version of the OS your talking about > (uname -a) > > > On 13/11/2014 19:43, javocado wrote: > > After running an rsync (upload) into my zfs filesystem using the > --fake-super option (which stores permissions in extended > attributes) the > zfs filesystem has somehow become corrupt. When booting the > system it > panic's upon zfs startup: > > panic: solaris assert: VFS_ROOT(vfsp, LK_EXCLUSIVE, &vp) == 0, > file: > /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c > , line: 1170 > cpuid = 12 > KDB: stack backtrace: > #0 0xffffffff8034b3ae at kdb_backtrace+0x5e > #1 0xffffffff803185c7 at panic+0x187 > #2 0xffffffff80ab8213 at zfs_mount+0x563 > #3 0xffffffff803a2635 at vfs_donmount+0xdc5 > #4 0xffffffff803a3133 at nmount+0x63 > #5 0xffffffff80553284 at amd64_syscall+0x1f4 > #6 0xffffffff8053bc2c at Xfast_syscall+0xfc > > I was able to boot the system by setting the filesystem: > > canmount=off > > However, I am still unable to mount it manually without > causing a similar > panic. > > So, setting the cause of the panic aside for the moment, I > just want to get > to the data. I'd like to think I can do that by turning off > xattrs and > mounting it read-only however: > > # zfs set xattr=off pool/data > property 'xattr' not supported on FreeBSD: permission denied > > How can I turn that off? > > Second or alternately, if I want to just dump the filesystem > out excluding > the extended attributes, so that I have a clean, mountable > data set, how > would I do that? > > Thank you! > _______________________________________________ > freebsd-fs@freebsd.org mailing > list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to > "freebsd-fs-unsubscribe@freebsd.org > " > > > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to > "freebsd-fs-unsubscribe@freebsd.org > " > > From owner-freebsd-fs@FreeBSD.ORG Fri Nov 14 08:58:23 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD35F1BB; Fri, 14 Nov 2014 08:58:23 +0000 (UTC) Received: from mailout12.t-online.de (mailout12.t-online.de [194.25.134.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F33E6E6; Fri, 14 Nov 2014 08:58:23 +0000 (UTC) Received: from fwd41.aul.t-online.de (fwd41.aul.t-online.de [172.20.27.139]) by mailout12.t-online.de (Postfix) with SMTP id 98B6E500477; Fri, 14 Nov 2014 09:52:54 +0100 (CET) Received: from [192.168.119.10] (S3+nNqZJrhR3XChkOtC97JgnKBeOvFUyrikzm7PrAK7ybpMOBPd3BlltHurPMb3ZDp@[84.154.117.106]) by fwd41.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1XpCcc-0Pg9Am0; Fri, 14 Nov 2014 09:52:50 +0100 Message-ID: <5465C2DE.6080900@freebsd.org> Date: Fri, 14 Nov 2014 09:52:46 +0100 From: Stefan Esser User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: javocado , FreeBSD Filesystems Subject: Re: ZFS + xattr -> panic loop References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-ID: S3+nNqZJrhR3XChkOtC97JgnKBeOvFUyrikzm7PrAK7ybpMOBPd3BlltHurPMb3ZDp X-TOI-MSGID: 6defedcd-40e4-44d0-add6-ce79d3308d67 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2014 08:58:24 -0000 Am 13.11.2014 um 20:43 schrieb javocado: > After running an rsync (upload) into my zfs filesystem using the > --fake-super option (which stores permissions in extended attributes) the > zfs filesystem has somehow become corrupt. When booting the system it > panic's upon zfs startup: > > panic: solaris assert: VFS_ROOT(vfsp, LK_EXCLUSIVE, &vp) == 0, file: > /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c > , line: 1170 > cpuid = 12 > KDB: stack backtrace: > #0 0xffffffff8034b3ae at kdb_backtrace+0x5e > #1 0xffffffff803185c7 at panic+0x187 > #2 0xffffffff80ab8213 at zfs_mount+0x563 > #3 0xffffffff803a2635 at vfs_donmount+0xdc5 > #4 0xffffffff803a3133 at nmount+0x63 > #5 0xffffffff80553284 at amd64_syscall+0x1f4 > #6 0xffffffff8053bc2c at Xfast_syscall+0xfc > > I was able to boot the system by setting the filesystem: > > canmount=off > > However, I am still unable to mount it manually without causing a similar > panic. > So, setting the cause of the panic aside for the moment, I just want to get > to the data. I'd like to think I can do that by turning off xattrs and > mounting it read-only however: > > # zfs set xattr=off pool/data > property 'xattr' not supported on FreeBSD: permission denied > > How can I turn that off? I do not think that turning on xattr is the root cause of your problem with the pool. BTW: Does your system use ECC for its RAM? You can set vfs.zfs.recover="1" in /boot/loader.conf (or at the loader prompt) to prevent many consistency checks, that cause panics. But I'd make sure that no writes occur, else the corruption may become much worse than it already is. I have been able to recover my own ZFS pool and help somebody else with recovery, and the method might be applicable to your case, too: You may want to try accessing the pool with zdb, which has a userland implementation of a lot of the kernel code. That way, you can avoid crashing your system and you can possibly go back to a state, where the pool was sane. I'd rewind to a sane TXG, backup and rebuild the pool from that state. But in theory you could even continue using the pool, starting from a state where internal is (was) consistent. > Second or alternately, if I want to just dump the filesystem out excluding > the extended attributes, so that I have a clean, mountable data set, how > would I do that? I'd try too check the pool state with zdb, adding the options "-AAA -L". You could list the history to select a TXG that is recent enough to be acceptable as a recovery point ("zdb -AAA -L -hv "). Then look at the poll with various zdb commands, e.g. "-d", "-b", "-m" inserted into "zdb -AAA -L -t ". Select values for TXG from the history - zdb will execute the commands as if the pool still was at the corresponding point in time. If zdb can report pool statistics and pool details (e.g. metaslabs) without crashing (and without the need for -AAA and -L), then there is a good chance, that you rewound to a sane TXG and that you will be able to recover your data as it was at the time the TXG was written. I'd still only mount R/O and perform a dump as soon as possible. I'm short of time and probably unable to help with any details, but you'll find debug and recovery hints on the web (some apply only to the Solaris version of ZFS, but most can be used for the FreeBSD implementation as well). Good luck ... Regards, STefan From owner-freebsd-fs@FreeBSD.ORG Fri Nov 14 13:44:40 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CCCB1FE for ; Fri, 14 Nov 2014 13:44:40 +0000 (UTC) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE52C996 for ; Fri, 14 Nov 2014 13:44:39 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 5B58920861 for ; Fri, 14 Nov 2014 08:44:38 -0500 (EST) Received: from web3 ([10.202.2.213]) by compute5.internal (MEProxy); Fri, 14 Nov 2014 08:44:38 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:x-sasl-enc:from:to:cc :mime-version:content-transfer-encoding:content-type:in-reply-to :references:subject:date; s=smtpout; bh=jwtDhWCfHgqRWmTcC3nxsyG7 Q8s=; b=oFrJhcDTKTl7kvjHsd/+g4STQFHa57eIo6cqu4Al+BpJFebpipC3YAPO YQWRue9drDLQpBu3whRBa5gS0vmamisLer965XkP5+5XRbdAJe/r1boaHdjTtjKp 1i1XGAXa5MFRVb9bIGdTMW8URaGoL2FjXTAgGJxHUJ4guKEOb0I= Received: by web3.nyi.internal (Postfix, from userid 99) id 3702111880C; Fri, 14 Nov 2014 08:44:38 -0500 (EST) Message-Id: <1415972678.2953802.191005605.642CFFCF@webmail.messagingengine.com> X-Sasl-Enc: rVzxwCuuJ81B15+sgXxK+jgas4K4NMffDE57xiZUiFob 1415972678 From: Mark Felder To: Kimmo Paasiala MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-9183bd94 In-Reply-To: References: <20141111080903.94302@smtp.new-ukraine.org> <5461BCB1.5030703@delphij.net> <20141111101004.845@smtp.new-ukraine.org> <1415715795.1681955.189655693.7993AEA6@webmail.messagingengine.com> <20141111223833.46741@smtp.new-ukraine.org> <1415890567.2670730.190586365.02618860@webmail.messagingengine.com> Subject: Re: unsupported feature: com.delfix and can't find pool by guid after old STABLE10.0-to-RELENG10.0 upgrade Date: Fri, 14 Nov 2014 07:44:38 -0600 Cc: freebsd-fs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2014 13:44:40 -0000 On Thu, Nov 13, 2014, at 10:06, Kimmo Paasiala wrote: > Altroot does the right thing (tm) and moves all mountpoints to be > relative to the altroot property, in other words the value of the > altroot property is prepended to every mountpoint. Both inherited and > explicitly set mountpoints behave exactly as you expect with altroot. > Thanks for this info! I'll definitely use altroot in the future. From owner-freebsd-fs@FreeBSD.ORG Sat Nov 15 01:38:12 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC119EDE for ; Sat, 15 Nov 2014 01:38:12 +0000 (UTC) Received: from mail-yk0-x22e.google.com (mail-yk0-x22e.google.com [IPv6:2607:f8b0:4002:c07::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 797E6ED9 for ; Sat, 15 Nov 2014 01:38:12 +0000 (UTC) Received: by mail-yk0-f174.google.com with SMTP id q9so3598416ykb.33 for ; Fri, 14 Nov 2014 17:38:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=JYKoosAfI2w1hA1p46+qfQz28RF9yy3QnMvHVFxw2zQ=; b=bjDk/PmUtSgvGD/BuH0T67sEL/ZJlzbhvolwFn4PglgxPnpQQcRfH6c7yiMIMh7c57 zy+iSBuC3Qa0CA1cHfDbUChkw7KMh/pQL4vX1oWtqectIvUFUwz0UxhI+kJx6RiJNp// cWCc4uMl7vGlcnXqwUSTUUsV8zHigsREPwSmC733cqgZTA9U01ooXzsL6sBDdAk7mbpJ HM4N8C/C6UyXXKsFOyoGjEZT+y+H1ciuGqtbPFdnyAbRCqVy/2doBt8EcHiXJCw6akbI sbSfDd7W3E1hToPmwH+SpPNLMJe4lJFGbiyexeQU2pcYhjS3uyUkZvOKCmreNwKn209h kEFw== MIME-Version: 1.0 X-Received: by 10.236.4.70 with SMTP id 46mr13650485yhi.95.1416015491647; Fri, 14 Nov 2014 17:38:11 -0800 (PST) Sender: kmacybsd@gmail.com Received: by 10.170.82.197 with HTTP; Fri, 14 Nov 2014 17:38:11 -0800 (PST) In-Reply-To: References: Date: Fri, 14 Nov 2014 17:38:11 -0800 X-Google-Sender-Auth: SkY54U9hnBTZpMAe4yg7fE9Fo0g Message-ID: Subject: Re: ZFS + xattr -> panic loop From: "K. Macy" To: javocado Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD Filesystems X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2014 01:38:12 -0000 How big is your data set? Other users have seen corruption (data loss multiple times on the same data set) with extended attributes and I need a test case. Thanks. -K On Thu, Nov 13, 2014 at 11:43 AM, javocado wrote: > After running an rsync (upload) into my zfs filesystem using the > --fake-super option (which stores permissions in extended attributes) the > zfs filesystem has somehow become corrupt. When booting the system it > panic's upon zfs startup: > > panic: solaris assert: VFS_ROOT(vfsp, LK_EXCLUSIVE, &vp) == 0, file: > /usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c > , line: 1170 > cpuid = 12 > KDB: stack backtrace: > #0 0xffffffff8034b3ae at kdb_backtrace+0x5e > #1 0xffffffff803185c7 at panic+0x187 > #2 0xffffffff80ab8213 at zfs_mount+0x563 > #3 0xffffffff803a2635 at vfs_donmount+0xdc5 > #4 0xffffffff803a3133 at nmount+0x63 > #5 0xffffffff80553284 at amd64_syscall+0x1f4 > #6 0xffffffff8053bc2c at Xfast_syscall+0xfc > > I was able to boot the system by setting the filesystem: > > canmount=off > > However, I am still unable to mount it manually without causing a similar > panic. > > So, setting the cause of the panic aside for the moment, I just want to get > to the data. I'd like to think I can do that by turning off xattrs and > mounting it read-only however: > > # zfs set xattr=off pool/data > property 'xattr' not supported on FreeBSD: permission denied > > How can I turn that off? > > Second or alternately, if I want to just dump the filesystem out excluding > the extended attributes, so that I have a clean, mountable data set, how > would I do that? > > Thank you! > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" From owner-freebsd-fs@FreeBSD.ORG Sat Nov 15 18:11:59 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19A0D53E for ; Sat, 15 Nov 2014 18:11:59 +0000 (UTC) Received: from mail-wg0-x22a.google.com (mail-wg0-x22a.google.com [IPv6:2a00:1450:400c:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A1009644 for ; Sat, 15 Nov 2014 18:11:58 +0000 (UTC) Received: by mail-wg0-f42.google.com with SMTP id z12so3662029wgg.29 for ; Sat, 15 Nov 2014 10:11:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=hLzeDm21NLGgB5W7AweSgBVg2VzRAbhNOQnb9sK8tOc=; b=idKtCm0S2eu/7OrRIoaMb8n99WnPateJVG3sZarM6sbm2Yada+/I8babDaELwWwB0i VmUBJBD9ilUkcHsw7iy4Z2svPqNVhv4JEJ9cnxeKl44qOnP14BV/oAEX4AblyaHo4dps YdtyB0E6DhdQeGpVh8hXKw9Uq6wXDA9Pu5ERt9Gg93PXERcjIf9jjvQHPtPATlbGdB9Y I5TzpBgVdXVnrSCEh+glBF+joFKO19cjdzrZ7RS3+ES5R+dRRs+Ah7FY13tW3VeCTwc1 uOP6Q0jmjxj9VXsJ7psDLFauY9OSisCxGpLNNh49ZjL4Zct4hXRqPdB8YSL0BmykkI5n cRtg== X-Received: by 10.194.189.81 with SMTP id gg17mr24905192wjc.115.1416075116950; Sat, 15 Nov 2014 10:11:56 -0800 (PST) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.194.137.5 with HTTP; Sat, 15 Nov 2014 10:11:36 -0800 (PST) From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Sat, 15 Nov 2014 19:11:36 +0100 X-Google-Sender-Auth: hNK-fbNblvRkA2VxZTzHPiC9tBQ Message-ID: Subject: No more free space after upgrading to 10.1 and zpool upgrade To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2014 18:11:59 -0000 Hi, I've upgraded a small NAS to 10.1 and issue a zpool upgrade. But now I've got a problem: my volume didn't have free space anymore (it should have about 50GB of free space). #zpool list storage NAME SIZE ALLOC FREE FRAG EXPANDSZ CAP DEDUP HEALTH ALTROOT storage 9,06T 8,87T 198G 15% - 97% 1.00x ONLINE - # zfs list storage NAME USED AVAIL REFER MOUNTPOINT storage 7,09T 0 404M /storage => notice the 0 in "AVAIL" I've tried: 1. To export+import the pool but no change. 2. To delete about 20GB of files: no changes, still 0 free space available ! I didn't use snapshot too: Then I've got no snapshot nothing to delete. What can I do for retrieving the free space ? Thanks, Olivier From owner-freebsd-fs@FreeBSD.ORG Sat Nov 15 23:10:48 2014 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9DB0FB2 for ; Sat, 15 Nov 2014 23:10:48 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D15922C3 for ; Sat, 15 Nov 2014 23:10:48 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sAFNAmKJ057423 for ; Sat, 15 Nov 2014 23:10:48 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 181565] [swap] Problem with vnode-backed swap space. Date: Sat, 15 Nov 2014 23:10:49 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: elij+freebsd@wundrd.net X-Bugzilla-Status: In Discussion X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Nov 2014 23:10:49 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=181565 elij changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |elij+freebsd@wundrd.net --- Comment #2 from elij --- Having the same problem. This worked on 10.0-RELEASE. After upgrading to 10.1-RELEASE, it no longer works. /etc/fstab: md99 none swap sw,file=/swap0 0 0 After boot: # mdconfig -lv md99 vnode 256M /swap0 # swapinfo Device 1K-blocks Used Avail Capacity # Deleting the md and calling swapon by hand works. # mdconfig -d -u 99; swapon -a; swapinfo -h swapon: adding /dev/md99 as swap device Device 1K-blocks Used Avail Capacity /dev/md99 262144 0B 256M 0% -- You are receiving this mail because: You are the assignee for the bug.