Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1069695ybg; Wed, 3 Jun 2020 23:34:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzaom9XabHuHxiVYHXNBRj21ExLXcNKNtLiVrbna34jR967I8CxuuzfgCJcp/UQxO5po778 X-Received: by 2002:a50:cfc4:: with SMTP id i4mr2864172edk.252.1591252442725; Wed, 03 Jun 2020 23:34:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1591252442; cv=pass; d=google.com; s=arc-20160816; b=ErjVMhLMvb0fNdZb3cT6CZYhm4BDvuq3uO6Oe4GwrxDfaH8ggA6oLjXshhatmzsFf6 eT5U5ChQ0HL3m5Gjysr89/bjZf1KJ97LlOmkkCYRKLSCvmGCxcRNme3aB+JyavjG/VSU ml97bg/b+QQoOctsNtKCoQkoL1JoB5fBr1MGF7RatVSqS7cBeFqiq0sFq9cPiJFNqn6p OOlDARNZJajSXn5dXp5OYUDtmukSFLBw1sHUAGJGeit2uU+SYdElW7MXb/2miKbe2ayG nfplwpEgI28Puduy2eyupzix8sYdMSC8UcZM/Clhlv9KbZBDBc9Ig88w3lQysGtC/ylk FTeg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=hB6eEYcFUT0usHlsMngAxAuisvsix1M+/W2Cex7Lw+o=; b=Dt4GtGN31DyKcdD9dlSTNiaMS4dTLGHHwdTV36HpJjIn8tqfk9G6IMneXFlpVHHmJp 5AOhr06yPe0b0PVOTKQDxVsm1aL28VyF/JDXPooyAGkfZSadKDnuldO6yYQZRvLRwIIX hgJYnZu8BlgLVSQVnwCVBzYtYuBdPsrbgZBSKlI1OhkjgDMKb50CJurinB/krQ1oRZ3W UyVkbaiREDo3LMC+R75JS/IcjlopC6x7GnCJX8DUVDtZP0JMCm65fQJgLVDv4Wg1eB3N yCFUdl/Nj9inVUb2JXO/tO3hnp5ZDzTS8nmGUGdUJrJhmJuY1wUCCMEIJ3OKKPZRJjXz S03g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mykernel.net header.s=zohomail header.b=S9tz31UU; arc=pass (i=1 spf=pass spfdomain=mykernel.net dkim=pass dkdomain=mykernel.net dmarc=pass fromdomain=mykernel.net>); spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch5si995721edb.567.2020.06.03.23.33.24; Wed, 03 Jun 2020 23:34:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mykernel.net header.s=zohomail header.b=S9tz31UU; arc=pass (i=1 spf=pass spfdomain=mykernel.net dkim=pass dkdomain=mykernel.net dmarc=pass fromdomain=mykernel.net>); spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727038AbgFDG1C (ORCPT + 99 others); Thu, 4 Jun 2020 02:27:02 -0400 Received: from sender2-op-o12.zoho.com.cn ([163.53.93.243]:17191 "EHLO sender2-op-o12.zoho.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725959AbgFDG1A (ORCPT ); Thu, 4 Jun 2020 02:27:00 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1591252014; cv=none; d=zoho.com.cn; s=zohoarc; b=axuw/og/0SBtIs7v1VxHjxDYK6qG3rBrEk4yNAM5u1i66EBwB1hYdVvt+RWQnFiRLt75ubUEF/H/XbWdp4FLIVoA2yDr5A3tfE8x1bPMNlYEdrYNWLubxvkPG4593whGzDMvm6sy6+bKF3lQqNcWiKZYSowTXpvJ9zmcx+fUT0g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com.cn; s=zohoarc; t=1591252014; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=hB6eEYcFUT0usHlsMngAxAuisvsix1M+/W2Cex7Lw+o=; b=nVmJrnsWgmAJen2/rCFUcMponpGRE+1lxR2+bUdgIIpo9FGWulhOvFFRycGaVmhkU0Ox69mbh5h08oVU0B4G0qES9W1sWSJrexqA7rldY2h5Qc/HcMzchyKaSKlovv9Qhwl6JifjP8alwlPkfQf2kN3f0KRkBLzVxyRjGMnkvqA= ARC-Authentication-Results: i=1; mx.zoho.com.cn; dkim=pass header.i=mykernel.net; spf=pass smtp.mailfrom=cgxu519@mykernel.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1591252014; s=zohomail; d=mykernel.net; i=cgxu519@mykernel.net; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=hB6eEYcFUT0usHlsMngAxAuisvsix1M+/W2Cex7Lw+o=; b=S9tz31UUdziMYJakb0EvlX2IQlkPSUVv169sAoH5VlpVviuqY4gUsTpgF+gEQ1Oy XViIiSphSIUxiFhyrAWB1XXD+nyJT4iOjHDqyzxn8j8xpSaaf4FcOk5eKClJe1nvP+7 rY/3JkrGHVdKcFg9R3CcTj9ZPWtu9nrHbYt5UFAY= Received: from [192.168.166.138] (218.18.229.179 [218.18.229.179]) by mx.zoho.com.cn with SMTPS id 1591252010129892.6626369129234; Thu, 4 Jun 2020 14:26:50 +0800 (CST) Subject: Re: [RFC PATCH] ext2: drop cached block when detecting corruption To: jack@suse.com Cc: linux-ext4@vger.kernel.org References: <20200603094417.6143-1-cgxu519@mykernel.net> From: cgxu Message-ID: <398a6fd8-37ee-c323-b606-c8679067e540@mykernel.net> Date: Thu, 4 Jun 2020 14:26:49 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20200603094417.6143-1-cgxu519@mykernel.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ZohoCNMailClient: External Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 6/3/20 5:44 PM, Chengguang Xu wrote: > Currently ext2 uses mdcache for deduplication of extended > attribution blocks. However, there is lack of handling for > corrupted blocks, so newly created EAs may still links to > corrupted blocks. This patch tries to drop cached block > when detecting corruption to mitigate the effect. ext2_xattr_cmp() will carefully check every entry in the block, so there is no chance to link to corrupted block, maybe we can improve the speed of cache related operations by dropping corrupted blocks. Thanks, cgxu