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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0239EC83F14 for ; Mon, 28 Aug 2023 02:01:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229379AbjH1CBW (ORCPT ); Sun, 27 Aug 2023 22:01:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229520AbjH1CBK (ORCPT ); Sun, 27 Aug 2023 22:01:10 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DEE3125 for ; Sun, 27 Aug 2023 19:01:04 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-56b0c5a140dso1729446a12.0 for ; Sun, 27 Aug 2023 19:01:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fromorbit-com.20221208.gappssmtp.com; s=20221208; t=1693188063; x=1693792863; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=0OOpuUC9WrHx63XO3krpOCYmcaUxFgd3zsU66GiE1hw=; b=b5odctLENGHiUXUUOYeCbtNMq5u5z9PG7r9KsSdSJT7eeN5m7IU4YGCKsk1zHZyLXg Y0asyU+ab7/lI94c8aeOj7s8ivO6LLnQSubfLICsXQlL/ROeNnjTiwFU0R5cBdKkXlfV c6F0spa4eLgt5JMAS2AdLqMwlW6D6IFRV3aym5QEw3SNWZ/QMyZ2Kp9f6QhYZsVhTUKB MWWoWKWZ3D5pq/PACsrZQFNhWtkMzm8Sddp7xjksFp+i2HITffC0KMQIECKPTYNvn4Ec fohDUpzKt0phRnnm12roN3tR+3L8lV7fe02UkYUr5kH7saI0hiNXkyErfqkT4hfukdoi A4zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693188063; x=1693792863; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0OOpuUC9WrHx63XO3krpOCYmcaUxFgd3zsU66GiE1hw=; b=Q1YFtG5aQKPLCZ+vnyhumTttXtMjyGJdsgQAyH57jWZgq8dmrX5bt+Zs4bNpq2peu8 OZnagBOW02u/k5hUn40SmEeLBv+04alThYpmbDsrxeJtS1l1VyGIXP8xCgxUEj8Cj5Lg 0s+t37c6ileDhGzIQ+A/NcpaVSq/Jzafyx+jwuSTEayV3O+ZKrCoZD8DOzIhh7D3ynwl 6G1CwDZcQLQAr8xgx2+w1N0lF8j55iB+lB64abz7Ij1S5eqIp3ZdI92QIiGFTvDzA86X vW01Y3OqZz8XCoea/LxJ18JIPQMkQwOMz8LbpSIYcBvcQb4a25WbMr96o1CYSHRqtJ/3 ZqcQ== X-Gm-Message-State: AOJu0YwK8xKhlLURcDmzTeFfIGSkT6xv9QcRRCepe2FBYCDo39tdofmq 3ImrRsXIZJnSUIyD7ZbVKZ1uAw== X-Google-Smtp-Source: AGHT+IEQEHw7cE3n9TM3j1prdwB4ECxh3iyjWx1gyrgkJRwQQLFZVC0IFBpmMuhOfxkpj1752eqbwQ== X-Received: by 2002:a17:902:8f97:b0:1b8:400a:48f2 with SMTP id z23-20020a1709028f9700b001b8400a48f2mr25586214plo.62.1693188063462; Sun, 27 Aug 2023 19:01:03 -0700 (PDT) Received: from dread.disaster.area (pa49-195-66-88.pa.nsw.optusnet.com.au. [49.195.66.88]) by smtp.gmail.com with ESMTPSA id jk17-20020a170903331100b001b890b3bbb1sm5964667plb.211.2023.08.27.19.01.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Aug 2023 19:01:02 -0700 (PDT) Received: from dave by dread.disaster.area with local (Exim 4.96) (envelope-from ) id 1qaRYp-007Rne-0S; Mon, 28 Aug 2023 12:00:59 +1000 Date: Mon, 28 Aug 2023 12:00:59 +1000 From: Dave Chinner To: "Darrick J. Wong" Cc: Zorro Lang , xfs , fstests Subject: Re: [RFC PATCH] fstests: test fix for an agbno overflow in __xfs_getfsmap_datadev Message-ID: References: <20230823010046.GD11286@frogsfrogsfrogs> <20230823010239.GE11263@frogsfrogsfrogs> <20230827130644.nhdi6ihobn5qne3a@zlang-mailbox> <20230827155646.GA28202@frogsfrogsfrogs> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230827155646.GA28202@frogsfrogsfrogs> Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org On Sun, Aug 27, 2023 at 08:56:46AM -0700, Darrick J. Wong wrote: > On Sun, Aug 27, 2023 at 09:06:44PM +0800, Zorro Lang wrote: > > On Tue, Aug 22, 2023 at 06:02:39PM -0700, Darrick J. Wong wrote: > > > From: Darrick J. Wong > > > > > > Dave Chinner reported that xfs/273 fails if the AG size happens to be an > > > exact power of two. I traced this to an agbno integer overflow when the > > > current GETFSMAP call is a continuation of a previous GETFSMAP call, and > > > the last record returned was non-shareable space at the end of an AG. > > > > > > This is the regression test for that bug. > > > > > > Signed-off-by: Darrick J. Wong ..... > > > +echo "desired asize=$desired_agsize" >> $seqres.full > > > +_scratch_mkfs -d "agsize=${desired_agsize}b" | _filter_mkfs 2> $tmp.mkfs >> $seqres.full > > > +source $tmp.mkfs > > > + > > > +test "$desired_agsize" -eq "$agsize" || _notrun "wanted agsize=$desired_agsize, got $agsize" > > > + > > > +_scratch_mount > > > +$XFS_IO_PROG -c 'fsmap -n 1024 -v' $SCRATCH_MNT >> $tmp.big > > > +$XFS_IO_PROG -c 'fsmap -n 1 -v' $SCRATCH_MNT >> $tmp.small > > > > This line reports: > > > > xfs_io: xfsctl(XFS_IOC_GETFSMAP) iflags=0x0 ["/mnt/xfstests/scratch"]: Invalid argument > > > > when the test case fails. Is that normal? > > Yes. The attached bugfix should make that go away. The kernel bug fix fixes the same problem with xfs/273; I haven't tested this specific new regression test. -Dave. -- Dave Chinner david@fromorbit.com