From patchwork Thu Oct 22 22:23:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11851971 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A433D14B2 for ; Thu, 22 Oct 2020 22:24:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2600A24654 for ; Thu, 22 Oct 2020 22:24:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="lAefka8i" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2600A24654 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 20CC56B005D; Thu, 22 Oct 2020 18:24:02 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 1950F6B0062; Thu, 22 Oct 2020 18:24:02 -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 05BB26B0068; Thu, 22 Oct 2020 18:24:01 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0173.hostedemail.com [216.40.44.173]) by kanga.kvack.org (Postfix) with ESMTP id C39866B005D for ; Thu, 22 Oct 2020 18:24:01 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 5EA768B6AA26 for ; Thu, 22 Oct 2020 22:24:01 +0000 (UTC) X-FDA: 77400990282.08.stew26_5d13ef727254 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 29EB31819E772 for ; Thu, 22 Oct 2020 22:24:01 +0000 (UTC) X-Spam-Summary: 1,0,0,c7248e3103dba494,d41d8cd98f00b204,djwong@kernel.org,,RULES_HIT:41:69:355:379:421:967:973:988:989:1260:1277:1312:1313:1314:1345:1437:1516:1518:1519:1534:1542:1593:1594:1595:1596:1711:1730:1747:1777:1792:1981:2194:2198:2199:2200:2393:2525:2538:2559:2563:2682:2685:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3872:3873:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4605:5007:6261:6653:7875:7903:9025:10004:10400:10450:10455:10967:11026:11232:11473:11658:11914:12043:12050:12291:12296:12297:12438:12517:12519:12555:12679:12683:12740:12895:12986:13071:13161:13229:13439:13895:14096:14097:14180:14181:14721:14819:19904:19999:21060:21067:21080:21627:21740:21749:21811:30012:30054:30055:30067:30079,0,RBL:198.145.29.99:@kernel.org:.lbl8.mailshell.net-62.2.0.100 64.100.201.201;04y89mekqirkzakrw1ucgddhru9a5oc7gaf7sx61q3rt4jp5ps7yddj1j831as9.g4tm5bk6kj9qrwgwyswqwbh5peoz515cbd65p7s5t4fwwkfw7jfht7a 7zkh5i49 X-HE-Tag: stew26_5d13ef727254 X-Filterd-Recvd-Size: 3670 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf12.hostedemail.com (Postfix) with ESMTP for ; Thu, 22 Oct 2020 22:24:00 +0000 (UTC) Received: from localhost (c-67-169-218-210.hsd1.or.comcast.net [67.169.218.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 96C8F24631; Thu, 22 Oct 2020 22:23:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603405439; bh=GEmg9HIaeQ5bKfcJYYGD6ds4B2O3J6S3lkr6Gq69238=; h=Date:From:To:Cc:Subject:From; b=lAefka8i/isTAxOCCGr+hmtfTRZDgtMeSX0JEE3RLqrEsPURrRh4ZCPwzb6T6HHkD n9K/SKWgckh+MEZQJEzsJRK51uLxc1baC56YPLobDDt0ujf2n66GoWwX3E4xFpPYXg ZELdMIwwVEwa2fkYGMbaPR9EIJ4wRnmcnnc1k+eg= Date: Thu, 22 Oct 2020 15:23:58 -0700 From: "Darrick J. Wong" To: Linus Torvalds Cc: "Darrick J. Wong" , linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] vfs: move the clone/dedupe/remap helpers to a single file Message-ID: <20201022222358.GD9825@magnolia> MIME-Version: 1.0 Content-Disposition: inline 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: Hi Linus, Please pull this small refactoring series that moves all the support functions for file range remapping (aka reflink and dedupe) out of mm/filemap.c and fs/read_write.c and into fs/remap_range.c. It's been a full week since the initial discussion[1] on fsdevel, and in that time, nobody has complained about breakage in for-next, and the relevant parts of the codebase haven't changed significantly. I was expecting to have to rebase this branch, but aside from the trivial merge conflict in fs/Makefile this actually still applies cleanly atop master as of a couple hours ago. (FWIW I took your suggestion about license headers and didn't drag the copyright notices along from the other two files.) So, I tagged my work branch from last week a little while ago and am now sending this for consideration. Please let me know if you have any complaints about pulling this, since I can rework the branch. --D [1] https://lore.kernel.org/linux-fsdevel/160272187483.913987.4254237066433242737.stgit@magnolia/ The following changes since commit bbf5c979011a099af5dc76498918ed7df445635b: Linux 5.9 (2020-10-11 14:15:50 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git tags/vfs-5.10-merge-1 for you to fetch changes up to 407e9c63ee571f44a2dfb0828fc30daa02abb6dc: vfs: move the generic write and copy checks out of mm (2020-10-15 09:50:01 -0700) ---------------------------------------------------------------- Refactored code for 5.10: - Move the file range remap generic functions out of mm/filemap.c and fs/read_write.c and into fs/remap_range.c to reduce clutter in the first two files. ---------------------------------------------------------------- Darrick J. Wong (3): vfs: move generic_remap_checks out of mm vfs: move the remap range helpers to remap_range.c vfs: move the generic write and copy checks out of mm fs/Makefile | 3 +- fs/read_write.c | 562 +++++++++++----------------------------------------- fs/remap_range.c | 571 +++++++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/fs.h | 8 +- mm/filemap.c | 222 --------------------- 5 files changed, 691 insertions(+), 675 deletions(-) create mode 100644 fs/remap_range.c