From owner-freebsd-current@freebsd.org Fri Jun 21 22:44:34 2019 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A87D515C1FD8 for ; Fri, 21 Jun 2019 22:44:34 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5D3984965; Fri, 21 Jun 2019 22:44:33 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 77CF42224B; Fri, 21 Jun 2019 18:44:33 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 21 Jun 2019 18:44:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsco.org; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm3; bh=1 Ak2YSiqlKehpKYC0QxjQOKKXc9ako4GWKe0G6OR0DU=; b=0aAPwTpzH2IbMToHG gfMxS3H0Y7VcXV2yGef94tIPeQOPXNnzAaM8b3zn2l0NVve+gSD6eyeRGCa7r0Bp K7wEUsLRPM5u8b+6KRKgoedOnS1jPeAvXPbBYCEToJ0o6mgQb8C/KZ0EqzJi/249 Cz1E2Q2ZraNkaLPS2TxADlGkDdaDrm0dmcmF8T/8S3XYkmiFtAfwWISvpv9bKM+n imTi5nQTTDCRSyFFHifU5CFiNHVxOJO8whEORH0br2wYsvUeY9k+3o+lp25Hk42l mdUUvSKAAXhj/yLrdWomeosl2oHNI/MdwsSbHgSEWIIDUHwoYSgeMtmhTYyyXcKZ PYZjw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=1Ak2YSiqlKehpKYC0QxjQOKKXc9ako4GWKe0G6OR0 DU=; b=ig/AFOfE7ypHonFG7MZ7gERrFEf+3xfT5Ar4pfWMxGMl3I6cUr/gf4y65 e2CpJw0E1IsN0/7pkgxF+BARjSgld5na+slYfg/x7rL9lYVTjNR6YMp3nw5OwoKy ZnfqHklClFXwVdIBzsM7gzfcEfiAaPu1+nMP7r5wkKqoaH+COhwwA1H2qnD4tClJ MBOYv9kLfdpeIff+UbkQ9Vw8FrJ2oLDFFHLU3c6ms2QfLf87z5lvMfLFbzcFgRBO iTfyf8dg6gnkZr6foPHhGtSC3UJMVvT5k0uN2GLg7sOWm38fRCbmkB3NZI9JMVbh 7z6KOoxeysttEWG13K00k1KgI67zA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrtdejgdduvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpefutghothht ucfnohhnghcuoehstghothhtlhesshgrmhhstghordhorhhgqeenucfkphepudelvddrhe ehrdehgedrheelnecurfgrrhgrmhepmhgrihhlfhhrohhmpehstghothhtlhesshgrmhhs tghordhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [10.178.24.13] (unknown [192.55.54.59]) by mail.messagingengine.com (Postfix) with ESMTPA id 3908D8005C; Fri, 21 Jun 2019 18:44:32 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Reducing UFS corruption from unclean shutdowns? From: Scott Long In-Reply-To: Date: Fri, 21 Jun 2019 16:44:30 -0600 Cc: "Conrad E. Meyer" , Alan Somers , FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <17B3F210-5101-449F-AE06-326F890C3C01@samsco.org> References: To: Warner Losh X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: E5D3984965 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=samsco.org header.s=fm3 header.b=0aAPwTpz; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=ig/AFOfE; spf=pass (mx1.freebsd.org: domain of scottl@samsco.org designates 66.111.4.28 as permitted sender) smtp.mailfrom=scottl@samsco.org X-Spamd-Result: default: False [-5.63 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[samsco.org:s=fm3,messagingengine.com:s=fm3]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.28]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; SUBJECT_ENDS_QUESTION(1.00)[]; DMARC_NA(0.00)[samsco.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[samsco.org:+,messagingengine.com:+]; MX_GOOD(-0.01)[cached: in2-smtp.messagingengine.com]; NEURAL_HAM_SHORT(-0.99)[-0.991,0]; IP_SCORE(-3.53)[ip: (-9.79), ipnet: 66.111.4.0/24(-4.74), asn: 11403(-3.07), country: US(-0.06)]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[28.4.111.66.list.dnswl.org : 127.0.5.1] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jun 2019 22:44:34 -0000 > On Jun 21, 2019, at 4:37 PM, Warner Losh wrote: >=20 > On Fri, Jun 21, 2019, 3:33 PM Conrad Meyer wrote: >=20 >> On Fri, Jun 21, 2019 at 2:55 PM Alan Somers = wrote: >>> I would've thought that immediately following a sync(8), the >>> filesystem would be consistent. Why do I still see errors after a >>> panic in files that were written before I sync()ed? >>> -Alan >>=20 >> Hi Alan, >>=20 >> Contra the name, sync(2) (sync(8)) isn't synchronous. It invokes >> VFS_SYNC() with MNT_NOWAIT across all mountpoints. >>=20 >=20 > Yes. Sync(2) just starts the I/O, but it may be delayed if there is a = lot > of dirty buffers. The other issue is that new buffers may be = dirtied=E2=80=A6 >=20 Still, the point of SU and SU+J is that the filesystem should not be damaged and require active repair on reboot, whether or not a sync or fsync was done. There=E2=80=99s certainly issues with disk = lying about out of order writes, POSIX sematics of unlinked files, and the inherent design of UFS superblock updates, but the problems that Alan reported should still be looked at, they=E2=80=99re not expected = and they undermine the usefulness of SU+J. Scott