From owner-freebsd-current@freebsd.org Fri Jun 21 22:37:01 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 F36E315C19A8 for ; Fri, 21 Jun 2019 22:37:00 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B163784217; Fri, 21 Jun 2019 22:36:59 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from pps.filterd (m0108162.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5LMYUea022783; Fri, 21 Jun 2019 15:36:52 -0700 Received: from nam05-by2-obe.outbound.protection.outlook.com (mail-by2nam05lp2059.outbound.protection.outlook.com [104.47.50.59]) by mx0b-00273201.pphosted.com with ESMTP id 2t96eyr4q4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 21 Jun 2019 15:36:52 -0700 Received: from SN4PR0501CA0064.namprd05.prod.outlook.com (2603:10b6:803:41::41) by BYAPR05MB5798.namprd05.prod.outlook.com (2603:10b6:a03:c6::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.12; Fri, 21 Jun 2019 22:36:40 +0000 Received: from DM3NAM05FT056.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::204) by SN4PR0501CA0064.outlook.office365.com (2603:10b6:803:41::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2008.6 via Frontend Transport; Fri, 21 Jun 2019 22:36:40 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.12 as permitted sender) Received: from P-EXFEND-EQX-01.jnpr.net (66.129.239.12) by DM3NAM05FT056.mail.protection.outlook.com (10.152.98.170) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2032.6 via Frontend Transport; Fri, 21 Jun 2019 22:36:39 +0000 Received: from P-EXBEND-EQX-03.jnpr.net (10.104.8.56) by P-EXFEND-EQX-01.jnpr.net (10.104.8.54) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 21 Jun 2019 15:36:39 -0700 Received: from P-EXBEND-EQX-01.jnpr.net (10.104.8.52) by P-EXBEND-EQX-03.jnpr.net (10.104.8.56) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 21 Jun 2019 15:36:38 -0700 Received: from p-mailhub01.juniper.net (10.104.20.6) by P-EXBEND-EQX-01.jnpr.net (10.104.8.52) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Fri, 21 Jun 2019 15:36:38 -0700 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.50.162]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id x5LMacIr029946; Fri, 21 Jun 2019 15:36:38 -0700 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id 6E753278D6; Fri, 21 Jun 2019 15:36:38 -0700 (PDT) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id 6CB7D278D5; Fri, 21 Jun 2019 15:36:38 -0700 (PDT) To: Alan Somers CC: Scott Long , Don Lewis , "Chuck Silvers" , Kirk McKusick , "FreeBSD CURRENT" , Subject: Re: Reducing UFS corruption from unclean shutdowns? In-Reply-To: References: Comments: In-reply-to: Alan Somers message dated "Fri, 21 Jun 2019 15:54:03 -0600." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 26.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15989.1561156598.1@kaos.jnpr.net> Date: Fri, 21 Jun 2019 15:36:38 -0700 Message-ID: <18782.1561156598@kaos.jnpr.net> X-EXCLAIMER-MD-CONFIG: e3cb0ff2-54e7-4646-8a04-0dae4ac7b136 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:66.129.239.12; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(376002)(136003)(39860400002)(396003)(346002)(2980300002)(189003)(199004)(53416004)(7696005)(76176011)(68736007)(5660300002)(117636001)(316002)(70586007)(2906002)(8936002)(46406003)(50226002)(23726003)(69596002)(50466002)(4744005)(16586007)(107886003)(97876018)(53936002)(9686003)(305945005)(478600001)(55016002)(81156014)(54906003)(77096007)(229853002)(7126003)(186003)(8676002)(11346002)(336012)(26005)(6266002)(47776003)(356004)(97756001)(446003)(6246003)(476003)(126002)(486006)(4326008)(86362001)(81166006)(70206006)(76506005)(6916009); DIR:OUT; SFP:1102; SCL:1; SRVR:BYAPR05MB5798; H:P-EXFEND-EQX-01.jnpr.net; FPR:; SPF:SoftFail; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ad0dd928-17dd-4b0c-d4a1-08d6f698edb2 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(4710121)(4711109)(1401327)(2017052603328); SRVR:BYAPR05MB5798; X-MS-TrafficTypeDiagnostic: BYAPR05MB5798: X-LD-Processed: bea78b3c-4cdb-4130-854a-1d193232e5f4,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 0075CB064E X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: qbBWK37C1oAju2Mb2g1Hztm5CNuDfsKU4LXSu1lboSPlAkoUyNP25XtURc3uBNssZkghUpCImdEn5CmtVnYgllTIRmYuppblop/fHTkdoce27HIT2dh7mbzlJkOgH7aMZngmyBkArhGCtmldALtek6WPnlaTTNbyvGMXNiCBvGneFG9EEY2B5H3ORPCiVJiT38oFaExU94E1M4mxh/Fja/AMGc2420Wz25QY7RfxRu2sqcLnsSGf/eUfmJPb2pTm7da0NjsmsK1+zTIItzKc+hRoSx3Xiz2drnEon3TnirK6wcyHvBzUTYYfsiqDSCooqfLsuMEpWtCFNrA19RcDX7MpdbQNzkx/njHDTBQBW1c1Y0RuTkyWq1v928AyVlqwYqx7s7P3/36kqHO4mcwpiKYBwY1kC4fix1XRfVaPNB4= X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2019 22:36:39.8948 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ad0dd928-17dd-4b0c-d4a1-08d6f698edb2 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.12]; Helo=[P-EXFEND-EQX-01.jnpr.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR05MB5798 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-21_15:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=636 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906210172 X-Rspamd-Queue-Id: B163784217 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.04 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.977,0]; R_DKIM_ALLOW(-0.20)[juniper.net:s=PPS1017]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:67.231.152.164]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_TWELVE(0.00)[12]; NEURAL_SPAM_SHORT(0.14)[0.144,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: mxb-00273201.gslb.pphosted.com]; DKIM_TRACE(0.00)[juniper.net:+]; RCPT_COUNT_SEVEN(0.00)[7]; DMARC_POLICY_ALLOW(-0.50)[juniper.net,reject]; IP_SCORE(-0.10)[ip: (-0.24), ipnet: 67.231.152.0/24(-0.09), asn: 22843(-0.13), country: US(-0.06)]; RCVD_IN_DNSWL_LOW(-0.10)[164.152.231.67.list.dnswl.org : 127.0.3.1]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:22843, ipnet:67.231.152.0/24, country:US]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[] 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:37:01 -0000 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 sync(8) does little more than tell the kernel to start flushing some pages - which the kernel would do anyway in about 30s So, it does not really ensure a clean filesystem if you are about to reboot - and certainly not if a panic is imminent. FWIW to minimize fs problems after doing package install on junos I run fsync on files and dirs I know are likely to have been updated and which need to be flushed to disk before reboot. Unlike sync(8), fsync(1) will not return until the I/O is done. You may still lose data after a sudden power cycle or panic, but less likely to be something critical.