From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A57B7C433E0 for ; Wed, 10 Mar 2021 09:10:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4CC8D64FF1 for ; Wed, 10 Mar 2021 09:10:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232323AbhCJJKV (ORCPT ); Wed, 10 Mar 2021 04:10:21 -0500 Received: from mx2.suse.de ([195.135.220.15]:35566 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232646AbhCJJKK (ORCPT ); Wed, 10 Mar 2021 04:10:10 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 85CD8AE27; Wed, 10 Mar 2021 09:10:09 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id E3C60DA7D7; Wed, 10 Mar 2021 10:08:10 +0100 (CET) Date: Wed, 10 Mar 2021 10:08:10 +0100 From: David Sterba To: Qu Wenruo Cc: dsterba@suse.cz, Qu Wenruo , linux-btrfs@vger.kernel.org Subject: Re: [PATCH] btrfs-progs: output sectorsize related warning message into stdout Message-ID: <20210310090810.GL7604@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Qu Wenruo , Qu Wenruo , linux-btrfs@vger.kernel.org References: <20210309073909.74043-1-wqu@suse.com> <20210309133325.GH7604@twin.jikos.cz> <49c16359-3ce0-c021-608d-b05c9d4c1fda@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <49c16359-3ce0-c021-608d-b05c9d4c1fda@gmx.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Wed, Mar 10, 2021 at 08:18:16AM +0800, Qu Wenruo wrote: > > > On 2021/3/9 下午9:33, David Sterba wrote: > > On Tue, Mar 09, 2021 at 03:39:09PM +0800, Qu Wenruo wrote: > >> Since commit 90020a760584 ("btrfs-progs: mkfs: refactor how we handle > >> sectorsize override") we have extra warning message if the sectorsize of > >> mkfs doesn't match page size. > >> > >> But this warning is show as stderr, which makes a lot of fstests cases > >> failure due to golden output mismatch. > > > > Well, no. Using message helpers in progs is what we want to do > > everywhere, working around fstests output matching design is fixing the > > problem in the wrong place. That this is fragile has been is known and > > I want to keep the liberty to adjust output in progs as users need, not > > as fstests require. > > OK, then I guess the best way to fix the problem is to add sysfs > interface to export supported rw/ro sectorsize. > > It shouldn't be that complex and would be small enough for next merge > window. The subpage support should be advertised somewhere in sysfs so the range of supported sector sizes sounds like a good idea.