Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1852847rwr; Fri, 21 Apr 2023 00:01:58 -0700 (PDT) X-Google-Smtp-Source: AKy350ZhL+2Omc0sWuhUU5smvJPsjA9+9u7aHddo9ugkPQ8n4orpWINw1yRDLohrf9q3LiShO3n7 X-Received: by 2002:a05:6a00:b51:b0:628:1b3:d499 with SMTP id p17-20020a056a000b5100b0062801b3d499mr5422902pfo.21.1682060517863; Fri, 21 Apr 2023 00:01:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682060517; cv=none; d=google.com; s=arc-20160816; b=TY+Q3TzKDbHcJm1Tkk13tIRtZOVLrKk44MdrXXYZG+KEup4flS+mU3gew+TMEFBIb6 FePt6w6num+uAShN+Lo9ehoSULg0YOK9nqEoT8qJ03vZWoHk8UmPlr4jqPcw4tutpK+6 eGiGnJBRgyN0hSkU2/s6aRIaI6qjXMXMmtorcNW0RH9bHXLQz07S81Wquvo0aDM+8z8d oYaWZwB82NSeHq7EZdRLFRrvlQnDyLuCsrPZtt2gryY5b8wHfM0Xu/q525BDsIB1TDmN p/8M9rVHRkync09J6NYZIp1ow5awCl03rdZ89JKRNB7eNZHk+jqj4+OQpfawL6adOEO5 cgaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=3hdtJCdV4hUpc6gHqFh0/2IfdOW4eHyRTAp7Qb3jl5k=; b=GThW/NBXL45OApGVCQ7aCLVn2LxYvcSKE7pzGcCuwLy+c++p0X4G26UDmk+H2m8Jfu k9O0ds1sc0RBvtkBOC2agj+BbE9ulGaR07Hd5+Sw61KGwLjlAnsHssDgaprIpAmIT/OI aom0drBRyfQxNyc/apCx0TsZemT395erWvRaMJqpR5nKQ+wvfUbMBokzFQahV2XDmxdj XbGOekvtKoeooRS5+S3YwrkREOPgxu6UBcgkElFxiOwTHYt/f6vJlbhhH8D8uw/DwclN jffWdet1re6SNQkne0LoDuEn9wBJQI0ckE0K34DZkFo9rb+dC6IDDyzhDMY8FMOVqNcL 8ESw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=EGV+wfOg; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=qsAcG2m6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v26-20020aa799da000000b0063b7c4435c1si3909063pfi.53.2023.04.21.00.01.41; Fri, 21 Apr 2023 00:01:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=EGV+wfOg; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=qsAcG2m6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229884AbjDUGyq (ORCPT + 99 others); Fri, 21 Apr 2023 02:54:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229565AbjDUGyp (ORCPT ); Fri, 21 Apr 2023 02:54:45 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F578EA; Thu, 20 Apr 2023 23:54:44 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 1AFA721A32; Fri, 21 Apr 2023 06:54:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1682060083; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3hdtJCdV4hUpc6gHqFh0/2IfdOW4eHyRTAp7Qb3jl5k=; b=EGV+wfOgweTtILWDEVpszyk0KAX2oVgcuANPxAQv/kPcHsakeWVMVfsRJzSYCHs/S4mef/ x4wEE8DemnwzYTyzRovVlyvmjvc9VJG/7CosIy1PEateonPzvsF9FjoNLFBm8QAPFfOjBv 5i6VFSqcQat2+v7K7aVLKtY0MrtIlnc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1682060083; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3hdtJCdV4hUpc6gHqFh0/2IfdOW4eHyRTAp7Qb3jl5k=; b=qsAcG2m6qDbLpy7hyoK8ri5Sv0mekZr93Xmyhn4tln3Oc3L1Zxkras32rPKr8tKS9bqkzX vxxXjvxj2fWkKtAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0BC7813456; Fri, 21 Apr 2023 06:54:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Uzy1AjMzQmSifAAAMHmgww (envelope-from ); Fri, 21 Apr 2023 06:54:43 +0000 Date: Fri, 21 Apr 2023 08:54:42 +0200 From: Daniel Wagner To: Hannes Reinecke Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Chaitanya Kulkarni , Shin'ichiro Kawasaki Subject: Re: [PATCH REPOST blktests v2 3/9] common-xfs: Make size argument optional for _xfs_run_fio_verify_io Message-ID: References: <20230421060505.10132-1-dwagner@suse.de> <20230421060505.10132-4-dwagner@suse.de> <1089a043-a40c-6b49-f0a0-38ca3bcd8f91@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1089a043-a40c-6b49-f0a0-38ca3bcd8f91@suse.de> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 21, 2023 at 08:27:35AM +0200, Hannes Reinecke wrote: > On 4/21/23 08:04, Daniel Wagner wrote: > > Make the size argument optional by reading the filesystem info. The > > caller doesn't have to guess (or calculate) how big the max IO size. > > The log data structure of XFS is reducing the capacity. > > > > Signed-off-by: Daniel Wagner > > --- > > common/xfs | 6 ++++++ > > tests/nvme/012 | 2 +- > > tests/nvme/013 | 2 +- > > tests/nvme/035 | 2 +- > > 4 files changed, 9 insertions(+), 3 deletions(-) > > > > diff --git a/common/xfs b/common/xfs > > index 2c5d96164ac1..ec35599e017b 100644 > > --- a/common/xfs > > +++ b/common/xfs > > @@ -27,6 +27,12 @@ _xfs_run_fio_verify_io() { > > _xfs_mkfs_and_mount "${bdev}" "${mount_dir}" >> "${FULL}" 2>&1 > > + if [[ -z "${sz}" ]]; then > > + local avail > > + avail="$(df --output=avail "${mount_dir}" | awk 'NR==2 {print $1}')" > > df --output=avail "${mount_dir}" | tail -1 Sure, don't think it matters. > > + sz="$(printf "%d" $((avail / 1024 - 1 )))m" > > sz=$((avail / 1024 - 1)) I tried this but the devision is likely to return a floating point which fio doesn't like. Is there a way to tell bash to do a pure integer devision?