Received: by 10.223.185.116 with SMTP id b49csp1933910wrg; Thu, 22 Feb 2018 05:40:16 -0800 (PST) X-Google-Smtp-Source: AH8x225JGswxJH2u0k35m+fgW+R/jiX10E9F1SmmwnyDBMxWwBD0wjolwQeNPPtR9pq2yiUdspQT X-Received: by 10.101.97.207 with SMTP id j15mr5636922pgv.266.1519306816207; Thu, 22 Feb 2018 05:40:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519306816; cv=none; d=google.com; s=arc-20160816; b=sOKVc3eCp8makOrLsOdoH2JgJwiHppXFVs78d9gOv/XKA6MpcHAjqey2zWbgsPFKs7 y/AgdpB7+NzcvhcCxecw4i6kSBdlYJnchoDKuXycLLUd2STyKnf3tCOM8txHbxajC9VQ Ogv3JiVWYxQ+uAVgcog/vGl697mmuyU45/hBrNAomvOtADUZ1UAN0mr+99bFwmKWNVRs Tk2CTOSN0DIo2Dj6zIwsyn6v1Ahi6t5vXCTeS8QvwBHy0as5QOaEsGSWYTuXx+PsZz8W 5d9jMXKNc+jVq4PPwZ/Wzy7fTG59Tr11vAC3ZevJwhZ+ZOuedR1PRc+NcGwOxyud8kVb FREA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :dkim-signature:arc-authentication-results; bh=kF3osjFQTdXvYnBaLUUq7+H8bd4ibv0J/iwr5UQDdoM=; b=brjHi8l4bVQwEm1e8QEBu9pEP7ZsXCpHn/Eepcrj6oGQc61NzKTB6H3iDZJZqEi6Br ULMeD04ltLlQQD4vbIPT+wXI4GKhS1i2xUWuHkX8c4MG0u0AShhSeImNPbvLIGSs2o97 UgXw11nQvRn1U6N8fSXr2tEtm1KYlZRLTYekZHFrZzS1DLoYivJjVukAmhw7F5lovoPZ InQpYOWP+kodU4niU+OD0RO5oUcTvPmAfEhlljzg/4muR8tlHse0+3IuH70W53vr3I9d YZPf+9t6N0BZLjlUm8jl0TEImv8vUCafeDig/yLoP3CdnHAT/jbbzUpJC+sglSH7rg4H oS/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nokia.onmicrosoft.com header.s=selector1-nokia-com header.b=l0mpNDI/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nokia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3si26005pgp.788.2018.02.22.05.40.01; Thu, 22 Feb 2018 05:40:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nokia.onmicrosoft.com header.s=selector1-nokia-com header.b=l0mpNDI/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nokia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932626AbeBVNiH (ORCPT + 99 others); Thu, 22 Feb 2018 08:38:07 -0500 Received: from mail-he1eur01on0137.outbound.protection.outlook.com ([104.47.0.137]:42832 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932491AbeBVNiF (ORCPT ); Thu, 22 Feb 2018 08:38:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=kF3osjFQTdXvYnBaLUUq7+H8bd4ibv0J/iwr5UQDdoM=; b=l0mpNDI/ZYxMWW4id/WrCvyI5LYG2AykhSOULP/BjT6nbtIOZhQ2Z8UPOC2uDWe8kuVpC0CatrhiuaOPaZKT1RBHKx1Y4TRZRp6gqw9pF08DEqTJQ9VaRwkVWT4rTyRPaoUTsvVFxWQwhggCROn+/1b9COH6esyzssvnBSh7rsA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=tommi.t.rantala@nokia.com; Received: from [10.145.143.144] (131.228.32.176) by VI1PR07MB1328.eurprd07.prod.outlook.com (2a01:111:e400:5a03::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.527.6; Thu, 22 Feb 2018 13:38:01 +0000 Subject: Re: backporting "ext4: inplace xattr block update fails to deduplicate blocks" to LTS kernels? To: Theodore Ts'o , Greg Kroah-Hartman , Tahsin Erdogan , Andreas Dilger , linux-ext4@vger.kernel.org, LKML References: <20180221114000.GB6555@kroah.com> <20180221155644.GC9900@thunk.org> From: Tommi Rantala Message-ID: <5fcdf2b9-9275-4d94-2b4a-e772972130e0@nokia.com> Date: Thu, 22 Feb 2018 15:37:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180221155644.GC9900@thunk.org> Content-Type: multipart/mixed; boundary="------------3BFFD0D25D988DEB4BC8B503" Content-Language: en-US X-Originating-IP: [131.228.32.176] X-ClientProxiedBy: DB3PR0202CA0004.eurprd02.prod.outlook.com (2603:10a6:8:1::17) To VI1PR07MB1328.eurprd07.prod.outlook.com (2a01:111:e400:5a03::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8e6f9698-cfb0-4b35-82cf-08d579f97e77 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(49563074)(7193020);SRVR:VI1PR07MB1328; X-Microsoft-Exchange-Diagnostics: 1;VI1PR07MB1328;3:ZP7YgvJO3SiGrNPoWcbzGN9t/bEBxj0sz9FsQ8xKUknm5OC/1GCAAodbLDXavu9S0Yce77++K+lPqmVzfIJXglxeXJ7vQ8XGfRYMP7dB56+QpQMcWEPqneHGD3Oc+L3aUw22WayzJDBeivn3kJt9O4t2ka9aScSF8bs35c744dUDrvraZr+T2Vrvqr4A8xz3YAO4BROXMNuKDhRsGxn8IowC/yJf30hHBmCVYdIG0dfceHRcj36zZ6Y1m1lPrNTa;25:JEwCWvqD6rjzU23M0yWoElfMVkj8c2q78K27tNZk//uqZ8/qGXmD0QVcVOJJknNe42+iaKlX7WQHvmlnU6JJRAk1SIaF+ClPaCqbyxsrRDATndsldS8mgakBBwGnRTLKS0w2YPF/En7hq/97Q0VelAQ7O19hVd9mQHXTJPylQFZiwz/8y2v6hjX++x1rMFqSwCjgDe4hmS+zVl7kLfpaCN22u7sa0yk/sAIwCmnLxIll1oM8QzyCPSOzVPQ2cmbZlv8MrRe+lnkYQk+yyfpMlIvyewPApbMB9C8KQzpeTZqUfc4SMmfqMyjZxq/2vGupHC2any/dNBkCUU0c4vAYjQ==;31:jlDLsJQjqL8YK6O8JQCXWaJDIZyOVF/L06UsWhS9cQ2mQtOEDgwyyXZAGxGxCoTPek6ERtgOeMYsAUVSX/1/74jV6leaVSJ2HOlYFQbrpk4k8E1CxOeJjUo8JDM60pOk5eUv/yfcYyRaoO7l4g85BULRssPFayguyeNupXubvlY+0WOiGpOh+YufO6PjWAF8LqdSRPeIaa3V8doqJoQbLsNu+sG5EODR4qocV24utco= X-MS-TrafficTypeDiagnostic: VI1PR07MB1328: X-Microsoft-Exchange-Diagnostics: 1;VI1PR07MB1328;20:ynUoqaMy0xYyuhUPJ80xxB21Zfi56uw5o6OKPfbBr8/87pfvegJ2ytqoY7l4qzpEQzIzwld7E9Ub6ti76sXdjybb7ZGPmUWqy3GNijuOF53tpQeAPNAKJGLjV9qZAqcMSFp4vnNtAwLRk+q1JTC/Q8HYf5ux1Yr5xSXTuNEE/wr4QAVNRpj7lo88AgZMIms+cywNEHvv0ZLn1bhTjKfhwzQbQfNSgwX+mJHVa+EAvaZG2QJE1LlGdrB2WmCQhG3rrqFwibzxcWHgZDX513QX5YZqHKBBdZqXYuqwAXAVbo456q8rmHoh5GMtewnIZGtNtSs97iD3v/L+rN24gf8fU3+pgLzdNSz8/Vmvh8rBPEmdUx4eaLn5F+j21N5A3zSXgcL0dVz3dIlmvo0DxtPVjVzetbg6sLJw+8LNrHEmSgwj6QqVR+UhU2t7qc7aRBn3VuZYsy89uvY3O8quP4oRjm6UynYC8vVhQ7/4nLAKB1sefYGbLgWXS7xbEuEc9BlU;4:AFRjNWL1nREl7nifs7psR1BiDhXeciaH6o4qfzHzOdhrvgOs+PgKWTrOhb59DfswL5lHCKnUgV8Uour9DH6xV+UQ+t9X1SGofUf9LdfLRc1hj3frvzot61QruCti9obNctNpn4jaYaBvz5C1bJ1lHKLarnEyxjIy+DnuV1uwAP+07nROkv32Dr+GDoXFh+36fCYgj1AbNLv2jatDu3kc96ZOWgbkUabdBZyqImNx1m5HHwbDOcwcVDrIELWXmTR7+8MxlqYSNlyWvBEiPTKJCUIR7Vv6uQO7q4BJN+10JO3hs5XPkCpHgMadqFj2m4UBaJwF6W5xH1zkk5nMzti29pdatriQiQojeUVFxXsexV8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(166708455590820)(84791874153150); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(102415395)(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231101)(11241501184)(806099)(944501161)(93006095)(93001095)(6055026)(6041288)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011);SRVR:VI1PR07MB1328;BCL:0;PCL:0;RULEID:;SRVR:VI1PR07MB1328; X-Forefront-PRVS: 059185FE08 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6049001)(346002)(396003)(376002)(366004)(39380400002)(39860400002)(189003)(199004)(51914003)(6306002)(15650500001)(52116002)(105586002)(3846002)(65956001)(65806001)(2906002)(66066001)(53936002)(65826007)(4610100001)(2171002)(305945005)(6246003)(5890100001)(77096007)(7736002)(26005)(33964004)(53546011)(25786009)(386003)(59450400001)(186003)(6486002)(2476003)(84326002)(16526019)(8936002)(316002)(478600001)(31696002)(270700001)(568964002)(966005)(575784001)(86362001)(81156014)(81166006)(5660300001)(8676002)(58126008)(2950100002)(16586007)(6116002)(16576012)(37036004)(110136005)(6666003)(229853002)(31686004)(64126003)(97736004)(76176011)(68736007)(106356001)(36756003);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR07MB1328;H:[10.145.143.144];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Received-SPF: None (protection.outlook.com: nokia.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;VI1PR07MB1328;23:DiC38N5hv6tGB6sqhOpQxN0cN1/qDbQuVsGmcE5QA?= =?us-ascii?Q?s9FhtIy1F4mxeh4HNQbtUa7CWrH/xyCTEyQBXtVKLyTH23mDd1hT+rGNgQLj?= =?us-ascii?Q?Itc5+0YrzjRl0DjePnfEPZPSZR49EgI7w5aWqIanSNeYHQzFFN8WnWKmNaen?= =?us-ascii?Q?H5kpXAe3HmCl0uDf0YxaV+JcANo81XlyTWAQjvrd9os1t1M7BGgOzq+jVly7?= =?us-ascii?Q?2gso+K/WENUE1g4YjFGLa2Yosdjwpo8/fw0HB4r18BcDaj8ge490qdoK5Nyo?= =?us-ascii?Q?CkoXrRKIL0gfUgA7Go7zwa4QyWTpXI1COFy6NY6lLpWmUXJgCY8OSw06PlKF?= =?us-ascii?Q?Tv+lJ2vAslknlwxjKjGgzY20W8AAgko5fFiK1BQcE3UjuwYFX9GJ93GG9rWa?= =?us-ascii?Q?cq2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Cw1ngKsdpQeuBTerkXlWHF2w/PwxXtK0GIPrrc3GJeC7dYgC+28jB1ubfzBCN0eIlUzVU=;7:lUHhrQ7DwRDYf782/Ak1lhMu5TOUKZVpdF9mXpVvYgZasx90/TAyq1kgI6kOzqaXMYnBOL8R4I4FeIZp4EsP+tiskvGMnynPy33oqZUIz3VQrKMQ9+1CWZ945GSuJlk1PVhh0BuapkcJqqi3i8y/fDDnVow3C6KjY1PnroF/LZtDpBnlCtnGl3kkZE/QOWyY8TUSZFUXNqqS9dStct6e70siNw2Mh+hPDYDxDRElGba6tCYOVo5HkXY0QQzpyw68 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2018 13:38:01.1340 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e6f9698-cfb0-4b35-82cf-08d579f97e77 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB1328 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --------------3BFFD0D25D988DEB4BC8B503 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 21.02.2018 17:56, Theodore Ts'o wrote: > On Wed, Feb 21, 2018 at 12:40:00PM +0100, Greg Kroah-Hartman wrote: >> On Mon, Feb 19, 2018 at 03:26:37PM +0200, Tommi Rantala wrote: >>> >>> OK to backport it? >>> I tested it briefly in 4.9, seems to work. > > It looks sane, but it would be nice if I can get people who are > backporting ext4 patches to make sure there are no regressions using > one of kvm-xfstests[1] or gce-xfstests[2][3]..... > > [1] https://github.com/tytso/xfstests-bld/blob/master/Documentation/kvm-xfstests.md > [2] https://github.com/tytso/xfstests-bld/blob/master/Documentation/gce-xfstests.md > [3] https://thunk.org/gce-xfstests > > I do run regression tests[4] on stable kernels when I have time, but > it scales much better when other people can help. > > [4] https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git/tag/?h=ext4-4.9.54-1 > >> I need an ack from the ext4 maintainers before I can take this... > > Greg, you can go ahead and take this, but in the future I'd appreciate > it if ext4 backporters could at least run a smoke test (which takes > less than 15 minutes on GCE) before and after the patch, and report no > test regressions. Thanks for the instructions! Smoke test results 4.9.82 with and without the patch (attached, to avoid email client mangling it), no new failures: -------------------- Summary report KERNEL: kernel 4.9.82-xfstests #2 SMP Thu Feb 22 14:58:27 EET 2018 x86_64 CPUS: 2 MEM: 1989.2 ext4/4k: 271 tests, 7 failures, 34 skipped, 737 seconds Failures: generic/081 generic/383 generic/384 generic/386 generic/441 generic/451 generic/472 Totals: 271 tests, 34 skipped, 7 failures, 0 errors, 685s -------------------- Summary report KERNEL: kernel 4.9.82-xfstests-00001-gb98ae0251413 #1 SMP Thu Feb 22 14:31:01 EET 2018 x86_64 CPUS: 2 MEM: 1989.2 ext4/4k: 271 tests, 7 failures, 34 skipped, 749 seconds Failures: generic/081 generic/383 generic/384 generic/386 generic/441 generic/451 generic/472 Totals: 271 tests, 34 skipped, 7 failures, 0 errors, 694s FSTESTVER: e2fsprogs v1.43.6-85-g7595699d0 (Wed, 6 Sep 2017 22:04:14 -0400) FSTESTVER: fio fio-3.2 (Fri, 3 Nov 2017 15:23:49 -0600) FSTESTVER: quota 4d81e8b (Mon, 16 Oct 2017 09:42:44 +0200) FSTESTVER: stress-ng 977ae35 (Wed, 6 Sep 2017 23:45:03 -0400) FSTESTVER: xfsprogs v4.14.0-rc2-1-g19ca9b0b (Mon, 27 Nov 2017 10:56:21 -0600) FSTESTVER: xfstests-bld ff7b8c2 (Wed, 13 Dec 2017 21:24:24 -0500) FSTESTVER: xfstests linux-v3.8-1832-gafeee2d9 (Sun, 31 Dec 2017 13:35:28 -0500) FSTESTCFG: 4k FSTESTSET: -g quick FSTESTOPT: aex Tommi --------------3BFFD0D25D988DEB4BC8B503 Content-Type: text/x-patch; name="0001-ext4-inplace-xattr-block-update-fails-to-deduplicate.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-ext4-inplace-xattr-block-update-fails-to-deduplicate.pa"; filename*1="tch" From b98ae025141361b9e92fdd470dfd2314a64a47d0 Mon Sep 17 00:00:00 2001 From: Tahsin Erdogan Date: Sat, 5 Aug 2017 22:41:42 -0400 Subject: [PATCH] ext4: inplace xattr block update fails to deduplicate blocks commit ec00022030da5761518476096626338bd67df57a upstream. When an xattr block has a single reference, block is updated inplace and it is reinserted to the cache. Later, a cache lookup is performed to see whether an existing block has the same contents. This cache lookup will most of the time return the just inserted entry so deduplication is not achieved. Running the following test script will produce two xattr blocks which can be observed in "File ACL: " line of debugfs output: mke2fs -b 1024 -I 128 -F -O extent /dev/sdb 1G mount /dev/sdb /mnt/sdb touch /mnt/sdb/{x,y} setfattr -n user.1 -v aaa /mnt/sdb/x setfattr -n user.2 -v bbb /mnt/sdb/x setfattr -n user.1 -v aaa /mnt/sdb/y setfattr -n user.2 -v bbb /mnt/sdb/y debugfs -R 'stat x' /dev/sdb | cat debugfs -R 'stat y' /dev/sdb | cat This patch defers the reinsertion to the cache so that we can locate other blocks with the same contents. Signed-off-by: Tahsin Erdogan Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger Signed-off-by: Tommi Rantala --- fs/ext4/xattr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 3eeed8f0aa06..3fadfabcac39 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -837,8 +837,6 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode, if (!IS_LAST_ENTRY(s->first)) ext4_xattr_rehash(header(s->base), s->here); - ext4_xattr_cache_insert(ext4_mb_cache, - bs->bh); } ext4_xattr_block_csum_set(inode, bs->bh); unlock_buffer(bs->bh); @@ -959,6 +957,7 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode, } else if (bs->bh && s->base == bs->bh->b_data) { /* We were modifying this block in-place. */ ea_bdebug(bs->bh, "keeping this block"); + ext4_xattr_cache_insert(ext4_mb_cache, bs->bh); new_bh = bs->bh; get_bh(new_bh); } else { -- 2.14.3 --------------3BFFD0D25D988DEB4BC8B503--