From owner-freebsd-fs@freebsd.org Sun Jul 23 21:00:23 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B44CDDAD35C for ; Sun, 23 Jul 2017 21:00:23 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) 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 A97326F552 for ; Sun, 23 Jul 2017 21:00:23 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6NL01aw095987 for ; Sun, 23 Jul 2017 21:00:23 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <201707232100.v6NL01aw095987@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 Date: Sun, 23 Jul 2017 21:00:23 +0000 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jul 2017 21:00:23 -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 ------------+-----------+--------------------------------------------------- New | 203492 | mount_unionfs -o below causes panic New | 217062 | for file systems mounted with -o noexec, exec=off Open | 136470 | [nfs] Cannot mount / in read-only, over NFS Open | 139651 | [nfs] mount(8): read-only remount of NFS volume d Open | 140068 | [smbfs] [patch] smbfs does not allow semicolon in Open | 144447 | [zfs] sharenfs fsunshare() & fsshare_main() non f Open | 211491 | System hangs after "Uptime" on reboot with ZFS 7 problems total for which you should take action. From owner-freebsd-fs@freebsd.org Sun Jul 23 21:21:08 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9996DADE87 for ; Sun, 23 Jul 2017 21:21:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 B68BA703CE for ; Sun, 23 Jul 2017 21:21:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6NLL80W086899 for ; Sun, 23 Jul 2017 21:21:08 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 208882] zfs root filesystem mount failure on startup in FreeBSD 10.3-RELEASE if USB hdd with zpool is attached to another port Date: Sun, 23 Jul 2017 21:21:08 +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.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: stb@lassitu.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jul 2017 21:21:08 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208882 stb@lassitu.de changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stb@lassitu.de --- Comment #14 from stb@lassitu.de --- I'm encountering this behaviour as well, trying to boot off a USB stick. It would be great if the patch would make it into stable, at least as an optio= n I can enable through a tunable. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Mon Jul 24 07:36:51 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3E84C083CC for ; Mon, 24 Jul 2017 07:36:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 E19E2841AD for ; Mon, 24 Jul 2017 07:36:50 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6O7anBX054843 for ; Mon, 24 Jul 2017 07:36:50 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 208882] zfs root filesystem mount failure on startup in FreeBSD 10.3-RELEASE if USB hdd with zpool is attached to another port Date: Mon, 24 Jul 2017 07:36: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.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: trasz@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2017 07:36:51 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208882 --- Comment #15 from Edward Tomasz Napierala --- FWIW, it should be possible to fix without any source changes using mount.c= onf (man mount.conf). --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Mon Jul 24 07:52:31 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1075C08858 for ; Mon, 24 Jul 2017 07:52:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 B65668483D for ; Mon, 24 Jul 2017 07:52:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6O7qVEw096360 for ; Mon, 24 Jul 2017 07:52:31 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 208882] zfs root filesystem mount failure on startup in FreeBSD 10.3-RELEASE if USB hdd with zpool is attached to another port Date: Mon, 24 Jul 2017 07:52:31 +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.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: stb@lassitu.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2017 07:52:31 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208882 --- Comment #16 from stb@lassitu.de --- (In reply to Edward Tomasz Napierala from comment #15) Really? Would you mind pointing out which specific contents of /.mount.conf would work around this issue? And where would that file live? --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Mon Jul 24 21:07:58 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08DD1D7FF15 for ; Mon, 24 Jul 2017 21:07:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 AD7A47C8F2 for ; Mon, 24 Jul 2017 21:07:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6OL7v1q031879 for ; Mon, 24 Jul 2017 21:07:57 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 208882] zfs root filesystem mount failure on startup in FreeBSD 10.3-RELEASE if USB hdd with zpool is attached to another port Date: Mon, 24 Jul 2017 21:07:57 +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.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: stb@lassitu.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2017 21:07:58 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208882 --- Comment #17 from stb@lassitu.de --- I can report that the patch works for me. I would really appreciate seeing this in stable and in a patch release for 11.1, so I can run with a stock kernel again. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Tue Jul 25 22:43:32 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7221BDA931E for ; Tue, 25 Jul 2017 22:43:32 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660043.outbound.protection.outlook.com [40.107.66.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 17ABC6A1FA for ; Tue, 25 Jul 2017 22:43:31 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM (10.165.218.133) by YTXPR01MB0192.CANPRD01.PROD.OUTLOOK.COM (10.165.218.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1282.10; Tue, 25 Jul 2017 22:43:29 +0000 Received: from YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) by YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM ([10.165.218.133]) with mapi id 15.01.1282.020; Tue, 25 Jul 2017 22:43:29 +0000 From: Rick Macklem To: "freebsd-fs@freebsd.org" Subject: Review of an NFS forced dismount option Thread-Topic: Review of an NFS forced dismount option Thread-Index: AQHTBZb6gvqw20zKsEm6prxgWUV1mg== Date: Tue, 25 Jul 2017 22:43:29 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTXPR01MB0192; 7:NiRd4zhwPKrNuyuCfbbIhgBech7d++g0gWXqO0QKVRY1LY7Wm4jExd/AMmnkVqNkY/AmbFQeigquzW9uKLwRw4LgYTO0dB4cShKQ/AfzaeYEy6Sp5SGRw8UXjWZyMD7pA72+J9ih3e2O8qO8yE3ShYbxeb8ddim8HftBY+Xhe7JdQIYRpW+LlNJhC/xw54VN+Ylev7cXQstQlT53p6x79B9qvAzm//aWggjYwcevOZsUOdCgT1DfNd7xBUEBs/qqFlFAodcO5BM757P8mALdE2+ReIdK4So3YLXRs4BK3/eiW5lYgKVx71L5RrjaYTDnfCBTIjWqt4bhYyMBbvJHXkJX4Q7lTmvDpwrWC1bx/mJvODE7ZpgvFncHrMATO6QJKL9Ke2+9+ILB3rwmx1EfZHBrMuT8Z7Gw73lfh4tQIJ8t7ofLAu29OBLDVdKApgGEZmG/kohnQH/1iB6+GpRhm4SWTvmY4a6oRfuAa0BKeNibJqwxM0kbLuIOMZptAu99y1MMszZ94nSsmbcEqU4b/wSsOY4hWcy1/2OHEgDu36NrYFb5VqMG8G6e/vVBqq1MYwwhuNsAYIs5q4L/TouZkjeIJtb6WQfk6mPmb2UrqoeEi6dIXeX+J1y/cMu46dpg8m9t6cf0raQ+6OoN//X6rA//N0nh0kvzWyVQPUmJPR0G4Orn9sdKx9kGaTf7yj/sKgMBY2uQVoys5YmCnNv8af1/n+jV7kclvX6kZ1KPvRgD+Awsh6puGervjfAOdnjse7hbvczjottS6ARGZpbPBxtl8TP8HMmrwdnPjm3aO7U= x-ms-office365-filtering-correlation-id: a4fd8d59-d1c6-49d6-69b5-08d4d3ae922d x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:YTXPR01MB0192; x-ms-traffictypediagnostic: YTXPR01MB0192: x-exchange-antispam-report-test: UriScan:(158342451672863); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6041248)(201703131423075)(201702281529075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:YTXPR01MB0192; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:YTXPR01MB0192; x-forefront-prvs: 03793408BA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39850400002)(39400400002)(39410400002)(39840400002)(39450400003)(189002)(199003)(110136004)(74482002)(2351001)(33656002)(54356999)(50986999)(101416001)(189998001)(97736004)(105586002)(86362001)(106356001)(25786009)(53936002)(6436002)(9686003)(6306002)(5640700003)(305945005)(55016002)(38730400002)(478600001)(74316002)(8676002)(8936002)(81166006)(81156014)(3660700001)(2501003)(2900100001)(3280700002)(2906002)(102836003)(6506006)(68736007)(77096006)(6916009)(5660300001)(966005)(7696004)(14454004); DIR:OUT; SFP:1101; SCL:1; SRVR:YTXPR01MB0192; H:YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jul 2017 22:43:29.5365 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTXPR01MB0192 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jul 2017 22:43:32 -0000 I have put a patch on https://reviews.freebsd.org/D11735 which I'd apprecia= te any reviews of. It is an attempt at fixing the NFS client problem where a "umount -f" of an NFS mount point gets hung because a "df" or non-forced "u= mount" has already been done on the mount point. Here's the summary for it: If an NFS mount point is hung due to an unresponsive NFS server, a "umount = -f" will unmount the mount point, if the "umount" executes the NFS VFS_UNMO= UNT() call. Unfortunately, this often won't happen. Typically this fails when a process= , such as "df" or a "umount" without "-f" is hung on the mountpoint while holding a lock, suc= h as the vnode lock for the mounted-on vnode. =20 This patch adds a new option to umount called "-N" which does the forced di= smount but bypasses the checking in umount.c (which often gets hung as above) and by d= oing an nfssvc() syscall to ensure that any process hung on the mount point= fails, so any locks get released. It can then reliably do the forced dismo= unt. Unfortunately, since it doesn't do any checking, it only works if the mount= ed-on path is specified exactly as it was at mount time (and is stored in mnt_stat.f_mnto= nname). From owner-freebsd-fs@freebsd.org Wed Jul 26 18:05:22 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05907DAC783 for ; Wed, 26 Jul 2017 18:05:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 E89A86FFFF for ; Wed, 26 Jul 2017 18:05:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6QI5L0Q007472 for ; Wed, 26 Jul 2017 18:05:21 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 190462] request: don't active feature flags when upgrading zfs pool Date: Wed, 26 Jul 2017 18:05:21 +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: allanjude@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jul 2017 18:05:22 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D190462 --- Comment #2 from Allan Jude --- This is not really a concern. Most all features can be in the 'enabled' sta= te, and still be imported by older versions of ZFS. It is the 'active' state, t= hat means one or more datasets is currently using that feature, and that a syst= em requires that feature in order to read the data. Destroying the last dataset that is using that feature (for example, the skein hashing algo), will reve= rt that feature to 'enabled', and the pool can be imported on a system without that feature. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Fri Jul 28 05:26:37 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00D4EDBE2F5 for ; Fri, 28 Jul 2017 05:26:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 E32DB743D2 for ; Fri, 28 Jul 2017 05:26:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6S5Qaev086689 for ; Fri, 28 Jul 2017 05:26:36 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221060] zfs: sending/receiving a zvol within same host to the same dataset produces errors and shadow child(!) datasets Date: Fri, 28 Jul 2017 05:26:37 +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: 11.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 05:26:37 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221060 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|freebsd-bugs@FreeBSD.org |freebsd-fs@FreeBSD.org --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Fri Jul 28 10:56:19 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1094DC3072; Fri, 28 Jul 2017 10:56:19 +0000 (UTC) (envelope-from emz@norma.perm.ru) Received: from elf.hq.norma.perm.ru (mail.norma.perm.ru [IPv6:2a00:7540:1::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.norma.perm.ru", Issuer "Vivat-Trade UNIX Root CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 313B780B43; Fri, 28 Jul 2017 10:56:15 +0000 (UTC) (envelope-from emz@norma.perm.ru) Received: from bsdrookie.norma.com. (net206-94.perm.ertelecom.ru [46.146.206.94] (may be forged)) by elf.hq.norma.perm.ru (8.15.2/8.15.2) with ESMTPS id v6SAuBTj049223 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 28 Jul 2017 15:56:12 +0500 (YEKT) (envelope-from emz@norma.perm.ru) To: freebsd-fs@FreeBSD.org Cc: freebsd-stable From: "Eugene M. Zheganin" Subject: some general zfs tuning (for iSCSI) Message-ID: <8b41e7d6-7a2c-d456-2eee-93efd81aa86a@norma.perm.ru> Date: Fri, 28 Jul 2017 15:56:11 +0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spamd-Result: default: False [1.50 / 25.00] RBL_SPAMHAUS_PBL(2.00)[94.206.146.46.zen.spamhaus.org : 127.0.0.10] HFILTER_HOSTNAME_UNKNOWN(2.50)[] BAYES_HAM(-3.00)[99.99%] DMARC_NA(0.00)[norma.perm.ru] MIME_GOOD(-0.10)[text/plain] R_DKIM_NA(0.00)[] R_SPF_SOFTFAIL(0.00)[~all] MID_RHS_MATCH_FROM(0.00)[] RECEIVED_SPAMHAUS(0.00)[94.206.146.46.zen.spamhaus.org] TO_DN_SOME(0.00)[] RCPT_COUNT_2(0.00)[] TO_MATCH_ENVRCPT_ALL(0.00)[] FROM_HAS_DN(0.00)[] FROM_EQ_ENVFROM(0.00)[] RCVD_COUNT_1(0.00)[] ONCE_RECEIVED(0.10)[] X-Rspamd-Server: localhost X-Rspamd-Scan-Time: 0.69 X-Rspamd-Queue-ID: v6SAuBTj049223 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 10:56:19 -0000 Hi, I'm using several FreeBSD zfs installations as the iSCSI production systems, they basically consist of an LSI HBA, and a JBOD with a bunch of SSD disks (12-24, Intel, Toshiba or Sandisk (avoid Sandisks btw)). And I observe a problem very often: gstat shows 20-30% of disk load, but the system reacts very slowly: cloning a dataset takes 10 seconds, similar operations aren't lightspeeding too. To my knowledge, until the disks are 90-100% busy, this shouldn't happen. My systems are equipped with 32-64 gigs of RAM, and the only tuning I use is limiting the ARC size (in a very tender manner - at least to 16 gigs) and playing with TRIM. The number of datasets is high enough - hundreds of clones, dozens of snapshots, most of teh data ovjects are zvols. Pools aren't overfilled, most are filled up to 60-70% (no questions about low space pools, but even in this case the situation is clearer - %busy goes up in the sky). So, my question is - is there some obvious zfs tuning not mentioned in the Handbook ? On the other side - handbook isn't much clear on how to tune zfs, it's written mostly in the manner of "these are sysctl iods you can play with". Of course I have seen several ZFS tuning guides. Like Opensolaris one, but they are mostly file- and application-specific. Is there some special approach to tune ZFS in the environment with loads of disks ? I don't know.... like tuning the vdev cache or something simllar. ? Thanks. Eugene. From owner-freebsd-fs@freebsd.org Fri Jul 28 15:41:01 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51598DC8589 for ; Fri, 28 Jul 2017 15:41:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 3FBE76533B for ; Fri, 28 Jul 2017 15:41:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6SFf0sd002706 for ; Fri, 28 Jul 2017 15:41:01 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221067] vfs.root.mountfrom.options="ro" did not take effect for a zfs root filesystem Date: Fri, 28 Jul 2017 15:41:01 +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: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to keywords 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 15:41:01 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221067 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|freebsd-bugs@FreeBSD.org |freebsd-fs@FreeBSD.org Keywords| |patch --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Fri Jul 28 15:41:31 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 904F8DC8724 for ; Fri, 28 Jul 2017 15:41:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 7E8636555F for ; Fri, 28 Jul 2017 15:41:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6SFfUcj004744 for ; Fri, 28 Jul 2017 15:41:31 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221064] zfs should not shadow mount on root directory from userspace Date: Fri, 28 Jul 2017 15:41:31 +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: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to keywords 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 15:41:31 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221064 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|freebsd-bugs@FreeBSD.org |freebsd-fs@FreeBSD.org Keywords| |patch --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Fri Jul 28 16:08:08 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64C70DC9373 for ; Fri, 28 Jul 2017 16:08:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 52D6966714 for ; Fri, 28 Jul 2017 16:08:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6SG88f4086175 for ; Fri, 28 Jul 2017 16:08:08 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221067] vfs.root.mountfrom.options="ro" did not take effect for a zfs root filesystem Date: Fri, 28 Jul 2017 16:08:08 +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: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: avg@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 16:08:08 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221067 --- Comment #2 from Andriy Gapon --- If I am reading comment #0 correctly, the reporter wants vfs.root.mountfrom.options=3D"ro" to imply the read-only import of the pool. I think that that's not what vfs.root.mountfrom.options is for. We could a= dd a different knob for that as it might be useful in certain situations. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Fri Jul 28 16:11:55 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 580FADC9790 for ; Fri, 28 Jul 2017 16:11:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 465B466D13 for ; Fri, 28 Jul 2017 16:11:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6SGBtuI098170 for ; Fri, 28 Jul 2017 16:11:55 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221067] vfs.root.mountfrom.options="ro" did not take effect for a zfs root filesystem Date: Fri, 28 Jul 2017 16:11: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: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: allanjude@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 16:11:55 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221067 --- Comment #3 from Allan Jude --- (In reply to Andriy Gapon from comment #2) I would tend to agree, having the entire pool be readonly would be unexpect= ed when the sysctl suggests only the root filesystem will be readonly. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Fri Jul 28 16:40:43 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09AD8DC9E21 for ; Fri, 28 Jul 2017 16:40:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 EC6E767BBB for ; Fri, 28 Jul 2017 16:40:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6SGegj0058891 for ; Fri, 28 Jul 2017 16:40:42 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 194588] [zfs] kernel panic when running zpool/remove/spare.t Date: Fri, 28 Jul 2017 16:40:43 +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: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 16:40:43 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D194588 Ed Maste changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emaste@freebsd.org --- Comment #2 from Ed Maste --- There are a variety of spare.t tests under tools/regression/zfs/zpool --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Fri Jul 28 17:08:09 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E28F6DCA69C for ; Fri, 28 Jul 2017 17:08:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 CD64868A9E for ; Fri, 28 Jul 2017 17:08:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6SH89vC046169 for ; Fri, 28 Jul 2017 17:08:09 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 194588] [zfs] kernel panic when running zpool/remove/spare.t Date: Fri, 28 Jul 2017 17:08:09 +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: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: ngie@FreeBSD.org X-Bugzilla-Status: Closed X-Bugzilla-Resolution: Unable to Reproduce X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 17:08:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D194588 Ngie Cooper changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Closed Resolution|--- |Unable to Reproduce --- Comment #3 from Ngie Cooper --- Doesn't repro on ^/head. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Fri Jul 28 21:00:44 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A43BEDCEE2A for ; Fri, 28 Jul 2017 21:00:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 924D370AA5 for ; Fri, 28 Jul 2017 21:00:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6SL0iQr005566 for ; Fri, 28 Jul 2017 21:00:44 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221064] zfs should not shadow mount on root directory from userspace Date: Fri, 28 Jul 2017 21:00:44 +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: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 21:00:44 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221064 Ed Maste changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Fri Jul 28 21:04:35 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE62BDCF0FB for ; Fri, 28 Jul 2017 21:04:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 BCE2070E27 for ; Fri, 28 Jul 2017 21:04:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6SL4ZpM031217 for ; Fri, 28 Jul 2017 21:04:35 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221067] vfs.root.mountfrom.options="ro" did not take effect for a zfs root filesystem Date: Fri, 28 Jul 2017 21:04:36 +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: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: wheelcomplex@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 21:04:35 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221067 --- Comment #4 from David NewHamlet --- (In reply to Allan Jude from comment #1) I hit this issue when trying to use a zfs as rootfs which use a compressed md_image as underlayer device. A compressed md_image can not be opened in w= rite mode(see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221066). So in this case I want to open the whole zfs pool in readonly. A new kenv entry to control this behavior also make sense. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Fri Jul 28 21:48:35 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67056DD0904 for ; Fri, 28 Jul 2017 21:48:35 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 3A0C173477 for ; Fri, 28 Jul 2017 21:48:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6SLmYWE057924 for ; Fri, 28 Jul 2017 21:48:34 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221064] zfs should not shadow mount on root directory from userspace Date: Fri, 28 Jul 2017 21:48:35 +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: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: wheelcomplex@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 21:48:35 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221064 --- Comment #2 from David NewHamlet --- (In reply to Allan Jude from comment #1) Thanks for your explaining. Using altroot/canmount=3Dnoauto/import -N for i= mport a pool, which has mountpoint=3D/ with a dataset, is a way to avoid shadown = mount. I am wared befor sent this report. However, never be able to shadown mount rootfs from userspace should be a common rule for all filesystem. This is why I think a work-around is not en= ough and send a report. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Fri Jul 28 21:50:10 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5B96DD09EF for ; Fri, 28 Jul 2017 21:50:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 D3784735BD for ; Fri, 28 Jul 2017 21:50:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6SLoAI0060335 for ; Fri, 28 Jul 2017 21:50:10 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221064] zfs should not be abole to shadow mount on root directory from userspace Date: Fri, 28 Jul 2017 21:50:11 +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: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: wheelcomplex@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: short_desc 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 21:50:11 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221064 David NewHamlet changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|zfs should not shadow mount |zfs should not be abole to |on root directory from |shadow mount on root |userspace |directory from userspace --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Fri Jul 28 21:50:40 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6395DD0A47 for ; Fri, 28 Jul 2017 21:50:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 B48CA73659 for ; Fri, 28 Jul 2017 21:50:40 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6SLoeCp061708 for ; Fri, 28 Jul 2017 21:50:40 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221064] zfs should not be able to shadow mount on root directory from userspace Date: Fri, 28 Jul 2017 21:50:40 +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: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: wheelcomplex@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: short_desc 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 21:50:40 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221064 David NewHamlet changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|zfs should not be abole to |zfs should not be able to |shadow mount on root |shadow mount on root |directory from userspace |directory from userspace --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Fri Jul 28 22:46:09 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B354DD1B64 for ; Fri, 28 Jul 2017 22:46:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 ED8927571A for ; Fri, 28 Jul 2017 22:46:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6SMk8Jw015364 for ; Fri, 28 Jul 2017 22:46:08 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221064] zfs should not be able to shadow mount on root directory from userspace Date: Fri, 28 Jul 2017 22:46:09 +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: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: allanjude@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2017 22:46:09 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221064 --- Comment #3 from Allan Jude --- (In reply to David NewHamlet from comment #2) Yes, at this point it is a policy decision, and I need to think about it so= me, and maybe talk to the upstream OpenZFS project about it. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Sat Jul 29 07:08:45 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57864DBC55E for ; Sat, 29 Jul 2017 07:08:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 3BF2B2871 for ; Sat, 29 Jul 2017 07:08:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6T78i1v066989 for ; Sat, 29 Jul 2017 07:08:45 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221064] zfs should not be able to shadow mount on root directory from userspace Date: Sat, 29 Jul 2017 07:08: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: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: avg@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 07:08:45 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221064 --- Comment #4 from Andriy Gapon --- (In reply to Allan Jude from comment #3) I am not sure that that policy has anything to do with OpenZFS. Each operating system handles that in its own way. For example, as far as I know, in illumos you can not mount any filesystem = over any non-empty directory. In FreeBSD we allow mounts anywhere, including root. And there is nothing ZFS specific about that. I personally think that allowing to mount over / is more dangerous than use= ful. But people always find creative uses for every feature and misfeature, so I think that a wider discussion about such a fundamental decision will be required. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Sat Jul 29 07:35:04 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7000DBCE49 for ; Sat, 29 Jul 2017 07:35:04 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 627B3341A; Sat, 29 Jul 2017 07:35:04 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id 44D6027392; Sat, 29 Jul 2017 07:28:19 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTP id v6T7S3Z3064646; Sat, 29 Jul 2017 07:28:03 GMT (envelope-from phk@phk.freebsd.dk) To: bugzilla-noreply@freebsd.org cc: freebsd-fs@FreeBSD.org Subject: Re: [Bug 221064] zfs should not be able to shadow mount on root directory from userspace In-reply-to: From: "Poul-Henning Kamp" References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <64644.1501313283.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Sat, 29 Jul 2017 07:28:03 +0000 Message-ID: <64645.1501313283@critter.freebsd.dk> X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 07:35:04 -0000 -------- In message , = bugzi lla-noreply@freebsd.org writes: >I personally think that allowing to mount over / is more dangerous than u= seful. Quite the contrary, it is far more useful than dangerous: It is not uncommon for embedded systems to boot with a absolutely minimal root filesystem compiled into the kernel, and /sbin/init in that filesystem will mount the "real" root over / and exec the "real" /sbin/init. -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= . From owner-freebsd-fs@freebsd.org Sat Jul 29 07:48:11 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BECADBD489 for ; Sat, 29 Jul 2017 07:48:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 0A50A3A22 for ; Sat, 29 Jul 2017 07:48:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6T7mA5A071009 for ; Sat, 29 Jul 2017 07:48:10 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221064] zfs should not be able to shadow mount on root directory from userspace Date: Sat, 29 Jul 2017 07:48:11 +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: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: phk@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 07:48:11 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221064 Poul-Henning Kamp changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |phk@FreeBSD.org --- Comment #5 from Poul-Henning Kamp --- Quite the contrary, it is far more useful than dangerous: It is not uncommon for embedded systems to boot with a absolutely minimal root filesystem compiled into the kernel, and /sbin/init in that filesystem will mount the "real" root over / and exec the "real" /sbin/init. (And remember: FreeBSD delivers tools, not policies). --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Sat Jul 29 08:34:39 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B4C1DBE0DA for ; Sat, 29 Jul 2017 08:34:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 22CC363E0F for ; Sat, 29 Jul 2017 08:34:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6T8YcVN009286 for ; Sat, 29 Jul 2017 08:34:39 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221064] zfs should not be able to shadow mount on root directory from userspace Date: Sat, 29 Jul 2017 08:34:39 +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: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: wheelcomplex@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 08:34:39 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221064 --- Comment #6 from David NewHamlet --- (In reply to Poul-Henning Kamp from comment #5) kenv vfs.root.mountfrom=3D"second rootfs(zfs:newtank/rootfs)" and reboot -r= will trigger kernel to stop all running proccess(include first init) and umount first rootfs. After that, kernel will try to mount second filesystem as roo= tfs and execute init from second rootfs.=20 This might be a better way to handle your case. This is a useful feature similar to switch_root in Linux world which is very common in embedded linux. It was introduced by trasz on Sep 18 2015, 5:35 PM. https://reviews.freebsd.org/D3693 --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Sat Jul 29 08:38:58 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 825B7DBE1F7 for ; Sat, 29 Jul 2017 08:38:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 707656401B for ; Sat, 29 Jul 2017 08:38:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6T8cw0s015355 for ; Sat, 29 Jul 2017 08:38:58 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221064] zfs should not be able to shadow mount on root directory from userspace Date: Sat, 29 Jul 2017 08:38:58 +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: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: wheelcomplex@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 08:38:58 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221064 --- Comment #7 from David NewHamlet --- reboot -r support in kernel: https://reviews.freebsd.org/D2698 --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Sat Jul 29 09:03:10 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C35ACDBED9F for ; Sat, 29 Jul 2017 09:03:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 B1DD764F5B for ; Sat, 29 Jul 2017 09:03:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6T93AAw019282 for ; Sat, 29 Jul 2017 09:03:10 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221064] zfs should not be able to shadow mount on root directory from userspace Date: Sat, 29 Jul 2017 09:03:10 +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: CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: phk@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 09:03:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221064 --- Comment #8 from Poul-Henning Kamp --- Yes, that's very useful and without dispute a better way to do that. But we still shouldn't remove a feature people use without due notice. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Sat Jul 29 10:45:04 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A02A5DC12B8 for ; Sat, 29 Jul 2017 10:45:04 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) (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 0A37B68170 for ; Sat, 29 Jul 2017 10:45:03 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by dss.incore.de (Postfix) with ESMTP id A1D9E67911; Sat, 29 Jul 2017 12:38:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at incore.de Received: from dss.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id YX52_7uA3FZF; Sat, 29 Jul 2017 12:38:14 +0200 (CEST) Received: from mail.local.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id 34A3B6790A; Sat, 29 Jul 2017 12:38:14 +0200 (CEST) Received: from bsdmhs.longwitz (unknown [192.168.99.6]) by mail.local.incore (Postfix) with ESMTP id C5DD8508A1; Sat, 29 Jul 2017 12:38:13 +0200 (CEST) Message-ID: <597C6595.7070404@incore.de> Date: Sat, 29 Jul 2017 12:38:13 +0200 From: Andreas Longwitz User-Agent: Thunderbird 2.0.0.19 (X11/20090113) MIME-Version: 1.0 To: Konstantin Belousov CC: Kirk McKusick , freebsd-fs@freebsd.org Subject: Re: ufs snapshot is sometimes corrupt on gjourneled partition References: <596C7201.8090700@incore.de> <201707180044.v6I0iKvg040471@chez.mckusick.com> <20170718102200.GT1935@kib.kiev.ua> In-Reply-To: <20170718102200.GT1935@kib.kiev.ua> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 10:45:04 -0000 hello Kirk and Kostik, you are both right. > So, I really do not understand how you can end up with a buffer with > invalid contents if B_CACHE is set because we are open coding bread() > here and that is the criterion it uses to read. If however, you do > the read when B_CACHE is not set, then as noted you will get the > wrong results and crash. But see also my comments below when B_CACHE > is not set. The patch -- ffs_snapshot.c.1st 2016-06-08 17:25:21.000000000 +0200 +++ ffs_snapshot.c 2017-07-29 10:51:34.682067000 +0200 @@ -1403,7 +1403,7 @@ */ bp = getblk(cancelvp, lbn, fs->fs_bsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, blkno); - if ((bp->b_flags & (B_DONE | B_DELWRI)) == 0 && + if ((bp->b_flags & (B_DONE | B_DELWRI | B_CACHE)) == 0 && (error = readblock(cancelvp, bp, fragstoblks(fs, blkno)))) { brelse(bp); return (error); is correct, the buffer has always the correct data, when B_CACHE is set after calling getblk(). So the calls to readblock() are unnecessary in this case. In my first test the crash of following rm probably was induced by other readblock() calls, but I did not know at that time. > So the way to fix the bug is to read gjournal code and understand why > does it sometime returns wrong data. Yes, gjournal is broken in handling his flush_queue. If we have 10 bio's in the flush_queue: 1 2 3 4 5 6 7 8 9 10 and another 10 bio's goes to the flush queue before all the first 10 bio's was removed from the flush queue we should have something like 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20, but because of the bug we end up with 6 11 12 13 14 15 16 17 18 19 20 7 8 9 10. So the sequence of the bio's is damaged in the flush queue (and therefore in the journal an disk !). This error can be triggered by ffs_snapshot(), when a block is read with readblock() and gjournal finds this block in the broken flush queue before he goes to the correct active queue. The following patch solved this problem for me: --- g_journal.c.orig 2017-05-08 14:16:42.000000000 +0200 +++ g_journal.c 2017-07-28 21:25:58.891881000 +0200 @@ -1261,7 +1261,7 @@ strlcpy(hdr.jrh_magic, GJ_RECORD_HEADER_MAGIC, sizeof(hdr.jrh_magic)); bioq = &sc->sc_active.jj_queue; - pbp = sc->sc_flush_queue; + GJQ_LAST(sc->sc_flush_queue, pbp); fbp = g_alloc_bio(); fbp->bio_parent = NULL; with macro GJQ_LAST defined in g_journal.h: #define GJQ_LAST(head, bp) do { \ struct bio *_bp; \ \ if ((head) == NULL) { \ (bp) = (head); \ break; \ } \ for (_bp = (head); _bp->bio_next != NULL; _bp = _bp->bio_next);\ (bp) = (_bp); \ } while (0) Some more annotations about g_journal.c: - The patch given in bug 198500 is necessary to run gjournal with correct and adequate cache size. - The cache size for gjournal can be set by two tunables: cache.limit and cache.divisor. I do not know the best practice if there are two variables for setting the same resource. At the moment cache.limit is ignored at boot time, because it will be overwritten in g_journal_init. - In g_journal_flush() there is a writeonly variable "size". - If one process writes synchron a block and onother process reads the same block just after the write starts, then it is possible that the reader gets the new block before the writer has finished his write call. This happens, when the write goes to the delayed_queue for some time from where the read gets the data. But the write must wait until the bio goes to the current queue, where g_io_deliver() is called. If this is not intended, then the delayed queue should not be used for reads. -- Dr. Andreas Longwitz From owner-freebsd-fs@freebsd.org Sat Jul 29 13:01:30 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B79FDC3AA7 for ; Sat, 29 Jul 2017 13:01:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 2A41B6B939 for ; Sat, 29 Jul 2017 13:01:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6TD1UEp030496 for ; Sat, 29 Jul 2017 13:01:30 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221077] Boot from ZFS fails following freebsd-update Date: Sat, 29 Jul 2017 13:01:30 +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.3-RELEASE X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords assigned_to 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 13:01:30 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221077 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Assignee|freebsd-bugs@FreeBSD.org |freebsd-fs@FreeBSD.org --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Sat Jul 29 13:01:41 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 819B7DC3ADD for ; Sat, 29 Jul 2017 13:01:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 6C39E6B9D7 for ; Sat, 29 Jul 2017 13:01:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6TD1fqx032154 for ; Sat, 29 Jul 2017 13:01:41 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221075] regression: 11.1 is unable to mount ZFS / on boot Date: Sat, 29 Jul 2017 13:01:41 +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: 11.1-RELEASE X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 13:01:41 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221075 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|freebsd-bugs@FreeBSD.org |freebsd-fs@FreeBSD.org --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Sat Jul 29 14:41:27 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E02B4DC52B2 for ; Sat, 29 Jul 2017 14:41:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 CB1B36DEB4 for ; Sat, 29 Jul 2017 14:41:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6TEfRD8090548 for ; Sat, 29 Jul 2017 14:41:27 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221077] Boot from ZFS fails following freebsd-update Date: Sat, 29 Jul 2017 14:41:28 +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.3-RELEASE X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: bacon4000@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 14:41:28 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221077 --- Comment #1 from Jason Bacon --- BTW, this is a production system that I need to bring back online ASAP. If there is any info I can gather to help with diagnosis before I wipe it a= nd reinstall the system, let me know. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Sat Jul 29 15:24:51 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0C08DC5C63 for ; Sat, 29 Jul 2017 15:24:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 493FF6F078 for ; Sat, 29 Jul 2017 15:24:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v6TFOjBX095142 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 29 Jul 2017 18:24:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v6TFOjBX095142 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v6TFOiha095141; Sat, 29 Jul 2017 18:24:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 29 Jul 2017 18:24:44 +0300 From: Konstantin Belousov To: Andreas Longwitz Cc: Kirk McKusick , freebsd-fs@freebsd.org Subject: Re: ufs snapshot is sometimes corrupt on gjourneled partition Message-ID: <20170729152444.GB1700@kib.kiev.ua> References: <596C7201.8090700@incore.de> <201707180044.v6I0iKvg040471@chez.mckusick.com> <20170718102200.GT1935@kib.kiev.ua> <597C6595.7070404@incore.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <597C6595.7070404@incore.de> User-Agent: Mutt/1.8.3 (2017-05-23) 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.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 15:24:51 -0000 On Sat, Jul 29, 2017 at 12:38:13PM +0200, Andreas Longwitz wrote: > hello Kirk and Kostik, > > you are both right. > > > So, I really do not understand how you can end up with a buffer with > > invalid contents if B_CACHE is set because we are open coding bread() > > here and that is the criterion it uses to read. If however, you do > > the read when B_CACHE is not set, then as noted you will get the > > wrong results and crash. But see also my comments below when B_CACHE > > is not set. > > The patch > > -- ffs_snapshot.c.1st 2016-06-08 17:25:21.000000000 +0200 > +++ ffs_snapshot.c 2017-07-29 10:51:34.682067000 +0200 > @@ -1403,7 +1403,7 @@ > */ > bp = getblk(cancelvp, lbn, fs->fs_bsize, 0, 0, 0); > bp->b_blkno = fsbtodb(fs, blkno); > - if ((bp->b_flags & (B_DONE | B_DELWRI)) == 0 && > + if ((bp->b_flags & (B_DONE | B_DELWRI | B_CACHE)) == 0 && > (error = readblock(cancelvp, bp, fragstoblks(fs, blkno)))) { > brelse(bp); > return (error); > > is correct, the buffer has always the correct data, when B_CACHE is set > after calling getblk(). So the calls to readblock() are unnecessary in > this case. In my first test the crash of following rm probably was > induced by other readblock() calls, but I did not know at that time. Ok. In fact it is not clear to me why B_DONE or B_DELWRI is tested at all there. We only need to know that the buffer content is valid. > > > So the way to fix the bug is to read gjournal code and understand why > > does it sometime returns wrong data. > > Yes, gjournal is broken in handling his flush_queue. If we have 10 bio's > in the flush_queue: > 1 2 3 4 5 6 7 8 9 10 > and another 10 bio's goes to the flush queue before all the first 10 > bio's was removed from the flush queue we should have something like > 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20, > but because of the bug we end up with > 6 11 12 13 14 15 16 17 18 19 20 7 8 9 10. > So the sequence of the bio's is damaged in the flush queue (and > therefore in the journal an disk !). This error can be triggered by > ffs_snapshot(), when a block is read with readblock() and gjournal finds > this block in the broken flush queue before he goes to the correct > active queue. > > The following patch solved this problem for me: > > --- g_journal.c.orig 2017-05-08 14:16:42.000000000 +0200 > +++ g_journal.c 2017-07-28 21:25:58.891881000 +0200 > @@ -1261,7 +1261,7 @@ > strlcpy(hdr.jrh_magic, GJ_RECORD_HEADER_MAGIC, > sizeof(hdr.jrh_magic)); > > bioq = &sc->sc_active.jj_queue; > - pbp = sc->sc_flush_queue; > + GJQ_LAST(sc->sc_flush_queue, pbp); > > fbp = g_alloc_bio(); > fbp->bio_parent = NULL; > > with macro GJQ_LAST defined in g_journal.h: > > #define GJQ_LAST(head, bp) do { \ > struct bio *_bp; \ > \ > if ((head) == NULL) { \ > (bp) = (head); \ > break; \ > } \ > for (_bp = (head); _bp->bio_next != NULL; _bp = _bp->bio_next);\ > (bp) = (_bp); \ > } while (0) > > Some more annotations about g_journal.c: > > - The patch given in bug 198500 is necessary to run gjournal with > correct and adequate cache size. > - The cache size for gjournal can be set by two tunables: cache.limit > and cache.divisor. I do not know the best practice if there are two > variables for setting the same resource. At the moment cache.limit is > ignored at boot time, because it will be overwritten in g_journal_init. > - In g_journal_flush() there is a writeonly variable "size". > - If one process writes synchron a block and onother process reads the > same block just after the write starts, then it is possible that the > reader gets the new block before the writer has finished his write call. > This happens, when the write goes to the delayed_queue for some time > from where the read gets the data. But the write must wait until the bio > goes to the current queue, where g_io_deliver() is called. If this is > not intended, then the delayed queue should not be used for reads. I recomment you to contact pjd@freebsd.org directly about both the gjournal patch and WRT further observations you have. From owner-freebsd-fs@freebsd.org Sat Jul 29 16:25:56 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DE89DC6A66 for ; Sat, 29 Jul 2017 16:25:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 7137B708A7 for ; Sat, 29 Jul 2017 16:25:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6TGPujU004950 for ; Sat, 29 Jul 2017 16:25:56 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221077] Boot from ZFS fails following freebsd-update Date: Sat, 29 Jul 2017 16:25: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.3-RELEASE X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: netchild@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 16:25:56 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221077 Alexander Leidinger changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |netchild@FreeBSD.org --- Comment #2 from Alexander Leidinger --- Try to load zfsloader.old instead of zfsloader from the boo0 prompt (when y= ou see the first spinning ventilator at boot press space, there you see the pa= th which is used to load zfsloader, replace it by attaching ".old"). Pleae report back if this works, it gives a hint where the problem may be. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Sat Jul 29 18:35:04 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7F4CDC88CA for ; Sat, 29 Jul 2017 18:35:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 B564A738DC for ; Sat, 29 Jul 2017 18:35:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6TIZ4XM079485 for ; Sat, 29 Jul 2017 18:35:04 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221077] Boot from ZFS fails following freebsd-update Date: Sat, 29 Jul 2017 18:35: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.3-RELEASE X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: bacon4000@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 18:35:04 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221077 --- Comment #3 from Jason Bacon --- Unfortunately, no such file. I looked around my other systems, including some that haven't been updated = in a while, and the zfsloader files are all the same: SHA256 (/boot/zfsloader) =3D 442ca49cd5594c149a7b4e9683bc623de6e94c3e43ebbe6ba33d8c2f994ef160 Thanks anyway... --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Sat Jul 29 18:50:13 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F291ADC8BDD for ; Sat, 29 Jul 2017 18:50:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 E102F73CF1 for ; Sat, 29 Jul 2017 18:50:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6TIoDQ5009298 for ; Sat, 29 Jul 2017 18:50:13 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-fs@FreeBSD.org Subject: [Bug 221077] Boot from ZFS fails following freebsd-update Date: Sat, 29 Jul 2017 18:50:14 +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.3-RELEASE X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: bacon4000@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-fs@FreeBSD.org 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.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 18:50:14 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221077 --- Comment #4 from Jason Bacon --- BTW, I forgot to mention that this is 10.3-RELEASE. Also, not that it matters, but I misreported the PERC model. It's actually= an R700. Lastly, not sure what this means, but the version looks weird. Instead of 10.3-RELEASE-p20 like my other systems, I get this (after booting from a USB drive and importing zroot): root@login:~ # chroot /zroot/ root@login.peregrine / # uname -a FreeBSD login.peregrine.hpc.uwm.edu 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 02:10:02 UTC 2016=20=20=20=20 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 root@login.peregrine / # uname -v FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 02:10:02 UTC 2016=20=20=20=20 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-fs@freebsd.org Sat Jul 29 18:59:50 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3369DC8E0E for ; Sat, 29 Jul 2017 18:59:50 +0000 (UTC) (envelope-from kayasaman@gmail.com) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8AAED741F5 for ; Sat, 29 Jul 2017 18:59:50 +0000 (UTC) (envelope-from kayasaman@gmail.com) Received: by mail-wm0-x232.google.com with SMTP id t201so19371128wmt.0 for ; Sat, 29 Jul 2017 11:59:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=ERxXHxxX8PJZwLt1VA1McU9Kj0qJ8AN1QuTVh8WsXfw=; b=VGcXj14Tfz008PdFSKnTBU+n09+aRtDH80yl39cOhjJcY/HTzcFJvQM3xBUKerZrgW P3l3V+chhKrymI8EW4aaJcNbQhyuPO5eJIF3LuCaO5LyKUPWe3wyqHmCfsfh+5NmEM3v S2TT6GPqJi30dgSKD/ufaABB+JYmriTEGIpdGdDxvTdMVffWl4MlrsfeqvNwurguv5U8 gK55gxrGOpN1R+tL5R06omTQ5JlOFwBlydDKQ/viJ0AB/iB6wBbEsfr3sKK93huSUSFE SFLrKMQR6NZAubugVyeYW2gzNtbPKOhDLCtHumRB2HyfvJqyA5FBs8d14kHBAh0kh/bH Z8iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=ERxXHxxX8PJZwLt1VA1McU9Kj0qJ8AN1QuTVh8WsXfw=; b=XEFFbN9R4d9onFc1LX8NBcLR975ahWhIZvFyJlUMb19Bd4SmX+I+m8gixCB1rPwHox FHU4iXqeUh1xr6J8mYGGyZEA3yShNWhzTgyt5Agi1et56VtRzuOqNu+4HEUGw+7z7hGb cbrJHgyz3oEReGj8jjhyHvVgEvWYnnni0nFTsLEF4+4AxIWsxEmz+7JZKNujXitV9lSZ W0Y/ONjAJUdZ7z9j8dUmTPog54JmfSYzazDIgznq4XfUWFWYbiYhLS6l7fmDBAKB72bL Wqba/XAzyxXpc7CSXzBcxTf4uIsZI8DYBfbhs8aHf6PkhqutB37+bFRLCNTretQEHDde +zOA== X-Gm-Message-State: AIVw113rI8LkFIUIgAVu76w2VSI3XerJQBiZeaOsaNs5iu2iMC6BGemR cyDNXqCgNKcLYNp1H1U= X-Received: by 10.28.73.193 with SMTP id w184mr7495870wma.178.1501354788558; Sat, 29 Jul 2017 11:59:48 -0700 (PDT) Received: from x220.optiplex-networks.com (optiplexnetworks.plus.com. [212.159.80.17]) by smtp.gmail.com with ESMTPSA id c13sm11843028wrc.7.2017.07.29.11.59.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Jul 2017 11:59:47 -0700 (PDT) To: freebsd-fs@FreeBSD.org From: Kaya Saman Subject: ZFS and ISCSI question Message-ID: Date: Sat, 29 Jul 2017 19:59:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 18:59:51 -0000 Hi, I'm trying to find out how ZFS and ISCSI work together. So far I have followed the guide in the handbook: https://www.freebsd.org/doc/handbook/network-iscsi.html Based on the guide what I have done is created 3 demo files using dd: disk1, disk2, disk3 then created a zpool around them: zpool create iscsi-tst /data/disk1 /data/disk2 /data/disk3 and finally a ZVOL: zfs create -V iscsi-tst/tank From the guide a basic (for testing only) ctl.conf: portal-group pg0 { discovery-auth-group no-authentication listen 0.0.0.0 listen [::] } target iqn.2012-06.com.example:target0 { auth-group no-authentication portal-group pg0 lun 0 { path iscsi-tst/tank size 500M } } and then on the Initiator machine: iscsictl -A -p -t iqn.2012-06.com.example:target0 I can confirm a connection: # iscsictl -L Target name Target portal State iqn.2012-06.com.example:target0 Connected: da24 But if we look at dmesg output it is saying the size cannot be queried? da24 at iscsi4 bus 0 scbus9 target 0 lun 0 da24: Fixed Direct Access SPC-4 SCSI device da24: Serial Number MYSERIAL 0 da24: 150.000MB/s transfers da24: Command Queueing enabled da24: Attempt to query device size failed: NOT READY, Logical unit not ready, manual I am wondering what I have done wrong and additionally is it possible to get the Initiator to see the zpool/ZVOL so that I can create a zfs dataset on it? Thanks. Kaya From owner-freebsd-fs@freebsd.org Sat Jul 29 21:09:48 2017 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 679A0DCB262 for ; Sat, 29 Jul 2017 21:09:48 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [70.36.157.235]) (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 4D8267C58A for ; Sat, 29 Jul 2017 21:09:47 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (localhost [IPv6:::1]) by chez.mckusick.com (8.15.2/8.15.2) with ESMTP id v6TLDUaw093863; Sat, 29 Jul 2017 14:13:30 -0700 (PDT) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201707292113.v6TLDUaw093863@chez.mckusick.com> From: Kirk McKusick To: Konstantin Belousov Subject: Re: ufs snapshot is sometimes corrupt on gjourneled partition cc: Andreas Longwitz , freebsd-fs@freebsd.org In-reply-to: <20170729152444.GB1700@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <93861.1501362810.1@chez.mckusick.com> Date: Sat, 29 Jul 2017 14:13:30 -0700 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jul 2017 21:09:48 -0000 > Date: Sat, 29 Jul 2017 18:24:44 +0300 > From: Konstantin Belousov > To: Andreas Longwitz > Cc: Kirk McKusick , freebsd-fs@freebsd.org > Subject: Re: ufs snapshot is sometimes corrupt on gjourneled partition > > On Sat, Jul 29, 2017 at 12:38:13PM +0200, Andreas Longwitz wrote: > >> hello Kirk and Kostik, >> >> you are both right. >> >>> So, I really do not understand how you can end up with a buffer with >>> invalid contents if B_CACHE is set because we are open coding bread() >>> here and that is the criterion it uses to read. If however, you do >>> the read when B_CACHE is not set, then as noted you will get the >>> wrong results and crash. But see also my comments below when B_CACHE >>> is not set. >> >> The patch >> >> -- ffs_snapshot.c.1st 2016-06-08 17:25:21.000000000 +0200 >> +++ ffs_snapshot.c 2017-07-29 10:51:34.682067000 +0200 >> @@ -1403,7 +1403,7 @@ >> */ >> bp = getblk(cancelvp, lbn, fs->fs_bsize, 0, 0, 0); >> bp->b_blkno = fsbtodb(fs, blkno); >> - if ((bp->b_flags & (B_DONE | B_DELWRI)) == 0 && >> + if ((bp->b_flags & (B_DONE | B_DELWRI | B_CACHE)) == 0 && >> (error = readblock(cancelvp, bp, fragstoblks(fs, blkno)))) { >> brelse(bp); >> return (error); >> >> is correct, the buffer has always the correct data, when B_CACHE is set >> after calling getblk(). So the calls to readblock() are unnecessary in >> this case. In my first test the crash of following rm probably was >> induced by other readblock() calls, but I did not know at that time. > > Ok. In fact it is not clear to me why B_DONE or B_DELWRI is tested at all > there. We only need to know that the buffer content is valid. Historically bdwrite() did not set B_CACHE because it was not safe/true for NFS. Under the senario where B_CACHE is not set and a new disk block is allocated by the filesystem, it calls getblk() to get a buffer in which to place it. The usual case is that the block is not already be in the cache so the B_CACHE flag is not set. The filesystem fills in the new contents then bdwrite()s the buffer which results in B_DELWRI being set. So now, if you find that buffer when doing a getblk(), its only valid contents are what are in the buffer so reading the block at which it will be written would destroy the only valid copy. Hence the check for B_DELWRI as well as B_CACHE. The check for B_DONE is just to save an unneeded read as it can be set after a B_DELWRI has been written (so B_DELWRI is replaced with B_DONE). Since it is still a newly created block, it has not yet been read so B_CACHE is not set, but the contents are valid and can be used. All that said, NFS got overhauled by alc@ in -r46349 in May 1999 so that it became safe to set B_CACHE in bdwrite(). Since that change the above checks for B_DONE | B_DELWRI are no longer needed. Since this is a bug / performance enhancement in snapshot code, and has now been reviewed and its correctness verified, I propose to check in this change: Index: sys/ufs/ffs/ffs_snapshot.c =================================================================== --- sys/ufs/ffs/ffs_snapshot.c (revision 321679) +++ sys/ufs/ffs/ffs_snapshot.c (working copy) @@ -1394,7 +1394,7 @@ */ bp = getblk(cancelvp, lbn, fs->fs_bsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, blkno); - if ((bp->b_flags & (B_DONE | B_DELWRI)) == 0 && + if ((bp->b_flags & B_CACHE) == 0 && (error = readblock(cancelvp, bp, fragstoblks(fs, blkno)))) { brelse(bp); return (error); Let me know if you have any concerns about it. >>> So the way to fix the bug is to read gjournal code and understand why >>> does it sometime returns wrong data. >> >> Yes, gjournal is broken in handling his flush_queue. If we have 10 bio's >> in the flush_queue: >> 1 2 3 4 5 6 7 8 9 10 >> and another 10 bio's goes to the flush queue before all the first 10 >> bio's was removed from the flush queue we should have something like >> 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20, >> but because of the bug we end up with >> 6 11 12 13 14 15 16 17 18 19 20 7 8 9 10. >> So the sequence of the bio's is damaged in the flush queue (and >> therefore in the journal an disk !). This error can be triggered by >> ffs_snapshot(), when a block is read with readblock() and gjournal finds >> this block in the broken flush queue before he goes to the correct >> active queue. >> >> The following patch solved this problem for me: >> >> --- g_journal.c.orig 2017-05-08 14:16:42.000000000 +0200 >> +++ g_journal.c 2017-07-28 21:25:58.891881000 +0200 >> @@ -1261,7 +1261,7 @@ >> strlcpy(hdr.jrh_magic, GJ_RECORD_HEADER_MAGIC, >> sizeof(hdr.jrh_magic)); >> >> bioq = &sc->sc_active.jj_queue; >> - pbp = sc->sc_flush_queue; >> + GJQ_LAST(sc->sc_flush_queue, pbp); >> >> fbp = g_alloc_bio(); >> fbp->bio_parent = NULL; >> >> with macro GJQ_LAST defined in g_journal.h: >> >> #define GJQ_LAST(head, bp) do { \ >> struct bio *_bp; \ >> \ >> if ((head) == NULL) { \ >> (bp) = (head); \ >> break; \ >> } \ >> for (_bp = (head); _bp->bio_next != NULL; _bp = _bp->bio_next);\ >> (bp) = (_bp); \ >> } while (0) >> >> Some more annotations about g_journal.c: >> >> - The patch given in bug 198500 is necessary to run gjournal with >> correct and adequate cache size. >> - The cache size for gjournal can be set by two tunables: cache.limit >> and cache.divisor. I do not know the best practice if there are two >> variables for setting the same resource. At the moment cache.limit is >> ignored at boot time, because it will be overwritten in g_journal_init. >> - In g_journal_flush() there is a writeonly variable "size". >> - If one process writes synchron a block and onother process reads the >> same block just after the write starts, then it is possible that the >> reader gets the new block before the writer has finished his write call. >> This happens, when the write goes to the delayed_queue for some time >> from where the read gets the data. But the write must wait until the bio >> goes to the current queue, where g_io_deliver() is called. If this is >> not intended, then the delayed queue should not be used for reads. > > I recomment you to contact pjd@freebsd.org directly about both the gjournal > patch and WRT further observations you have. I concur that Pawel should review your proposed change. I'll send your note along to him requesting a review. Assuming he is in agreement he will likely check it in himself. Or if he prefers, I'll check it in. Hopefully he will have some thoughts on your other comments. Thank-you Andreas for taking the time to drill down and figure out why this was failing. Kirk McKusick