From patchwork Wed Feb 12 12:39:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nirjhar Roy (IBM)" X-Patchwork-Id: 13971664 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 3420020D4EB; Wed, 12 Feb 2025 12:41:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739364082; cv=none; b=ns1sDsGvFEdrPPZzUQYFfDxxAT8LMBmRTbvb5izuATl7e9+4KRcOsBC49QLdjfCjjLC64FaSUI25EaMm8jdxid97KAmYkuAfUZKxGzT1sjYy/9a+lPs0vMAgsCTmqFh3N5i9QaIk3GEekN+pKXnygBiatmC9sJzTqfWwkW+14M4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739364082; c=relaxed/simple; bh=FVl4qpsBCkiQ7iHptGe/shLh+kBwZqvCeA+Pp1t994g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hgpbz+HEXkbvxd4TuwGm24DFu2OEJZGLvNo43RbpQcRKuE70g91/HaFKKeGkH3sm37MBdgyP8jQvT6vOUDUpyOtM8l6yQ6VPnnW4jN6Or6wGS+BY2lXpGJwl+5PBV1GEENANPKEZXm1MAvv6RsH2Fo4DwdtlrSsdB1D+mQLdr94= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dbprxR9Y; arc=none smtp.client-ip=209.85.214.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dbprxR9Y" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-21f3c119fe6so152794775ad.0; Wed, 12 Feb 2025 04:41:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739364080; x=1739968880; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=635i2LjtKF98CAjAFkvRnIfK/JaseJw09BT2iYnqAmY=; b=dbprxR9YWFbXBRhAlWo1JcKhOSHnvJPl3K+7jyZs7g8Yaeiv5zfPHN2+feAFbPKse3 TxWFVEz+bLWaMeMiHwo7fvCq3FkjOxW2fiHkvQYHobX3yRLelzq7NxwYbXTqMRZHdrUZ eaAbp8xH0vfUzffrsckNfiftulXtvuyYTohGVk+FiLUxd0yHtWlAVU3mopZH+UFTXtec EQigrNCMe8FALf2nymfINB+T4Zp7wyHzNTVxvISu0XBv3ryI6GsmatKTL1v881LGuIRT R3eB4OBW8FIVqJs3WzT+vD7MQ1GX0z0Y/TaGzNHFmEpsWbIEcSJ8k0NCmnq1L9mYVTyA /UQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739364080; x=1739968880; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=635i2LjtKF98CAjAFkvRnIfK/JaseJw09BT2iYnqAmY=; b=jv7UOlOxYKk0LEHckUL1xXTqlZM4x8QMzwYAZtJA4lNQ7UCuRqlA8PY84CuaKEdAes 25VtFFENXgG0GJTXLDMh0YQoXT1UyxFjznoD51l9jAqKEybKfvbUfU1WEfPf/4X+b/ta DjKXENM7SH1Hm8fKEjSF7z57eTHScZSADcwLaHbV65Mh4rxMKyi9nAi+XFIAz+RfDlv5 3eLQsA2abEEPl4HelScrypCEoXX+fvQLNQa8Py6bA3Nc7AsRlczJmq+hVNxO/2aurh/L LQ3O0wQ1ObEbwSydrwIa8CFMlzrE/D2IjD2Egr56NLOEntCd3I8WxeIe2fGpLK6HYlv4 LyBQ== X-Forwarded-Encrypted: i=1; AJvYcCXlN3eQshlCqLveH7MclU+M0E0aNWkxUZY7ZWJ/vxKJO28iU+oXmVBj5tx9QXmek2mnDQF9287sCmc=@vger.kernel.org X-Gm-Message-State: AOJu0YwHhx8JLB2CrwzBJhnw6/ELpJgR2pQD/leLO+Sz16ypRQczNaQC Bu8QzbTS+r4cvUfNm8go2WZpc6Vdj/VTwLwgkAEJ8eTRu70g3N07HCEmQw== X-Gm-Gg: ASbGncuG0cEbcssQgImG5OFuQWU5pCEZx2tzT1Pu2+QB0URMAiN12rsU0hPtNzBDydp Uc6UFdcl45x+KaISJuTazFCLVpX+Tp4Cw9yPFh0WdKTd0Fno5Hmnoruj3PwzozM6oxjn+9j5v/5 9YL3OGvbGaiY3tbgXO4+BphJzav+8VRmw1r9DCZ//tfQ5aGgC5jjPUGOYZ2zlp5zyL2TGnMbq6W +MEHaxJ7WnmT/67t5Hqy/Dd7+8mABwCkUHnMooE5Cv+SRdN7MVlMSf60vFYALd4wQGs2Fm20Q5Z YTCrLvAuv/Zy1WD/uY8= X-Google-Smtp-Source: AGHT+IHjSJ8Sejv0NZYIjBtjTsad9dx9PaLh31VKugeJwIXn8Jaq60Lm663gUnEQ5eFcbBCaMf5XFA== X-Received: by 2002:a05:6a00:a90:b0:732:2850:b184 with SMTP id d2e1a72fcca58-7322c3f6c9dmr4146333b3a.18.1739364079522; Wed, 12 Feb 2025 04:41:19 -0800 (PST) Received: from citest-1.. ([49.205.33.247]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ad53d0c0c19sm6468484a12.57.2025.02.12.04.41.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2025 04:41:19 -0800 (PST) From: "Nirjhar Roy (IBM)" To: fstests@vger.kernel.org Cc: linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, ritesh.list@gmail.com, ojaswin@linux.ibm.com, djwong@kernel.org, zlang@kernel.org, nirjhar.roy.lists@gmail.com Subject: [PATCH v1 1/3] xfs/539: Skip noattr2 remount option on v5 filesystems Date: Wed, 12 Feb 2025 12:39:56 +0000 Message-Id: <8704e5bd46d9f8dc37cec2781104704fa7213aa3.1739363803.git.nirjhar.roy.lists@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This test is to verify that repeated warnings are not printed for default options (attr2, noikeep) and warnings are printed for non default options (noattr2, ikeep). Remount with noattr2 fails on a v5 filesystem, so skip the mount option. Signed-off-by: Nirjhar Roy (IBM) --- tests/xfs/539 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/xfs/539 b/tests/xfs/539 index b9bb7cc1..58eead67 100755 --- a/tests/xfs/539 +++ b/tests/xfs/539 @@ -42,7 +42,8 @@ echo "Silence is golden." # Skip old kernels that did not print the warning yet log_tag -_scratch_mkfs > $seqres.full 2>&1 +is_v5=true +_scratch_mkfs |& grep -q "crc=0" && is_v5=false >> $seqres.full 2>&1 _scratch_mount -o attr2 _scratch_unmount check_dmesg_for_since_tag "XFS: attr2 mount option is deprecated" || \ @@ -60,8 +61,13 @@ for VAR in {attr2,noikeep}; do echo "Should not be able to find deprecation warning for $VAR" done for VAR in {noattr2,ikeep}; do + if [[ "$VAR" == "noattr2" ]] && $is_v5; then + echo "remount with noattr2 will fail in v5 filesystem. Skip" \ + >> $seqres.full + continue + fi log_tag - _scratch_remount $VAR + _scratch_remount $VAR >> $seqres.full 2>&1 check_dmesg_for_since_tag "XFS: $VAR mount option is deprecated" || \ echo "Could not find deprecation warning for $VAR" done From patchwork Wed Feb 12 12:39:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nirjhar Roy (IBM)" X-Patchwork-Id: 13971665 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (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 67080F4FA; Wed, 12 Feb 2025 12:41:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739364116; cv=none; b=cJBteaOUCweD8yNiHFM1ypzshhDzEfyAQqPrIbcsiE+cr1zKIJDzDmlRkEQWwHDKxDzy3Z42o46ZkXd/od36hnuoYYI9R14w98jzr/NQ2m3ZfAiXfIMF2xb8kG0iABAj3so7HBo6Nr6xf5oFl8jGyoDsED6+t+GJQ1o8szpI6ro= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739364116; c=relaxed/simple; bh=dmMyTcPvItDmcsV4jemz9/YRM8ubGmcT/laThGUZaGM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=l0muInQrvQ2I6/8S3ITldkgKXyPfuY2KRj/ZvSgtEGMdBRvv0d0jPqat8GGBgXj1jZi6SbS0tB3cOfIAWRRVNGZS1nrCRDLaqZVYItdfzy3hxs6g7loXqee2SxllBC5xDxLkAibh8nLPdgQR+66FhMQvk/6/5vRuzIGPJ0YV9L0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JKHMv0zw; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JKHMv0zw" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-21f5660c2fdso99024165ad.2; Wed, 12 Feb 2025 04:41:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739364114; x=1739968914; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dROWzQ4SbPmcVIZD9TSbMRy+qyrD3IEz7v6OotFBnJ4=; b=JKHMv0zwDHBR0/pYp0cA0GwASuw+d7HsfZ3TSq7jdw6x2yD1152h1hdXnxE5yiU8UY GEVBZYYCu0gyYDzDC2/59/MlhN/t6xBJqai9Aet6oWQVGFddCW4Zl32JN/Pae1kgIgDb BW70y/21eTcQhn4v34maqdhEuLBxeDcLzF3QiFsa5Ekx0xUebIusmj5ZUKzzd/EGT9HR YyC7ylGGoJ+Tt09RWvAUD3zLq/OQpgGLRkAuDbZTDLBI9D+jIoZ9kuY9ZwUsX4lplSE3 /IgMBmwBuwzAUf+VE2XYPGhTrwE58oOWrJ8kPe0hb0JKspKsbc3+GnTeGEUT5t3x6IUH xfiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739364114; x=1739968914; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dROWzQ4SbPmcVIZD9TSbMRy+qyrD3IEz7v6OotFBnJ4=; b=ej1WL8Qq6wnhNiAYBpSAKe4Z67nNaAJGQ1LeWq5fgvDCw6HPCJ+8exsslBAbcocy6u guGYW9bt3/mM6TJIXLwEYgAF1X5pxUHBBqXLpfsOyCu/jI0zXe4kQ+qRMXIjont0O9l4 CZWV9ByP58qgfXbZBzOxDbtx3BsbIG/1qayhgEi7rijDly5q5plnFmfbgCqM+lm6WNFQ suig0s+vOtMfaYignj0yvD1WdOI7AmSpA23UpwbyansRaVibyS3az0Cz4z+oqVtQI3tM o74jngI2XnEwqovNsDAcO19abbR1HDXTS95sgpe5iTVV1B6g5whABHbDGK8Q6atrsOg3 mDNA== X-Forwarded-Encrypted: i=1; AJvYcCXTYn7Y3EqccVaCyK3/DEeWHAUDmsuNZ174xY1GxjDBC0Ltv+DDLfuvftVNIZ/ZYIoJtlA67YGsRn8=@vger.kernel.org X-Gm-Message-State: AOJu0Ywau6krVsgcZPYXalEFbp0LUUoMb/MDD+Zei+Vp/sB74ajC0dov i03Z4S7lx1Q9p2j0rRrK+/FY2GPYwRcOcnGM+nhO+kyiNzCTQOI56hqK/A== X-Gm-Gg: ASbGncvzhXRbe6vZtIoaDv3VOKURZXR259UaYvqLYYPYGQwNTHgSHsh2O52mW9ivTpi k3GpDekJuZJOAtKzd/Nt5hNCFskJrCRowPZJm831iaZP74VkNZ+q5wW9T3ADWucAg+bQACLNBO9 S4yAa/F0fAINWaNNSi9CQT/yX11WcpkIaYHkS7aWuGzoBY+B2FZ9Nl0wvSrhpWi/3DOBUv1GQ0l y2zgd8w/r8AllhSgHDvDyTJgvcS/CU7tUsUHdTc/4W0Po7iIiNUV5yerlXIxQPHMwDgV8vMvT1K eMc7SsYchx5sHZzOnm8= X-Google-Smtp-Source: AGHT+IHDJcFSrfRQX/F5sM5+pwZD66U1m8HNykq/nH0asUrd8BlBh7en4tGxnJJDkFq5nrEFC1SK/Q== X-Received: by 2002:a05:6a20:e613:b0:1e1:cd09:e08d with SMTP id adf61e73a8af0-1ee5c73983cmr5052739637.11.1739364114171; Wed, 12 Feb 2025 04:41:54 -0800 (PST) Received: from citest-1.. ([49.205.33.247]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ad53d0c0c19sm6468484a12.57.2025.02.12.04.41.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2025 04:41:53 -0800 (PST) From: "Nirjhar Roy (IBM)" To: fstests@vger.kernel.org Cc: linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, ritesh.list@gmail.com, ojaswin@linux.ibm.com, djwong@kernel.org, zlang@kernel.org, nirjhar.roy.lists@gmail.com Subject: [PATCH v1 2/3] common/xfs: Add a new helper function to check v5 XFS Date: Wed, 12 Feb 2025 12:39:57 +0000 Message-Id: <61a7e3f25621548ec3ef795a3cd0724e32afb647.1739363803.git.nirjhar.roy.lists@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This commit adds a new helper to function to check that we can create a V5 XFS filesystem in the scratch device Signed-off-by: Nirjhar Roy (IBM) --- common/xfs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/common/xfs b/common/xfs index 0417a40a..cc0a62e4 100644 --- a/common/xfs +++ b/common/xfs @@ -468,6 +468,19 @@ _require_scratch_xfs_crc() _scratch_unmount } +# this test requires the xfs kernel support crc feature on scratch device +# +_require_scratch_xfs_v5() +{ + _require_scratch_xfs_crc + _scratch_mkfs_xfs -m crc=1 > $seqres.full 2>&1 || + _notrun "v5 filesystem isn't supported by the kernel" + _try_scratch_mount >/dev/null 2>&1 + ret="$?" + _scratch_unmount + [[ "$ret" != "0" ]] && _notrun "couldn't mount a V5 xfs filesystem" +} + # this test requires the finobt feature to be available in mkfs.xfs # _require_xfs_mkfs_finobt() From patchwork Wed Feb 12 12:39:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nirjhar Roy (IBM)" X-Patchwork-Id: 13971666 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (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 7D5E4F4FA; Wed, 12 Feb 2025 12:42:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739364144; cv=none; b=KXzNTUafju/3dz97R+6D8kZ7mGNiFtyQOTSxZAb4g7JHFEr/8WfC6iv3dcH6b5UfXqS4Eupg1/EyG9Y67zB7CsYTZBgCo6kjy0Rwj6WdKHkmu4QrJ8/3TWE++a0NCqfQ6zeAmNQTlYSDY9F0jAP6xaoIuEghEXXug0ZLhm3v6jw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739364144; c=relaxed/simple; bh=c4LVZDb8JVr8gzjdz7Z5FYQBjgYEm1csVXr4bPtjWAI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EUQXJHpmoYdZRHHAtd0rkVFusj1iGizZotQ/cJmllwmvaC38CZigTH7c22qMtLViMLOWl8IWl49n5C2iJGxC0/hvJVtTJpEhL6iMjH6CvAYr+lpq4VmK7awB8SEiVxZEJCZDxyFgv2T7SpP+1K1y1Ar0696Z9OhOKR+ZBcUrTO4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Qd++t8Uu; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Qd++t8Uu" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-21fa56e1583so51136085ad.3; Wed, 12 Feb 2025 04:42:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739364142; x=1739968942; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ILSZ2TlqgYiobcvK/I9xuSSgxNUMr42iC2d9uSuSt7I=; b=Qd++t8UuYk1DT9SlqbY8qOYmtSTrvJ1Uloz7WKEuGqBoixX2ETIDahwAjIir76Woaf TRk2z7dribKBeo0dGEaJJSDJewhuVbpitJrQi7+oPkASDarvjbKsS2/eBvMQFie3CdoF 64aOMlRk0O3qRqBG/IQLMhtLKLJNS1bwQ1/WoNJgUf6hmeQxqPjI4pJ/adyy7T+xkNnU Sq20Bfesu7Ej0TGDe2+9rrx4gfEevD4Q0G7tlhcz7w4MdeSsBxqdBi7zukd0Q6gfjRY/ UY4XBIs2Zim0M1YV3HJaRDcpyrLQHvFWok0C7FLkienPaDQkn1AnuwJdnxMdFlrYBIjF wp6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739364142; x=1739968942; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ILSZ2TlqgYiobcvK/I9xuSSgxNUMr42iC2d9uSuSt7I=; b=wQZ6qUElP0rnKG9f6qAEdudNff7g8lJZHT6vF/YGVp7o123Ux45fnT8qSLGnwwim71 J6O5v7F7QS8+v/QX568ZBsoqtBGJ02FeIYAXaR3XxaZS+AYngnRM0TMFNN6hXUSaNXyb U1Joy67k/ImOvdmMGkjLADqwAsdDA4PenqW+c1kZ9B37rVA9AJTc1REWCnRNtZz4C1HS xiEnhdPRoKVu9IAYDx+zgMm9q0oB1/J80ULHVINEpRbO6yRpCFfYLUXrdncsVt31umj4 qo+CeZP4RVOzjv4+7qbUMXUKC+XivoITxC9RqcUaIgbhJdrRd3pD3PBw3At5cUjUGPf7 p32Q== X-Forwarded-Encrypted: i=1; AJvYcCWQXKjKxuLntvufFNfA+3VvvG4PYCJIXN3cyIOXy6j2u5uU0AooBNXs8CwMQUxQhYPp5Pq0UEUdYQs=@vger.kernel.org X-Gm-Message-State: AOJu0YwaktHbq1T+Xtnf/4BwLMGZP5PQYbzQNGn7dbce+ix6TBBHoCie cvmg9IYq6n4vemNLZmPtSn71t3HJmqRbXRsan0E+Mkm41Tjgctet7oGEOg== X-Gm-Gg: ASbGncupQ++u37E4zfICiOjVg8k/8jsnKFkwIVcH6f8udOsnrTPrM7jguDgvhnwIhyc FgyjRcXPumtXnkYTvFaznvTZIAObKa13Lr8BCeBnQ9K1rP15aBK4OFKWVL5XrXMqGIqQI20ik8/ 0Mdb0iotznBYLXJzu/39B9aDB859pa9vLAmdXNCDXYwuDOn1BrHK7BDnjdi2Y2e+UIjHfNec0zK HWqyD+qolPqjZw9GmW8Vg2hsilojaWRNZ4gDGYx5iyRdRK9HszW8t+cuOiQSfVD0cn2HPi6prgK 5hENC8CoZUsD3XNt2SU= X-Google-Smtp-Source: AGHT+IGM+SqfUDe3ENV6cVog26MQlu4xZNnjizXEHulc8DtoyP5PpHxCk/S5BgUAPlSSD+TthibbSg== X-Received: by 2002:a05:6a21:6d97:b0:1ed:a4e2:89cf with SMTP id adf61e73a8af0-1ee5c7dbec0mr5369352637.27.1739364142385; Wed, 12 Feb 2025 04:42:22 -0800 (PST) Received: from citest-1.. ([49.205.33.247]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-ad53d0c0c19sm6468484a12.57.2025.02.12.04.42.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Feb 2025 04:42:22 -0800 (PST) From: "Nirjhar Roy (IBM)" To: fstests@vger.kernel.org Cc: linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, ritesh.list@gmail.com, ojaswin@linux.ibm.com, djwong@kernel.org, zlang@kernel.org, nirjhar.roy.lists@gmail.com Subject: [PATCH v1 3/3] xfs: Add a testcase to check remount with noattr2 on a v5 xfs Date: Wed, 12 Feb 2025 12:39:58 +0000 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This testcase reproduces the following bug: Bug: mount -o remount,noattr2 succeeds unexpectedly on a v5 xfs when CONFIG_XFS_SUPPORT_V4 is set. Ideally the above mount command should always fail with a v5 xfs filesystem irrespective of whether CONFIG_XFS_SUPPORT_V4 is set or not. Signed-off-by: Nirjhar Roy (IBM) --- tests/xfs/634 | 35 +++++++++++++++++++++++++++++++++++ tests/xfs/634.out | 3 +++ 2 files changed, 38 insertions(+) create mode 100755 tests/xfs/634 create mode 100644 tests/xfs/634.out diff --git a/tests/xfs/634 b/tests/xfs/634 new file mode 100755 index 00000000..dc153047 --- /dev/null +++ b/tests/xfs/634 @@ -0,0 +1,35 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2025 Nirjhar Roy (IBM) . All Rights Reserved. +# +# FS QA Test 634 +# +# This test checks that mounting and remounting a v5 xfs filesystem with +# noattr2 fails. Currently, this test will pass with CONFIG_XFS_SUPPORT_V4=n but +# with CONFIG_XFS_SUPPORT_V4=y, this will fail i.e, mount -o remount,noattr2 +# command succeeds incorrectly. +# +. ./common/preamble +. ./common/filter + +_begin_fstest auto quick mount +_require_scratch +# Import common functions. + +_fixed_by_kernel_commit xxxx \ + "" +_require_scratch_xfs_v5 +_scratch_mkfs -m crc=1 > $seqres.full 2>&1 || + _notrun "need an xfs v5 filesystem" +_scratch_mount "-o noattr2" |& grep -iq "fail" && \ + echo "mount failed successfully" +_scratch_mount +! _scratch_remount noattr2 >> $seqres.full 2>&1 && \ + echo "remount failed successfully" +_scratch_unmount + +# success, all done +status=0 +exit +status=0 +exit diff --git a/tests/xfs/634.out b/tests/xfs/634.out new file mode 100644 index 00000000..8a98c05c --- /dev/null +++ b/tests/xfs/634.out @@ -0,0 +1,3 @@ +QA output created by 634 +mount failed successfully +remount failed successfully