Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp555100rwr; Wed, 3 May 2023 02:46:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5pWDRYgl/fu7jgEPa17mc5pCZDiegeoMI54T9BYPD3A5yY7VEeOPUvq8kPrkmC5yDr4J5R X-Received: by 2002:a05:6a20:a10d:b0:ef:f44a:1a42 with SMTP id q13-20020a056a20a10d00b000eff44a1a42mr26331132pzk.25.1683107199128; Wed, 03 May 2023 02:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683107199; cv=none; d=google.com; s=arc-20160816; b=KxYeiLr8FjQZyNmhEJ7Tueyuvhq47YWS26iNZXiDjU6f5WXQF0aP6cNFSFogG0NfyL k9W+mdUKoxxVg2ewaec9IQvx11FKnSneDD1EYbvowjj/sjhbrEL3PWlA86uzwEvA3oMp EXhdHpDaFkXrU0cR/l8xhikLKE+aAQZsyX6mxFO27qL+4zCWCg91us57c0xDFMHmcd5w R7krjQgbPxxfVYK/F8nU4rV59XNEG8YoaT+BPh0apN1qnVkyBN5sD/WaxmifWj59YEl5 woxGoVMCwmdrMI3OYlz9Pm5PmyYCzfdE62PecgUVUjmOAggGtpJ2L49zIgBTsHZ+kMEM bWZQ== 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=Wuc1vTQ8wQRR6tjkgMtetfqYzZutfpJcCtXQCNyxPaE=; b=FeOyko8PmiZ6CWrkTl/G6jFTcasK03CcEoDRxzeNkelm0Hn3qIpzW291b2qgidynbd zMxZ0zM2INbI7IPfe1wLANxWVrlP96oQo+Ou+BRG2uIYG16TNc8UqukNPKICBYuIPhPz GWUPd1zjN4rpVVb56JN/uEGVWgjJFLVrfRrtNsrcOKNG7PWyp0sbmyPqWmw9A5e3M0Uz tuCBxlmDd3EQbhR9wMrn3QKSl1Wo+5YF5qSv0tDlRMc/4nLdJZa/4w9DChsnF6kegbxB AdEt2QW9GtNoW+i1fIISLw7k2wlmvHH2oAa8IxBotK9ZKTeqz3YHplKH/ix2GkYtpmCl 9z3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="onzzM/v1"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=BlObSjVx; 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 w185-20020a6382c2000000b0051b35caf3fesi28390386pgd.239.2023.05.03.02.46.26; Wed, 03 May 2023 02:46:39 -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="onzzM/v1"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=BlObSjVx; 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 S229901AbjECJmc (ORCPT + 99 others); Wed, 3 May 2023 05:42:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229802AbjECJma (ORCPT ); Wed, 3 May 2023 05:42:30 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDC7244B2; Wed, 3 May 2023 02:42:28 -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-out2.suse.de (Postfix) with ESMTPS id 61AC0201CB; Wed, 3 May 2023 09:42:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1683106947; 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=Wuc1vTQ8wQRR6tjkgMtetfqYzZutfpJcCtXQCNyxPaE=; b=onzzM/v1oyKFB4FXmhHjMFCMfyCMsRPoN8kNryQXhOdlgGhF+7N7l93bcEVNHsoDxefF9t 7lhSxjb+agVtwS0b+PBPmQNxbun2z2IzZu4y1LvLwHFf9qf8TW0n6sfpcUE+WtyTSMNG+G gs6QJhk4Grrkztl4tS0n8NiLwWIl1Q0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1683106947; 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=Wuc1vTQ8wQRR6tjkgMtetfqYzZutfpJcCtXQCNyxPaE=; b=BlObSjVxACe5A1daCOXZ1F33pExCCXIO/Pa5F8XFQ6vTAq64KzieqEx9wywLowDfSiLzW+ c8gKFw4Fjt5kW/Bg== 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 53B021331F; Wed, 3 May 2023 09:42:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id hEARFIMsUmSaHAAAMHmgww (envelope-from ); Wed, 03 May 2023 09:42:27 +0000 Date: Wed, 3 May 2023 11:42:26 +0200 From: Daniel Wagner To: Chaitanya Kulkarni Cc: "linux-nvme@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , Shin'ichiro Kawasaki , Hannes Reinecke Subject: Re: [PATCH blktests v3 04/12] common/xfs: Limit fio size job to fit into xfs fs Message-ID: References: <20230503080258.14525-1-dwagner@suse.de> <20230503080258.14525-5-dwagner@suse.de> <74e9c631-23cd-705c-7043-88f345598ad1@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <74e9c631-23cd-705c-7043-88f345598ad1@nvidia.com> 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 Wed, May 03, 2023 at 09:29:04AM +0000, Chaitanya Kulkarni wrote: > On 5/3/23 01:02, Daniel Wagner wrote: > > The usable capacity of the filesystem is less than the raw > > partition/device size due to the additional meta/log data. > > > > Ensure that the job size for fio is not exceeding the limits. > > > > Because we have hard coded the path where we mount the filesystem > > and don't want to expose this, we just update max size inside > > _xfs_run_fio_verify_io(). No need to leak this into the caller. > > > > Signed-off-by: Daniel Wagner > > --- > > common/xfs | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/common/xfs b/common/xfs > > index 413c2820ffaf..37ce85878df2 100644 > > --- a/common/xfs > > +++ b/common/xfs > > @@ -37,6 +37,9 @@ _xfs_run_fio_verify_io() { > > sz_mb="${avail_mb}" > > else > > sz_mb="$(convert_to_mb "${sz}")" > > + if [[ "${sz_mb}" -gt "${avail_mb}" ]]; then > > + sz_mb="${avail_mb}" > > + fi > > fi > > > > _run_fio_verify_io --size="${sz_mb}m" --directory="${mount_dir}/" > > > this is exactly how it should to start with, the only > is now we are silently reducing the fio job size maybe that is okay ? > > or we should error out here instead of being smart ? The problem I try to solve here is that on the caller side (nvme/035) we don't know yet the usable filesystem size. We only the size of the nvme_img_size. If we want to move this logic to the caller side we need split _xfs_run_fio_verify_io() into steps. The first step which creates the fileystem and the second one which runs fio. I don't know if this is worth doing it though.