Message ID | 153913047133.32295.149030337934464712.stgit@magnolia (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 31FE516B1 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 10 Oct 2018 00:14:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E539284C9 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 10 Oct 2018 00:14:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0FA8028F95; Wed, 10 Oct 2018 00:14:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99458284C9 for <patchwork-linux-mm@patchwork.kernel.org>; Wed, 10 Oct 2018 00:14:38 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D7ADE6B028F; Tue, 9 Oct 2018 20:14:36 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D33D96B0290; Tue, 9 Oct 2018 20:14:36 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BC9156B0291; Tue, 9 Oct 2018 20:14:36 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by kanga.kvack.org (Postfix) with ESMTP id 77A556B028F for <linux-mm@kvack.org>; Tue, 9 Oct 2018 20:14:36 -0400 (EDT) Received: by mail-pf1-f199.google.com with SMTP id i76-v6so3232233pfk.14 for <linux-mm@kvack.org>; Tue, 09 Oct 2018 17:14:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:subject:from:to:cc:date :message-id:in-reply-to:references:user-agent:mime-version :content-transfer-encoding; bh=Icc+JrsLPRZVtCMs/wn62urfmv9Yq+ib7pEnkq7mY+Y=; b=ObGh4nAIditTZgkkjl7VIo0pMSka93y96Bbqi5DO4nFEc3jEx7FjKoLGIuEHRNLF+K u++XJZ3U+SeusfWHvM+d+PdB5phTnD+SRCa/2o/+Jxu+kpKnVZETcQrJnMwWsNZwHyQ0 oHB6hwTW68odOJuwVAvNJ+9P09iGsC3lyPAr9ZJUXM+qVw7+6tChesXYHulX+ElhVkgr z1be8KixT6CE1pb1mE7K6s7LD56wsxaMnjJ0edRkYcFvc1ptcCeClk4gW98fZUi5riLh FRRzFMjRz5OoOy4zq0+D0wmTWhz8YcPJQTU6e56LhiawzY59PSJ+kYtPjsM8yfpBoOd9 fcTw== X-Gm-Message-State: ABuFfojfSry+RHNARqMm8wu1mOigUT3A2cZp83pbFGVCVTjeS1rfN462 9JGDFmCrx1N3U5FDCRBdR5V6J+Nn7Wn4Z9s02IluIcpNFOEitLSzakxJgGLxYWdEKFmVw+MFNJD PbGCaieYJjhJPl4vpU+5rfJd/DwaJyM4Oz2ttJZ8A37d13DnPhkoES+92eMRNlo2SKQ== X-Received: by 2002:a17:902:f01:: with SMTP id 1-v6mr30790846ply.8.1539130476176; Tue, 09 Oct 2018 17:14:36 -0700 (PDT) X-Google-Smtp-Source: ACcGV63Wsfhm3N6A2kpOgcP4XPAPRdXbF2HgYxbGBeBWLz2p1A/XyJ9pf7g3uIPWGU02ak0AyMys X-Received: by 2002:a17:902:f01:: with SMTP id 1-v6mr30790806ply.8.1539130475579; Tue, 09 Oct 2018 17:14:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539130475; cv=none; d=google.com; s=arc-20160816; b=txxY4Qj0bLAACG5GZ/HeKic4iOLZVFrm7gq65Cs7tdBDUeUb69PzkQY6tNbeKeLRxs 8ZOYlSRYiKPawuGcv4SETBZoGnNmWfFumQM7RL+hnpQt2x0VPcn9eT3lYuGIj5kupQcD 4xztK7zPIm8CV729dNVxSICxR27cNZY2ZVpsDBabr9SBCp/XsddhWaTnpeJ+Mrq3rDuS sRBXDpv547CXuBBz3X1CFgl5kwACaaxM/0kPizpksIfovmCcjz8XgcGy23zU90KZNscf p3G/JAdEP0Iv2Kk9lkbY2BgXi2YvHLRTCgDz6c72bAt3oN/SWLUFjd9Rw8c7u4hrBq14 Jt1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:message-id:date:cc:to:from:subject:dkim-signature; bh=Icc+JrsLPRZVtCMs/wn62urfmv9Yq+ib7pEnkq7mY+Y=; b=XFGsa0PXaCYO3d7fcSQyvbhN9HAytqDmhKw6d+ZvORbJoY28JiRATWM25ynav59wxj v8XUzvVjXuM5LPhQYsacpI3sFDmTM9c6Ia7t9axGJt+j+M0f1NM3vVGE+siUiVBCoWH2 lZOX4pc+LMqK73/rljsyEb4LlXAa18f3izTzVz+LTJFQhdIL5MqHj+0Qxp6FKA83ZZlw i5/6/4y2FFKA3k6z1KqWOdAVvjE9dJRKQgOUNCpKipLg0g9CsGDUyBGGn3QLIaHZ0aNN DxlERJyYaiSDaeb9bTMYc1xAyKeNnXMDDTqYS+PQUYePLRvwqAvvdx8YcGqqHppyAu8R TOKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b="sj0/q1R+"; spf=pass (google.com: domain of darrick.wong@oracle.com designates 156.151.31.85 as permitted sender) smtp.mailfrom=darrick.wong@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from userp2120.oracle.com (userp2120.oracle.com. [156.151.31.85]) by mx.google.com with ESMTPS id l9-v6si23208097pfi.179.2018.10.09.17.14.35 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Oct 2018 17:14:35 -0700 (PDT) Received-SPF: pass (google.com: domain of darrick.wong@oracle.com designates 156.151.31.85 as permitted sender) client-ip=156.151.31.85; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b="sj0/q1R+"; spf=pass (google.com: domain of darrick.wong@oracle.com designates 156.151.31.85 as permitted sender) smtp.mailfrom=darrick.wong@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9A0DqkA086521; Wed, 10 Oct 2018 00:14:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=Icc+JrsLPRZVtCMs/wn62urfmv9Yq+ib7pEnkq7mY+Y=; b=sj0/q1R+kRa+FPhQ+pFYjxffHMcLA+Cllcu/sqI5DIyAK3T5Br7rj5K5cWgnRpW8bEzb f6wk8ICnAAU71CNsjeJq7h3TXJb+JFLtG2VuULDBtS4ATeJMFkMxWyjrwyKDUGRi7R9L 909vQpoOuPiE1DFrP5UTdg+BKjBy/BozIgVP3+tRzMYVee49ZpB10x9RDeyRcHB2Wy2H 6qrZ1yJLFiXnND4K6FGLot55pOUu6Iig2I8ldDJ/DxpAG1Fm7lenleNgVc8xgFNWdXul CIzvVIuheeVAJkPBsgcbR1/Y9xfwkJeGqBX15K9iKt3+241VrpY9eH2/syPLQEww+Qec ag== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2mxnpr0pa0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Oct 2018 00:14:34 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9A0EYB4016267 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Oct 2018 00:14:34 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9A0EXwY022053; Wed, 10 Oct 2018 00:14:33 GMT Received: from localhost (/10.159.249.114) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 10 Oct 2018 00:14:32 +0000 Subject: [PATCH 22/25] ocfs2: fix pagecache truncation prior to reflink From: "Darrick J. Wong" <darrick.wong@oracle.com> To: david@fromorbit.com, darrick.wong@oracle.com Cc: sandeen@redhat.com, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, ocfs2-devel@oss.oracle.com Date: Tue, 09 Oct 2018 17:14:31 -0700 Message-ID: <153913047133.32295.149030337934464712.stgit@magnolia> In-Reply-To: <153913023835.32295.13962696655740190941.stgit@magnolia> References: <153913023835.32295.13962696655740190941.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9041 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=902 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810100001 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
fs: fixes for serious clone/dedupe problems
|
expand
|
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 851ba3ae7ce8..b9e0418a1974 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c @@ -4870,8 +4870,9 @@ int ocfs2_reflink_remap_range(struct file *file_in, SINGLE_DEPTH_NESTING); /* Zap any page cache for the destination file's range. */ - truncate_inode_pages_range(&inode_out->i_data, pos_out, - PAGE_ALIGN(pos_out + len) - 1); + truncate_inode_pages_range(&inode_out->i_data, + round_down(pos_out, PAGE_SIZE), + round_up(pos_out + len, PAGE_SIZE) - 1); ret = ocfs2_reflink_remap_blocks(inode_in, in_bh, pos_in, inode_out, out_bh, pos_out, len);