Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp443611rwr; Wed, 3 May 2023 00:32:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ipqSfWe20HKYBbDvP6aPSx4y3Pd+CAVWr92bhtKSrgcnUQudnqLmfYIfyEjjkRaf0jQDo X-Received: by 2002:a17:902:ea0d:b0:1a9:8e56:9e24 with SMTP id s13-20020a170902ea0d00b001a98e569e24mr1617827plg.37.1683099158520; Wed, 03 May 2023 00:32:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683099158; cv=none; d=google.com; s=arc-20160816; b=cXtrMXpLm8Ngdx3ErLxt2oB649K6LL99B8KPKCAPwPtksPZc13WJoiF6qX/B8AAlPV CN27CVblRWUyOZyepaJklj5Wg9VO6hX1atVaEg73xtrpYduwwXKqd1BET1IU1pq9nNxp xThnJso7jvaAsXNUxHLyJd0N/nthtfbNFCIlSH+G0V1ICrr/FyFJIt/C4WzlNjPPrk6X UlPf8x5Pi8PjE37T/y6DGX6aOdDmIRMko1RhOAgy2MjL8oPvjDoE1reHnEsvcuiv9zwU 7Tf8UQ5fQyCRWRhXAGOl5jcJyNyt1/rNXG55G6t4WiNpo+qc84qfr4xZ0LpnWqpNVecR vN8g== 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=P7KFfZgfUOGCrZjJOU3dZ6YY+ZZX/Sqbf17UCyuAZPA=; b=aB7P6A5Aw29WIxYxIGO/GhRWz4ON820QunL7XOOF6dp0UoTOdoYfsNvR/8EKYHCrm6 7fuaopRLDtt6Q3b+z/hJh9IY0A7KsbTjn5kI7gz2pH8uDz9UF+V2Of1nMpsUfGH/AfrM GYuDutJ/eP5g4VETFl6V16qUU0a29HDo8Jv0DNzOXlRftr3fgGvEhhPkk5Q/scT8ArJG 7wd6lnl2GBsQzjFRY1D6cdHp9zvYVd4niOZK19Ih7gFK4VYpJ2dwXfFU9OgcusnnkqIs lXpv/OqsNqrTMWb8kaytT8nvotSOzQqujq7sffvQyv6kLMzi6TqejVl6HJh5oYjEvSZo bOJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=pDL9w7lL; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=oTuyHFxg; 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 x2-20020a1709027c0200b001a6565a16c4si31697819pll.493.2023.05.03.00.32.24; Wed, 03 May 2023 00:32:38 -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=pDL9w7lL; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=oTuyHFxg; 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 S229826AbjECHbi (ORCPT + 99 others); Wed, 3 May 2023 03:31:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229786AbjECHbB (ORCPT ); Wed, 3 May 2023 03:31:01 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8ABF4C0B; Wed, 3 May 2023 00:29:54 -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 7E760223CE; Wed, 3 May 2023 07:29:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1683098986; 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=P7KFfZgfUOGCrZjJOU3dZ6YY+ZZX/Sqbf17UCyuAZPA=; b=pDL9w7lL01OOZBiHOzlVkR+tqWpgSXZzyxQQU52B08+zukoCgwIlOZtFwYltYfCXR85jr1 8sl1afPq5eGEAfbCF8R+IjklsQwbtnEJ8JZTAFQ2XEcVRDFfdjzmJfDQMhHR+91u9bp6v7 MTmqZPrAQvgATsqPC48ucKbcubYeQ8U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1683098986; 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=P7KFfZgfUOGCrZjJOU3dZ6YY+ZZX/Sqbf17UCyuAZPA=; b=oTuyHFxgFqQu/dkYaNqPqKL156YfwEo6K2Ca0Phs3du/8EOmuY2i5jDFGizBU+yi5R9/rF BvcKKMlPYFpXqFBA== 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 706091331F; Wed, 3 May 2023 07:29:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8OZiG2oNUmQ8TwAAMHmgww (envelope-from ); Wed, 03 May 2023 07:29:46 +0000 Date: Wed, 3 May 2023 09:29:45 +0200 From: Daniel Wagner To: Shinichiro Kawasaki 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 04:04:50AM +0000, Shinichiro Kawasaki wrote: > On May 02, 2023 / 15:23, Daniel Wagner wrote: > > > --- a/tests/nvme/035 > > > > +++ b/tests/nvme/035 > > > > @@ -32,7 +32,7 @@ test_device() { > > > > port=$(_nvmet_passthru_target_setup "${subsys}") > > > > nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${subsys}") > > > > > > > > - _xfs_run_fio_verify_io "${nsdev}" "900m" > > > > + _xfs_run_fio_verify_io "${nsdev}" > > > > > > On the other hand, this change for nvme/035 does not look good. It runs the > > > test on TEST_DEV, which may take very long time without TIMEOUT config. > > > > I'll add the nvme_img_size argument here instead (nvme: Make test image size > > configurable) > > If TEST_DEV has the size same as nvme_img_size, xfs log data will consume some > part of the TEST_DEV, then _xfs_run_fio_verify_io with nvme_img_size will fail. > > I think the size argument of _xfs_run_fio_verify_io should be, > > min(size of TEST_DEV, nvm_img_size) - log data size of xfs > > But I'm not sure if we can do this calculation correctly. > > If the calculation is not possible, it would be the better to leave the hard > coded constants (1GB for TEST_DEV size and 900mb as fio I/O size) in this test > case, because nvme/035 is rather unique in the nvme group, which uses TEST_DEV. I've solved this by extending _xfs_run_fio_verify_io() to limit the max size of the io job: _xfs_run_fio_verify_io() { local mount_dir="/mnt/blktests" local bdev=$1 local sz=$2 local sz_mb local avail local avail_mb _xfs_mkfs_and_mount "${bdev}" "${mount_dir}" >> "${FULL}" 2>&1 avail="$(df --output=avail "${mount_dir}" | tail -1)" avail_mb="$((avail / 1024))" if [[ -z "${sz}" ]]; then 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}/" umount "${mount_dir}" >> "${FULL}" 2>&1 rm -fr "${mount_dir}" } Anyway, I'll send out the updated series shortly