Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1014671ybl; Mon, 2 Dec 2019 23:37:50 -0800 (PST) X-Google-Smtp-Source: APXvYqwBRmP+nyWE/ws6JxZ1Vz22PgkVxn+g0eaBBwiSdYBTmR3JTfTzNJ43WDUG6TjkkGlfq5ia X-Received: by 2002:aca:120e:: with SMTP id 14mr2330710ois.135.1575358670738; Mon, 02 Dec 2019 23:37:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575358670; cv=none; d=google.com; s=arc-20160816; b=LSY7H1aORE3ZpFyDv+UR0jepnePi2rTLly1pJBleCW81I4j+WIqeG6JrjSUw+kP3e3 ToNauMDgf30XoI7FpIWjeuFccx5A6F8XZbYoALcDslN4uAmUr25Dd0k2CMe451lCaycw 52F6ChdxT0YN1aOIXdC0ZP8vc47HTpLGWbBYTmVBdHFx+UUwWfzFxhHRYyIrog/EODm5 uoNgkGufuELxH7UqodAnZlKYYk4r8hkwMuU+8JGrNKs1gNeroF7Wro7td6o1wOPPA473 j09+El4BRHapS7Glh1LBkYLRlbCFAN5VQukeRBF94+nqUzWmJhO7Ex5247MuIvEsrqz3 ssmw== 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=nju1865Mpu7QzDeqHBtZsKlFkRzYaqFXovnW4xHkBJE=; b=VUVI903KxZDLm3EwqEHMzZBdEYX6VWf0gDRXOt2CS+OLWzsII7k+SFnaKsDhyaji4E OQEQ9olRr2nLGJPZk3G8BM6o7bcUpIALzI4knI2IrWdNAMyNayx+ig8MOyVjoZyqxCHT SMwNLRtR5BIq8pCYeVUCXckiT9OSRKq9I6wBnLnMgIZtOw0x7ei9LHIqj2m419aLuNiM MP22bzO7EYTMmMylpbt6j7kYIawl2KcPHXfYmylX8ZAgNBEPTB18OvZhl+LVRFXD8f23 mh63WHtVVrkO1agkdacZL7r9KSR/RH6sLQm3sTMUV26APVYLLQe1atv8WPXMVTfqPBYJ jNdQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o84si565237oig.204.2019.12.02.23.37.38; Mon, 02 Dec 2019 23:37:50 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727600AbfLCHgk (ORCPT + 99 others); Tue, 3 Dec 2019 02:36:40 -0500 Received: from szxga02-in.huawei.com ([45.249.212.188]:2525 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727444AbfLCHgj (ORCPT ); Tue, 3 Dec 2019 02:36:39 -0500 Received: from DGGEMM406-HUB.china.huawei.com (unknown [172.30.72.56]) by Forcepoint Email with ESMTP id 7819FD447DA005F45EFD; Tue, 3 Dec 2019 15:36:36 +0800 (CST) Received: from dggeme762-chm.china.huawei.com (10.3.19.108) by DGGEMM406-HUB.china.huawei.com (10.3.20.214) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 3 Dec 2019 15:36:36 +0800 Received: from architecture4 (10.160.196.180) by dggeme762-chm.china.huawei.com (10.3.19.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 3 Dec 2019 15:36:35 +0800 Date: Tue, 3 Dec 2019 15:41:54 +0800 From: Gao Xiang To: Daniel Rosenberg CC: Theodore Ts'o , , Jaegeuk Kim , Chao Yu , , Eric Biggers , , Alexander Viro , Andreas Dilger , Jonathan Corbet , , , , Gabriel Krisman Bertazi , Subject: Re: [PATCH 4/8] vfs: Fold casefolding into vfs Message-ID: <20191203074154.GA216261@architecture4> References: <20191203051049.44573-1-drosen@google.com> <20191203051049.44573-5-drosen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20191203051049.44573-5-drosen@google.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [10.160.196.180] X-ClientProxiedBy: dggeme719-chm.china.huawei.com (10.1.199.115) To dggeme762-chm.china.huawei.com (10.3.19.108) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 02, 2019 at 09:10:45PM -0800, Daniel Rosenberg wrote: > Ext4 and F2fs are both using casefolding, and they, along with any other > filesystem that adds the feature, will be using identical dentry_ops. > Additionally, those dentry ops interfere with the dentry_ops required > for fscrypt once we add support for casefolding and encryption. > Moving this into the vfs removes code duplication as well as the > complication with encryption. > > Currently this is pretty close to just moving the existing f2fs/ext4 > code up a level into the vfs, although there is a lot of room for > improvement now. > > Signed-off-by: Daniel Rosenberg I'm afraid that such vfs modification is unneeded. Just a quick glance it seems just can be replaced by introducing some .d_cmp, .d_hash helpers (or with little modification) and most non-Android emulated storage files are not casefolded (even in Android). "those dentry ops interfere with the dentry_ops required for fscrypt", I don't think it's a real diffculty and it could be done with some better approach instead. Thanks, Gao Xiang