From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 D19E2237A4F for ; Wed, 10 Dec 2025 01:57:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765331857; cv=none; b=EM3ju6MnLB5PPBGW6gi9hGvu4fv4C8YnmB8YrCIIf4RJb3fG4Y5+PXwiNKBcR2lAfoTaXH+6Wn/9vCcL/VPmDkr2tIu2BT2mvu1IOQFFNUYe8JrwS5XuRBcGItaVvZY/BDOKMC3Xa/trSDhQ8v5oElrPdlYRtjE5x+eNgM9NxXo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765331857; c=relaxed/simple; bh=EXMGCVAIoyAy/xxruOm9uvQBoxoRGp+GnKT8R/4C6tk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=T4O+Df4Xayc+YGgz4gEQiy1Uyula8P/c8p0KF5PjPGuiLZl2LMrjZw8M1PGeaWeWNrbup071b7BW01F1GBS7FHRpgFttgdHjNthi5kXsaSnWkosVir8sSLgLbPa1nF5QSim3Nmb7mTamFZM5yCNetrFOXAI/7UnDHJGSyRWVKlM= 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 (2048-bit key) header.d=suse.com header.i=@suse.com header.b=OJpUH0mP; arc=none smtp.client-ip=209.85.128.44 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 (2048-bit key) header.d=suse.com header.i=@suse.com header.b="OJpUH0mP" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4775dbde730so7345955e9.3 for ; Tue, 09 Dec 2025 17:57:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1765331851; x=1765936651; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=t8ovbNgKg/lgTT9dyc+7/3rfj3rR7+zCrXiqUlR8nTg=; b=OJpUH0mPO64M3psDVMD2fVDEQHPkqJ3kAqe2HdIkWsCygJi4HtSeyYdrdEmYZi264z lx3arDbhQ5MfUuxkdEpltqey7L5VgQq28jHqDT46aWexrJaX/CRXPm5iXAkGcDN+m7Ay udNS3JNnCsTTUMOZwGOgmln4Cbs0Jhu6tlhPodzhRqsibhrvSBC0HXJK9gdJiFgWRncP GwPQOnld0xLYrFEH7fakMNfwlo3vtkO398wEHIvZ7M0iQikWpl2oFPwWQvJ8YSrfsJAZ ZuUF9KnZ1ZTmu88U9RazmsY9kYRGRs4gmcQChvIxWjPRQeiBtpbOywfHuIK7qSnBianm 76Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765331851; x=1765936651; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=t8ovbNgKg/lgTT9dyc+7/3rfj3rR7+zCrXiqUlR8nTg=; b=gwtOxbo8tnifGX5CGEKIcaBQKoKXPVrLSkQVXuVoRskvaIcFhxoP4nR24b/aW90Afs 1iyaqxq3NhO2IkDDPI3eUrClUm6b46n2Sls+8+b3fwDAZb46cfAuTDhikmIYgUHs8H82 rYaNRKs8f60A1x3A6NzFDzonOjkd6s9s/LseLGlsWdgUzxVIu6sorYzyFoSyHQDPaKPR F8xrIlrbGeD+CrnCYVCcX6PUvlfdqVtrTwuiWBL9HuAnrKtDF9lqZGcMngxDqoqG4yHa fDIIATblX+588nJNJLOmmAYJz8lonKB/R/huQ/oBJLxYTrQkReVe2B1HL+3FGdftlSb3 c56w== X-Forwarded-Encrypted: i=1; AJvYcCWE/Wg/yChZvj27HfUJl+NV/oIJyYog3klRpRgDmTOX5QjyiuLe2/Q5XgoyV5SdBEAstEN4bzQ7+HiI29A=@vger.kernel.org X-Gm-Message-State: AOJu0YyqZrgJbqSuSHDFyNyHAQ5NEGZbd0U/THk3UHNfj1fAkXe4tKxA D87j0N9gnAY1WKQQpqQRE3RovVxhGCmW9yLjSobsD/mjsfGx9QTbEcPV9H+gyN2mPQU= X-Gm-Gg: ASbGnctOLWDamoTV1aoiydqAycnfJosK/TNgQjmkfpO+451x66uYOtvfUNtfKJkN8Tf VjIF97Zq94Yj9axAUCzm4UYTEmfC98hj+0vDqdBH7noxi7omsIPx6JWAtpUxZc5Z1+iThMP5VVK rZ05CWmSEWKm9xNUOcxFXme/Z37pO7gB0iNs32equvR268FP8RpBG8AfwN9oYuCDHCg2xLDlCXZ n0hFLeDNP7geTFSWSOfTJYIim0YmbuUJytN1K0HKpt1ZrzKhII32PVAsb4ENTI/bVLrEX5fUpl/ y6i0iNZvT6iScrhxgUuAp2iog4uHaoxqCx4clTHJdv6cc1lEi9zJncPTuYtBwNZLreE7LNePbh1 SN1dJoGBFiWr9S/OoDw9r9oN5OVixO6qDaKrVoso0+8iMmK+D5RgClwjCXiDdIPR2Kx3xE2Xa8t 2YnI0fFcbr4HWuVbGyDu5hdrJ1 X-Google-Smtp-Source: AGHT+IEF2RfiiTUMOopT5eCWNA5egYPzxrTQLXLc+5epK6vGnh+VtAMca4T8Bzpx55E1JMB1KJCY7Q== X-Received: by 2002:a05:600c:46cf:b0:477:a6f1:499d with SMTP id 5b1f17b1804b1-47a837a8c9amr4047365e9.3.1765331851178; Tue, 09 Dec 2025 17:57:31 -0800 (PST) Received: from localhost.localdomain ([202.127.77.110]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29dae49ca1esm164755985ad.2.2025.12.09.17.57.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Dec 2025 17:57:30 -0800 (PST) From: Heming Zhao To: joseph.qi@linux.alibaba.com, mark@fasheh.com, jlbec@evilplan.org Cc: Heming Zhao , ocfs2-devel@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 0/1] ocfs2: fix reflink preserve cleanup issue Date: Wed, 10 Dec 2025 09:57:23 +0800 Message-ID: <20251210015725.8409-1-heming.zhao@suse.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit why resend? I pasted incorrect ocfs2-tools test cases. (only modified the cover-letter; no code changes) ----- Linus and Andrew are busy, so I don't include them in the patch review phase. This patch continues Linus's job to fix the remaining issue in the reflink preserve path. The patch passed the following tests. from xfstests: ``` ./check -g quick -T -b -s ocfs2 -e generic/032 -e generic/076 \ -e generic/081 -e generic/266 -e generic/272 -e generic/281 \ -e generic/331 -e generic/338 -e generic/347 -e generic/361 \ -e generic/479 -e generic/480 -e generic/628 -e generic/629 \ -e generic/648 -e generic/650 ``` from ocfs2-test: ``` single_run-WIP.sh -f 1 -k /usr/local/ocfs2-test/tmp/linux-2.6.39.tar.gz -l /usr/local/ocfs2-test/log -m /mnt/ocfs2 -d /dev/vde -b 4096 -c 32768 -s pcmk -n hacluster -t inline,xattr,reflink discontig_runner.sh -f 1 -d /dev/vde -b 4096 -c 32768 -s pcmk -n hacluster /mnt/ocfs2 ``` special test: (reflink command is from ocfs2-tools) ``` ## this case will leave one entry after cleanup job ## create file cp /usr/bin/basename /mnt/ocfs2/a0 ## set OCFS2_XATTR_INDEX_POSIX_ACL_ACCESS setfacl -m u:ocfs2test:rwx /mnt/ocfs2/a0 ## check, will output: "user:ocfs2test:rwx" getfacl /mnt/ocfs2/a0 ## set OCFS2_XATTR_INDEX_USER, don't trigger cleanup setfattr -n user.comment -v "tst-xattr" /mnt/ocfs2/a0 ## check, will output: "tst-xattr" getfattr -n user.comment /mnt/ocfs2/a0 ## set OCFS2_XATTR_INDEX_SECURITY setfattr -n security.selinux -v "unconfined_u:object_r:user_home_t:s0" /mnt/ocfs2/a0 ## reflink non-preserve reflink /mnt/ocfs2/a0 /mnt/ocfs2/ra0 ## reflink preserve reflink -p /mnt/ocfs2/a0 /mnt/ocfs2/ra0-p ## check getfacl /mnt/ocfs2/ra0 # "user:ocfs2test:rwx" non-exist getfacl /mnt/ocfs2/ra0-p getfattr -n user.comment /mnt/ocfs2/ra0 # "tst-xattr" exist getfattr -n user.comment /mnt/ocfs2/ra0-p getfattr -n security.selinux /mnt/ocfs2/ra0 # no security attr item getfattr -n security.selinux /mnt/ocfs2/ra0-p ## this case will trigger cleaning up all array entries. ## create file. then set file with OCFS2_XATTR_INDEX_POSIX_ACL_ACCESS and ## OCFS2_XATTR_INDEX_SECURITY cp /usr/bin/basename /mnt/ocfs2/b0 setfacl -m u:ocfs2test:rwx /mnt/ocfs2/b0 setfattr -n security.selinux -v "unconfined_u:object_r:user_home_t:s0" /mnt/ocfs2/b0 ## reflink non-preserve reflink /mnt/ocfs2/b0 /mnt/ocfs2/rb0 ## reflink preserve reflink -p /mnt/ocfs2/b0 /mnt/ocfs2/rb0-p ## check getfacl /mnt/ocfs2/rb0 # "user:ocfs2test:rwx" non-exist getfacl /mnt/ocfs2/rb0-p getfattr -n security.selinux /mnt/ocfs2/rb0 # no security attr item getfattr -n security.selinux /mnt/ocfs2/rb0-p ``` Heming Zhao (1): ocfs2: fix reflink preserve cleanup issue fs/ocfs2/xattr.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.43.0