Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2218960ybg; Fri, 5 Jun 2020 08:27:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwG+5niL2UYvv5Blx0L0C4ZNW1NYvuhM5wkGI32t3iAggxyy2YMEQMtZd0u7stcMCV2am8n X-Received: by 2002:a17:906:746:: with SMTP id z6mr9641890ejb.12.1591370849596; Fri, 05 Jun 2020 08:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591370849; cv=none; d=google.com; s=arc-20160816; b=oQCLpxAGNeG3XsXeK5m5YoWuSwMwSYBYWl2C+ecYBDGpOC6bKl2kn2cStjpkXE1Csu wi46+PYr2EdFZsXx8AzIraMj0P9CqTQRMOOn0u5Jiikh8VUvu7ir6TOsj0qKNHAs7aMP cnh5EjMYwCfaIhRPap5B6OTFaVA4G+Ym7QpCZLPxnssidURM88X/6bPdQnSShsBGnh8x 7eYVCOP9yS14c5iMYeAHKKagk+At1naaIVYM1jQYkYiY5noq7U95YUaUVQy20PWITBVq Zi5JIhNYW4s/vDqFEGOP2jrjADvdfO+eiXUoUyGv+olZlEtIW82xQUYyRsPlnmi1CuMr zshA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=lIVk2zkLP86WImYXaqW+HuCRMqlSaPWNJFlJ24GqPSw=; b=eU/B3x6cVTZ41j/voEfCFWXLYnhTg4v3CNWVZjCQjH43yrvO794QgTwDXkuHv7lAnI YX+dPK7wgYwpntNgZRHqNrPPzhrW2W5+zO3dy2kyA+vSpCThgVUqjzderBwxVGsT1LIl aKYzCAC1z4d4XsvBgibejYhJKuVSIqJg9r9Z0EZnajZqP3svJJbq7okqYb5e2PaDGGr0 aUqKOEZaKq9vV9chmCziiWnxQflBFYj+ZovwtrOe5wvd9nfe9FeDiODhLpUqRMsd/otm 3/uQhFJosPz6h6WSVTDtYNXYoFhfb58mnKCmCoheEZt7nzKoXjUI+qEFRkRcdYB2KJ67 eRvA== ARC-Authentication-Results: i=1; mx.google.com; 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 n19si752706edv.82.2020.06.05.08.27.04; Fri, 05 Jun 2020 08:27:29 -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; 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 S1728001AbgFEP0M (ORCPT + 99 others); Fri, 5 Jun 2020 11:26:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:60732 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726539AbgFEP0M (ORCPT ); Fri, 5 Jun 2020 11:26:12 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 41675AC6C; Fri, 5 Jun 2020 15:26:14 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 79F081E1281; Fri, 5 Jun 2020 17:26:10 +0200 (CEST) Date: Fri, 5 Jun 2020 17:26:10 +0200 From: Jan Kara To: cgxu Cc: jack@suse.com, linux-ext4@vger.kernel.org Subject: Re: [RFC PATCH] ext2: drop cached block when detecting corruption Message-ID: <20200605152610.GF13248@quack2.suse.cz> References: <20200603094417.6143-1-cgxu519@mykernel.net> <398a6fd8-37ee-c323-b606-c8679067e540@mykernel.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <398a6fd8-37ee-c323-b606-c8679067e540@mykernel.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu 04-06-20 14:26:49, cgxu wrote: > 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 for the back but as you write, I don't see the point of your patch because corrupted blocks shouldn't get to mbcache in the first place (and we check block consistency only when loading block from disk, not from mbcache). And performance in case of corrupted xattr block doesn't really matter much so I don't want to complicate the code for that. Honza -- Jan Kara SUSE Labs, CR