From nobody Tue Feb 15 06:44:54 2022 X-Original-To: stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E4F0619CEF3F; Tue, 15 Feb 2022 06:44:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JyWmT67FTz3Gk4; Tue, 15 Feb 2022 06:44:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644907497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zmup9jBddcN0rBtb6sTLRRHl+xvE98LgBhI/gb1B4l4=; b=MKj9JMFUP0KcaZyZf4Jt7NDJFXJsZeuPeRwIK9alBNxBKnA0CEblf9yRY5bcjrQ/uS99H1 P9LeJp07yVDH3k7nsEco6rZCP1KtlN8pczPKkPTnuFOe2+GxyrgdGSCzyP1K0ui+iHeOJv 1pC4Jdal7Fww26hFwUOaey6Fw9T0j60jkCN0KEsUx/iP6quiSJFiNrEgXYSbT7GGGTmEcQ nGBspPc+kSh3oLLZB+RgfDd4FPoPecjCaP/L9mtsWOJleL1sLhGC2FguQOkeQ9cSI8ngdI 4UXEpi7rpzBin47WI3nSWtvMdg+hcmHgVTpHIYHHM647R7uAog9SI74qvdFqpA== Received: from [192.168.0.88] (unknown [195.64.148.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 3DB3A28B64; Tue, 15 Feb 2022 06:44:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Message-ID: <5eac56d0-51fb-5e23-0d2a-3c6b6bf163d0@FreeBSD.org> Date: Tue, 15 Feb 2022 08:44:54 +0200 List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.6.0 From: Andriy Gapon Subject: Re: fsck -C -p: NO WRITE ACCESS Content-Language: en-US To: freebsd-stable List , freebsd-fs , "freebsd-geom@FreeBSD.org" References: <346d021f-b737-f41a-883f-e821389c4431@FreeBSD.org> <20220214231758.GD97875@funkthat.com> In-Reply-To: <20220214231758.GD97875@funkthat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644907497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Zmup9jBddcN0rBtb6sTLRRHl+xvE98LgBhI/gb1B4l4=; b=WnB/NxEsZS6j0bAgUr/1RbpKTjyJ8oav+TnLBYSqcIaPuMNEvBGaiVypv19FC/2vJBu/k3 k0bd+TTvs2HHAi9HOUTt/OVQgYssN7hRp5CTE+7kIAdEsu+hEM1T/PiEvqVvveLkFo0QDO pxAeDfVUCnvmZVSOKaj5nj7d7LAST+v70/nf83FgHp7+xCyRlIL3Id6ccFMr09d0ZBumY+ OdggCR6/fyRhKAm+50fpvBZZbYkKsPgwU4w7OQNgdfWCqv3nf8tlPxJY5Vh2d4nOz3i/ul yHI849I/lelLJHk40BCeLEbScGDycWqeOJY1tTyIRXHFTpx66TRxawwlgalr/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644907497; a=rsa-sha256; cv=none; b=ndpOy1p8JKeKiKxE4niK0RpDHxAv7lpiaYZ/JwAtz/k214lrlY44AWNzRVwClzj8pu/fde YlJLs4T+pCjxpeWw58x+4Ho11glQpj2EoHfdN/3Q2vU4hJyjHxB6A6pdQfpscCu6vt0Sxp PK2oKwOqmh7vanL9csWO/zq+pVBZuta8+aaPIuDHG+s4bk7lJDQEaZajs6ieJseubSFMti K4OiKNaUzFap3c0MaKLqczm368tR+Qj7WerEuMtMXDnVXIPbbLmLfbnOLVJc4MRKWIl0nW oE1a8KTbODX4r6364Z9tHH2sjiZ6IKVJVBn+mCtyua3ffrP9I15Huqh4tA2uKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 15/02/2022 01:17, John-Mark Gurney wrote: > Andriy Gapon wrote this message on Mon, Feb 07, 2022 at 14:15 +0200: >> I've got a problem where fsck behaves differently from my expectations. >> The problem happens with a filesystem on a GELI encrypted ZVOL. >> The volume has 4K block size and that's the GELI's sector size as well. >> FreeBSD is stable/13 from mid January. > > Did you put a ffs filesystem that was formatted on a 512 byte sector disk > onto this geli device? As far as I can recall, no. I created it with newsfs on the geli device. > fsck calculates the sector size via (/sbin/fsck_ffs/setup.c): > dev_bsize = sblock.fs_fsize / fsbtodb(&sblock, 1); > > and fsbtodb: > ../../sys/ufs/ffs/fs.h:#define fsbtodb(fs, b) ((daddr_t)(b) << (fs)->fs_fsbtodb) > >> fsize 4096 shift 12 mask 0xfffff000 >> frag 8 shift 3 fsbtodb 3 > > fsize / (1 << 3) == 4096 / 8 == 512. > > so, likely updating fsbtodb to be 0 instead of 3 would fix this. I'm not > sure how to do this though, as tunefs and fsdb don't seem to have options > to do this, and likely you'll want to update all the superblocks w/ this > new value. > -- Andriy Gapon