From patchwork Thu May 16 22:12:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 13666538 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 996FD15821F for ; Thu, 16 May 2024 22:12:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715897561; cv=none; b=XB6sxWCuAemg9y8eaNzAtSp7ABRx+JyIKl8hrXkVEtoVUz8pOGKnIFE6/mmvt6Ni/+I+8ZJD8qHM+1UTMvl1acWOil1v0hhSYAtVNzcl3thJRyFDwA0wOZx+ITPSdNIngYOQ8eLL3LjJOgS/qjcyWfNKOThaqNJQ5yUnUJ0eXYk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715897561; c=relaxed/simple; bh=8HJmJZtdlzf7X+YxXzFnW1hUlQgBxT3u2vASJ0+zkSY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rxmyiHVWhehureL7dZZN9tqBAXe5cQOSuxhIFoq22feYDhNc+rWoBED7qBfZ+dY5WS3YEsFk/wJo0183Jeb3R1scamSV7JR0LTLIB86vhddd+WxzC4gSHCX5dq8PdJKZX9vT/3OqcqJhAVpIZT+FHp5yMTYlk+yR/iPIIsjYYzs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=lFTiVMBS; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=lFTiVMBS; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="lFTiVMBS"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="lFTiVMBS" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9175035053; Thu, 16 May 2024 22:12:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1715897557; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x8GaMlikI0vNO3EFo21lee30YWTAneskF0BNlhLvoco=; b=lFTiVMBSEYStFMVjJcMgvpspXwpdKwWoZFrlGS4WlXzmwCJnS9acPKl8MoFcsAsP9gDKb5 tfgFlz3bDquR+sz1fKRCTb2sglDTKlfhUrhz/FDn733nuOTKrglmweU5J8NkdhSStbiHey XoL5W6I7HHhCWkQLDOr6NneBSNaJ4bA= Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1715897557; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x8GaMlikI0vNO3EFo21lee30YWTAneskF0BNlhLvoco=; b=lFTiVMBSEYStFMVjJcMgvpspXwpdKwWoZFrlGS4WlXzmwCJnS9acPKl8MoFcsAsP9gDKb5 tfgFlz3bDquR+sz1fKRCTb2sglDTKlfhUrhz/FDn733nuOTKrglmweU5J8NkdhSStbiHey XoL5W6I7HHhCWkQLDOr6NneBSNaJ4bA= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 8ADCD137C3; Thu, 16 May 2024 22:12:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id jj7lIdWERmZuZAAAD6G6ig (envelope-from ); Thu, 16 May 2024 22:12:37 +0000 From: David Sterba To: fstests@vger.kernel.org Cc: josef@toxicpanda.com, David Sterba Subject: [PATCH 1/6] common: udev settle before _scratch_pool_mkfs Date: Fri, 17 May 2024 00:12:33 +0200 Message-ID: X-Mailer: git-send-email 2.45.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-6.80 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -6.80 X-Spam-Flag: NO From: Josef Bacik There are some btrfs tests that do _scratch_pool_mkfs in a loop. Sometimes this fails with EBUSY. Tracing revealed that udevd will sometimes write to /sys/block/device/uevent to make sure an event triggers to rules get written. However these events will not get sent to user space until after an O_EXCL open as been closed. The general flow is something like mkfs.btrfs /dev/sda /dev/sdb /dev/sdc /dev/sdd mount /dev/sda /mnt/test umount /mnt/test in a loop. The problem is udevd will add uevents for the devices and they won't get delivered until after the umount. If we're doing the above sequence in a loop the next mkfs.btrfs will fail because udev is touching the devices to consume the KOBJ_CHANGE event. Fix this by doing a udev settle before _scratch_pool_mkfs. Signed-off-by: Josef Bacik Signed-off-by: David Sterba --- common/rc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/rc b/common/rc index 0fe56382a6a497..5d38571ffe87eb 100644 --- a/common/rc +++ b/common/rc @@ -903,6 +903,12 @@ _scratch_pool_mkfs() { case $FSTYP in btrfs) + # For multi-disk file systems udev can queue up events on the device + # when we mkfs the device, and thus tie up the device after we've + # unmounted. Tests that _scratch_pool_mkfs() in a loop can sometimes + # trip over udev trying to do the updates after the umount, so make sure + # we settle before we try mkfs'ing so we don't get an EBUSY + $UDEV_SETTLE_PROG >/dev/null 2>&1 $MKFS_BTRFS_PROG $MKFS_OPTIONS $* $SCRATCH_DEV_POOL > /dev/null ;; *) From patchwork Thu May 16 22:12:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 13666539 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECE2A3FE4 for ; Thu, 16 May 2024 22:12:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715897563; cv=none; b=QEhigyIyvKXi0L4PgbRm5ywVla4nIWqrA6cj3Gw1of8SLkCKmYNdCkOZEtp/rE5V2IN3QAJ9jt9eV4TQQgSIOXEseyIVCmyFnX83P8qip3w0xeMwOoxDF5I64odzjwuPcqhSP2I90UsdlidXuPTnIztXiUYySYYtYeIV3zyIxoE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715897563; c=relaxed/simple; bh=2okkSo+AnHGzm4akVerqBO2fdPjuf4BEbb0fzzd4ByQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iJn90B/PwB1ppHY4aV/XYDao8tNALVN3+vqlzhe7YfQb7orWi08Jgr1pkr2D+imySfbOkC5acSdoZe435WvLb5g4dLGScJCS0bcl3H36NM0qYXeOEevyauHWLRy+x62CQZdEwLNMvgOiZtdQ8jxI1PuJqG5lqUSqHp8C75w84zs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=QQpPcN9f; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=DiqG2XB1; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="QQpPcN9f"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="DiqG2XB1" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id EDEDE5CBEF; Thu, 16 May 2024 22:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1715897560; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H02rhoC6GtCz8wJ5CfKES2hDmcLzRteKM6NlIyWPFX0=; b=QQpPcN9fSeLGW/zA54ssmVPbEIEbSnpkXtvp05dSfzxNo+MvkiBpC9LCnYXzo7dZvaZ7tO xbSVWaXz4K+JZPHPENjcz2ig4ODKZ8sIydSVpeyQnQjc8PZeJMImwgvkoUKzq5GqrtAM9C k3BWmmDq4yUlGzKP4li2EY4tZWvyfEY= Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1715897559; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=H02rhoC6GtCz8wJ5CfKES2hDmcLzRteKM6NlIyWPFX0=; b=DiqG2XB1mjQGFmNRJoAGAWjlS+tFgd3pQs3NMtUOupUcZA1K53R4ok/9jO37A+VbV6biu0 DuvDXstCn/Jr6j5hDuNg3fiHzxtv5WD470HHBiJsPqyv5OIeRtyHW2ZJkN5FpoYY1EdPZz KrpM69wb/ykGufN0OV08vGWEF7RNNI4= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E7C59137C3; Thu, 16 May 2024 22:12:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id DSGUONeERmYkZQAAD6G6ig (envelope-from ); Thu, 16 May 2024 22:12:39 +0000 From: David Sterba To: fstests@vger.kernel.org Cc: josef@toxicpanda.com, David Sterba Subject: [PATCH 2/6] generic/352: require no compression Date: Fri, 17 May 2024 00:12:39 +0200 Message-ID: X-Mailer: git-send-email 2.45.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-6.77 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-2.97)[99.89%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -6.77 X-Spam-Flag: NO From: Josef Bacik Our CI has been failing on this test for compression since 0fc226e7 ("fstests: generic/352 should accomodate other pwrite behaviors"). This is because we changed the size of the initial write down to 4k, and we write a repeatable pattern. With compression on btrfs this results in an inline extent, and when you reflink an inline extent this just turns it into full on copies instead of a reflink. As this isn't a bug with compression, it's just not well aligned with how compression interacts with the allocation of space, simply exclude this test from running when you have compression enabled. Signed-off-by: Josef Bacik Signed-off-by: David Sterba Reviewed-by: Anand Jain --- tests/generic/352 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/generic/352 b/tests/generic/352 index acc17dac38d061..3a18f07601de96 100755 --- a/tests/generic/352 +++ b/tests/generic/352 @@ -25,6 +25,10 @@ _supported_fs generic _require_scratch_reflink _require_xfs_io_command "fiemap" +# The size is too small, this will result in an inline extent and then reflink +# will simply be a copy on btrfs, so exclude compression. + _require_no_compress + _scratch_mkfs > /dev/null 2>&1 _scratch_mount From patchwork Thu May 16 22:12:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 13666540 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04B923FE4 for ; Thu, 16 May 2024 22:12:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715897569; cv=none; b=gOJAeUBBki2efgBTQ7X3/5EH4HKNRp0p4834272z9xqipuZsz2dS+kfOZ++ZNfDjHJnhEvcEIMRdssCAVFYQ54lYAeBGTCC9AB0aGbcv4rcT5aXsLTiPz6T6w9OPe2JsyrAjKn/D75HjZMKtvqwqzTJVcq4oks6O0hTYjty/dQE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715897569; c=relaxed/simple; bh=4vSt2u+c6Cfnyg3pxIWneUlqocZbcANNQk67zio07WU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aeXdr/YxYUQ7Rm6Rg/7jdd77BL/Tl/KvUMbkUHhEEH4MtFLxznq/HzeC7/clKrWomZbESkAmqgavgeHA5BzNtHM0GOZXpy6HkTmwUeytSE1KeoNW/+pAug2F/NoPztkb44LwxWw6A7YVi3FK9pSsKgHCxWOrChXuDyKAM2tyVMs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 557665CBEF; Thu, 16 May 2024 22:12:46 +0000 (UTC) Authentication-Results: smtp-out2.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 4F452137C3; Thu, 16 May 2024 22:12:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id ZppYE96ERmZNZwAAD6G6ig (envelope-from ); Thu, 16 May 2024 22:12:46 +0000 From: David Sterba To: fstests@vger.kernel.org Cc: josef@toxicpanda.com, David Sterba Subject: [PATCH 3/6] generic/027: require no compression Date: Fri, 17 May 2024 00:12:42 +0200 Message-ID: <9d61a72884ab0c7233ebfcc172407b465e372735.1715896529.git.dsterba@suse.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Level: X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Flag: NO X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 557665CBEF From: Josef Bacik This test creates a small file and then a giant file and then tries to create a bunch of small files in a loop to exercise ENOPSC. The problem is that with compression the giant file isn't actually giant, so it can make this test take forever. Simply disable it for compression. Signed-off-by: Josef Bacik Signed-off-by: David Sterba Reviewed-by: Anand Jain --- tests/generic/027 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/generic/027 b/tests/generic/027 index 47f1981d4e51b7..eace1b358cdf34 100755 --- a/tests/generic/027 +++ b/tests/generic/027 @@ -33,6 +33,10 @@ _supported_fs generic _require_scratch +# This takes forever with compression because we don't actually fill up the +# disk, simply disable it if we have compression enabled. +_require_no_compress + echo "Silence is golden" _scratch_mkfs_sized $((256 * 1024 * 1024)) >>$seqres.full 2>&1 From patchwork Thu May 16 22:12:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 13666541 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6137D3FE4 for ; Thu, 16 May 2024 22:12:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715897572; cv=none; b=iMr97WRuHMQrRq4g7YsHQzEum6ueCF5jy+Yned7rwyv/7g5r0iSNIuSPVfyLLo+lsbQMbt9T2HjRJA6fQxbiLjlpbIYdznxjzyJZu/F05xJdHrHmiCqCvHaSwLqT2RdtBfIxYjzV2i/i/iWHaWxTDqDKkM/FqlYPBrvUdTHLhBA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715897572; c=relaxed/simple; bh=Ae0ZoTRVdIvMjS4oMpnl/QFpwKih8AA+Nro/wpllR1w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jbgOT+Fvc1db4cvBsaft5nmeyqVZtvviyjfJ5ttOOqjyNxAHqqaG4FkwgKazOHzUMfnjBA9ZSPQM7MJWRGScoFLTcgZWibe627Hs43Fkn1umMkgNQ/YvozYlm/+U/UBVyAwD6BAU/CJYtk4GtcSC2nh/lhNKrKZmCRwdceKhqkE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=BQGFy3+R; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=BQGFy3+R; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="BQGFy3+R"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="BQGFy3+R" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id AB70C35053; Thu, 16 May 2024 22:12:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1715897568; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1Cfr8qAtafzBxCcrlf+Nd8rvoFxCDMHxcdO9en3nkdQ=; b=BQGFy3+ReBYWcDACmx3Eq3Z4TuD1dGhVL8ZsxkD6Cy5exL/32PHJhJ7nbODCTrXdXRgPcJ dyxI/CIBoEIEqoy0tv8xqNI8DghLHhd0AitQBEla4ZZDb+94UUrC8gw3D75inDuapCz7yj s+KK59ghEE6udWeezmWw5GE0WVPClnU= Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1715897568; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1Cfr8qAtafzBxCcrlf+Nd8rvoFxCDMHxcdO9en3nkdQ=; b=BQGFy3+ReBYWcDACmx3Eq3Z4TuD1dGhVL8ZsxkD6Cy5exL/32PHJhJ7nbODCTrXdXRgPcJ dyxI/CIBoEIEqoy0tv8xqNI8DghLHhd0AitQBEla4ZZDb+94UUrC8gw3D75inDuapCz7yj s+KK59ghEE6udWeezmWw5GE0WVPClnU= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id A52AE137C3; Thu, 16 May 2024 22:12:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 9wxRKOCERmYdaAAAD6G6ig (envelope-from ); Thu, 16 May 2024 22:12:48 +0000 From: David Sterba To: fstests@vger.kernel.org Cc: josef@toxicpanda.com, David Sterba Subject: [PATCH 4/6] generic/269: require no compression Date: Fri, 17 May 2024 00:12:48 +0200 Message-ID: X-Mailer: git-send-email 2.45.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-6.80 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Spam-Score: -6.80 X-Spam-Flag: NO From: Josef Bacik This is meant to test ENOSPC, but we're dd'ing /dev/zero, which won't fill up anything with compression on. Additionally we're killing dd and then immediately trying to unmount. With compression we could have references to the inode being held by the async compression workers, so sometimes this will fail with EBUSY on the unmount. Make it easier on us and just skip this if we have compression enabled. Signed-off-by: Josef Bacik Signed-off-by: David Sterba --- tests/generic/269 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/generic/269 b/tests/generic/269 index b7cdecd94f219a..6ee0cb04581632 100755 --- a/tests/generic/269 +++ b/tests/generic/269 @@ -11,6 +11,9 @@ _begin_fstest auto rw prealloc ioctl enospc stress # Import common functions. . ./common/filter + +_require_no_compress + # Disable all sync operations to get higher load FSSTRESS_AVOID="$FSSTRESS_AVOID -ffsync=0 -fsync=0 -ffdatasync=0" _workout() From patchwork Thu May 16 22:12:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 13666542 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A67F83FE4 for ; Thu, 16 May 2024 22:12:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715897574; cv=none; b=qqYQEZ7/ILC44D4OfJKZEcwQApz5cc7/klIb0iqV18lubdzsoGwbkGPxYD+D5HWKQA3sCNumCisq95cp4E358fFj/Q8zjlvflsveTaqvqDQmUyPGtGkSES+9JzbDhvp+CNjDMpfmTjvlzNM1P5Or3+ii4qPPi9c2ZuOpp2Hfy3I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715897574; c=relaxed/simple; bh=kr79FLlesgvWXYM0MJ+3wQ3nnLs90oOT+xL3h/x/LhY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Vqk27mprNQlNrEeoHHOWQf54xXzR7VOhpsxaFyW1kZ4RKQdeDaoQ9iK/eT8plmd19M41Z036EXTpFTIc9zpoJ+P0r5DqgzOMFIWAuJNw1lW82wwmE6pbLb8XWBJOj21aWZ0XVHsMQ98Upc1n7RJ5QCUxmxJ63Ylksw4X5lJkhvk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 13E1B35055; Thu, 16 May 2024 22:12:51 +0000 (UTC) Authentication-Results: smtp-out1.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 0DE2E137C3; Thu, 16 May 2024 22:12:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id wzNiA+OERmbTaAAAD6G6ig (envelope-from ); Thu, 16 May 2024 22:12:51 +0000 From: David Sterba To: fstests@vger.kernel.org Cc: josef@toxicpanda.com, David Sterba Subject: [PATCH 5/6] btrfs/011: mkfs the scratch dev before exiting Date: Fri, 17 May 2024 00:12:50 +0200 Message-ID: <19804c4e3c319678768d5d24a15b000e05dd0af2.1715896529.git.dsterba@suse.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spam-Level: X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Flag: NO X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 13E1B35055 X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action From: Josef Bacik When testing encryption I started getting failures because the scratch dev didn't have a valid fs at the end of the test. This is because for encryption we have to disable raid5/6, which changes how the test is run. Normally with raid6 we end up cancelling the device replace, and thus $SCRATCH_DEV has a valid file system on it. However with raid5/6 disabled we end with a normal DUP profile, and the replace doesn't end up cancelled, so $SCRATCH_DEV is wiped. Then when the test finishes we do the normal fsck and see that there's no fs on the $SCRATCH_DEV and error. This test does all the fsck'ing during the workout period, so we don't need the final scratch check, simply re-make the $SCRATCH_DEV at the end as it could have been replaced during the test. Signed-off-by: Josef Bacik Signed-off-by: David Sterba --- tests/btrfs/011 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/btrfs/011 b/tests/btrfs/011 index bf63a72b11c42f..d99624fb941cce 100755 --- a/tests/btrfs/011 +++ b/tests/btrfs/011 @@ -258,6 +258,11 @@ for t in "-m single -d single:1 no 64" \ fi done +# If we exclude certain RAID profiles we can end up where the scratch dev +# doesn't have a valid fs on it because it was replaced during workout, so mkfs +# the scratch device so we don't get _check_btrfs_filesystem errors +_scratch_mkfs > /dev/null 2>&1 + echo "*** done" status=0 exit From patchwork Thu May 16 22:12:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 13666543 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 474023FE4 for ; Thu, 16 May 2024 22:12:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715897577; cv=none; b=sAOY5avOKHFhWSRQVlAfLE4KEouC8mtlgKSoXZbtwQ7AwVjHjV4E4AzpgD6oIYSmUyewZbCkKyIP118zZMyxBjpZRfXF7Hal5NgH0YWZa/zyR6YW4cBl3vJjQQsEZuBPYIyfpRRJFXbWjJuwjXJPxvMim8hm28FR4VoujhV6ljk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715897577; c=relaxed/simple; bh=9oS8IhyRucgLBfFYzPKZxgCAn293ONv+rvggqNDDPKE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IZNb/SxG1VDRTpGf1eWdVyqhXaZK8PrhJTLyRlwU44LdxAI/hlXTEpCG3P4/uslh7RV6Lz4ndKKTUeuPqVedpIiV10pQZOo7bTp1pZ1yskKm6thctfCyPJYalVRZywoTQv7poZiS4E2YUuK0MqLIzZxgxB47qnjCbJPrieLGvNM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=YL7AQyDV; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=YL7AQyDV; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="YL7AQyDV"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="YL7AQyDV" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6E8975CBEF; Thu, 16 May 2024 22:12:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1715897573; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7hJ+8JBAFLHvq9FnRn13vP0lFnauEJjYwMMrJ7yhszg=; b=YL7AQyDVR+4WPaW2oQb6TAmrQgRDP90GkQIPjHE6yvlDtw3lKLbfllGvSbNoEBqXZDYOXu 0eEzHQbg23b9VDiseoIPkm2KI0iwuTLTqvC56sr2DPueGUewoE/ZC3gQkOh4BKg8JsnCx7 mzYq8JuFeNNBMfGDMTvt8pHCZ1GoiZA= Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1715897573; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7hJ+8JBAFLHvq9FnRn13vP0lFnauEJjYwMMrJ7yhszg=; b=YL7AQyDVR+4WPaW2oQb6TAmrQgRDP90GkQIPjHE6yvlDtw3lKLbfllGvSbNoEBqXZDYOXu 0eEzHQbg23b9VDiseoIPkm2KI0iwuTLTqvC56sr2DPueGUewoE/ZC3gQkOh4BKg8JsnCx7 mzYq8JuFeNNBMfGDMTvt8pHCZ1GoiZA= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 68B28137C3; Thu, 16 May 2024 22:12:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 6OaMGeWERmaNaQAAD6G6ig (envelope-from ); Thu, 16 May 2024 22:12:53 +0000 From: David Sterba To: fstests@vger.kernel.org Cc: josef@toxicpanda.com, David Sterba Subject: [PATCH 6/6] btrfs/{140,141}: verify read-repair test data by md5sum Date: Fri, 17 May 2024 00:12:53 +0200 Message-ID: <77ac47e540951bd6a292d53455d8d21682fb390c.1715896529.git.dsterba@suse.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: fstests@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Flag: NO X-Spam-Score: -6.80 X-Spam-Level: X-Spamd-Result: default: False [-6.80 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] From: Josef Bacik For validating that read repair works properly we corrupt one mirror and then read back the physical location after we do a direct or buffered read on the mounted file system and then unmount the file system. The golden output expects all a's, however with encryption this will obviously not be the case. However I still broke read repair, so these tests are quite valuable. Fix them to dump the on disk values to a temporary file and then md5sum the files, and then validate the md5sum to make sure the read repair worked properly. Signed-off-by: Josef Bacik Signed-off-by: David Sterba Reviewed-by: Anand Jain --- tests/btrfs/140 | 15 ++++++++++++++- tests/btrfs/140.out | 34 ---------------------------------- tests/btrfs/141 | 16 +++++++++++++++- tests/btrfs/141.out | 34 ---------------------------------- 4 files changed, 29 insertions(+), 70 deletions(-) diff --git a/tests/btrfs/140 b/tests/btrfs/140 index f1bee5d3841234..eb0fbc13b2513b 100755 --- a/tests/btrfs/140 +++ b/tests/btrfs/140 @@ -74,6 +74,13 @@ devpath=$(get_device_path ${devid}) _scratch_unmount +# Grab the contents of the the area so we can compare to the final part +orig=$(mktemp) +$XFS_IO_PROG -d -c "pread -v -b 512 $physical 512" $devpath |\ + _filter_xfs_io_offset > $orig +origcsum=$(_md5_checksum $orig) +rm -f $orig + echo " corrupt stripe #1, devid $devid devpath $devpath physical $physical" \ >> $seqres.full $XFS_IO_PROG -d -c "pwrite -S 0xbb -b 64K $physical 64K" $devpath > /dev/null @@ -88,10 +95,16 @@ _btrfs_direct_read_on_mirror 1 2 "$SCRATCH_MNT/foobar" 0 128K _scratch_unmount # check if the repair works +final=$(mktemp) $XFS_IO_PROG -d -c "pread -v -b 512 $physical 512" $devpath |\ - _filter_xfs_io_offset + _filter_xfs_io_offset > $final +finalcsum=$(_md5_checksum $final) +rm -f $final _scratch_dev_pool_put + +[ "$origcsum" == "$finalcsum" ] || _fail "repair failed, csums don't match" + # success, all done status=0 exit diff --git a/tests/btrfs/140.out b/tests/btrfs/140.out index fb5aa1087235ac..58dfb24ec1a565 100644 --- a/tests/btrfs/140.out +++ b/tests/btrfs/140.out @@ -1,37 +1,3 @@ QA output created by 140 wrote 131072/131072 bytes XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -read 512/512 bytes -XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) diff --git a/tests/btrfs/141 b/tests/btrfs/141 index c78ee33e484cad..d46301a5220ba3 100755 --- a/tests/btrfs/141 +++ b/tests/btrfs/141 @@ -72,6 +72,14 @@ devid=$(get_devid ${logical_in_btrfs} 1) devpath=$(get_device_path ${devid}) _scratch_unmount + +# Grab the contents of the area so we can compare to the final part +orig=$(mktemp) +$XFS_IO_PROG -c "pread -v -b 512 $physical 512" $devpath |\ + _filter_xfs_io_offset > $orig +origcsum=$(_md5_checksum $orig) +rm -f $orig + echo " corrupt stripe #1, devid $devid devpath $devpath physical $physical" \ >> $seqres.full $XFS_IO_PROG -d -c "pwrite -S 0xbb -b 64K $physical 64K" $devpath > /dev/null @@ -86,10 +94,16 @@ _btrfs_buffered_read_on_mirror 1 2 "$SCRATCH_MNT/foobar" 0 128K _scratch_unmount # check if the repair works +final=$(mktemp) $XFS_IO_PROG -c "pread -v -b 512 $physical 512" $devpath |\ - _filter_xfs_io_offset + _filter_xfs_io_offset > $final +finalcsum=$(_md5_checksum $final) +rm -f $final _scratch_dev_pool_put + +[ "$origcsum" == "$finalcsum" ] || _fail "repair failed, csums don't match" + # success, all done status=0 exit diff --git a/tests/btrfs/141.out b/tests/btrfs/141.out index 4b8be189144e36..d8c6940f109b1d 100644 --- a/tests/btrfs/141.out +++ b/tests/btrfs/141.out @@ -1,37 +1,3 @@ QA output created by 141 wrote 131072/131072 bytes XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -XXXXXXXX: aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa ................ -read 512/512 bytes -XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)