Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp7333137yba; Thu, 2 May 2019 08:10:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTB7SCoycaC0uYd66lUkGYScCnCO/XKZcjnF2QRLqKgNhx8e/0KNXeoVoDeBrQ94fUCs8O X-Received: by 2002:a65:5206:: with SMTP id o6mr4475043pgp.341.1556809849769; Thu, 02 May 2019 08:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556809849; cv=none; d=google.com; s=arc-20160816; b=GDf4PaXbRORCKTI0+tCI202tefIzl5c+PnzZvth67JLAWdYOI4ze1k+Bwo+JvanEOE bNRShAAfgK70nYBFvmwQUfUXwaVSBkPaoIGbMaH5LNohDLQcUfsS4xDuuv1GTcnxT9nT F36aTwF91UDDuJpA5lDZrRO4WsQllpA7cCfgnoA4D1gTKyfBL0+N5GOUHQq8gLmD7/sN NRV3fnuh1O2uYg1+aU8vbAk3zMd72qZ0PQjuymU+0uYa6p1amyT9YnUreLrup7oYsaBw f4uSkWS/qmic+vGiVIokjhLDQ0N/5Gn0ujChO6teK42NPY1ReV2d3u8Lj3G3ueXSYeMN Q89g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:organization:date:subject:cc:to :from; bh=OBOcBT6KzDfJpenKs/NV1fN5T4lKJKjzHQS8jl0bGtk=; b=LGL6ZCEFohTrezKfod/XbBtL7ULb/GWNmED6QHHD5n0PlmE7r3swVMX0TpuW9lSTHj idLj+i2FqhQ5K5OF5Zr2ta8V2/gWsz7bncilvDwk5e3ZDsu+hgbHftRRq9YFh1Ovvss8 xRrlhQV6yPBs5BMWoXeevjzx0Dwhot+CO4FkK/5UIVXP1tUnWcxrZdbxoBqZ6wxqbkVN 5lzLJ2tdb9UGEfYi75vEVfRMO/QQL/0VTm7zpisEsjrxNawhC1cL+UgSd3SkEGgSGk3g fySqYRkop4sGDjwTNCQP+WauqM5idyfCpLAYCGXiPDqMHaloIc6lDGylc3CyNMWxkqVd hFrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a39si6036207pla.0.2019.05.02.08.10.30; Thu, 02 May 2019 08:10:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726321AbfEBPJq (ORCPT + 99 others); Thu, 2 May 2019 11:09:46 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:35778 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726197AbfEBPJq (ORCPT ); Thu, 2 May 2019 11:09:46 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x42F7jAZ026887 for ; Thu, 2 May 2019 11:09:45 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0b-001b2d01.pphosted.com with ESMTP id 2s81j3vh5d-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 02 May 2019 11:09:45 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 2 May 2019 16:09:41 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 2 May 2019 16:09:38 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x42F9bNd16187540 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 2 May 2019 15:09:37 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 221794C04E; Thu, 2 May 2019 15:09:37 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 904814C044; Thu, 2 May 2019 15:09:35 +0000 (GMT) Received: from localhost.localdomain (unknown [9.85.71.82]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 2 May 2019 15:09:35 +0000 (GMT) From: Chandan Rajendra To: Eric Biggers Cc: linux-fscrypt@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 01/13] fscrypt: simplify bounce page handling Date: Thu, 02 May 2019 20:40:34 +0530 Organization: IBM In-Reply-To: <20190501224515.43059-2-ebiggers@kernel.org> References: <20190501224515.43059-1-ebiggers@kernel.org> <20190501224515.43059-2-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-TM-AS-GCONF: 00 x-cbid: 19050215-0016-0000-0000-000002779FA6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19050215-0017-0000-0000-000032D43490 Message-Id: <3273903.Njs8gtEjer@localhost.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-02_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=526 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905020102 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thursday, May 2, 2019 4:15:03 AM IST Eric Biggers wrote: > From: Eric Biggers > > Currently, bounce page handling for writes to encrypted files is > unnecessarily complicated. A fscrypt_ctx is allocated along with each > bounce page, page_private(bounce_page) points to this fscrypt_ctx, and > fscrypt_ctx::w::control_page points to the original pagecache page. > > However, because writes don't use the fscrypt_ctx for anything else, > there's no reason why page_private(bounce_page) can't just point to the > original pagecache page directly. > > Therefore, this patch makes this change. In the process, it also cleans > up the API exposed to filesystems that allows testing whether a page is > a bounce page, getting the pagecache page from a bounce page, and > freeing a bounce page. Looks good to me, Reviewed-by: Chandan Rajendra -- chandan