Received: by 10.192.165.148 with SMTP id m20csp2831632imm; Mon, 7 May 2018 01:50:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrSpsNna81I5RkH1hpK9cYVMVUE1sVnn+CmfXI1p7N/Fi8GPRNDVlpYA0OboI9PbyB0NSKD X-Received: by 2002:a17:902:e8:: with SMTP id a95-v6mr37343270pla.274.1525683035466; Mon, 07 May 2018 01:50:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525683035; cv=none; d=google.com; s=arc-20160816; b=o5KIvQRxy/l9CAk0om6OyS2xXtsNglJ8olZF/4utIWnoA3seQ3JogY1fGTNAGmBY0o 5cRvd/LEAMFMKE1Fjsu/Uq1zFXv+uyq/W7AH9w9K3EiscsxMCriF+wk6SEMvIiAkXISt +28uqyiXA1qN86H8Vqx3MXA+PtwsXWhsC5uPNmCQOfUb8dsoQOS5J0lReiwCMaV2Hd8H vMGwaGoeUGLojy4HbkSD8BRllufQy91hu6ZRxpblteB1+8wsla3bIfK2feEYQZlIrV/G Kaf7RZZE9aoOr2g47ORxeRLcmGccJFZplI2gl5ndhyyqOzJmBw46fen1ucZinz5zpjPb zZyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=Os3mJHwZYo2U7MntH/uNj07TV3UhXwq03mgqi7XmDlY=; b=g78Xb0SpKbhC2E0ZVqIu51WiaWW7ipDgfyriPhiJmJS+yqojx6anCJyFesgPmV4rsQ MAHQgEH2KuQmR4ojYFtu2F/K8JL6Td6UnukSyJ8uXtr+kko9xZtdGkAoxWlqcYlzhnz1 d0xHphMtmAjlrzcmNjIAJofJkHnPEFFQeBYMEAdHKCda2+ehX1X5QXKCMJiuAG+F6zNh ghbOwoWOzOKepr3oEEPX9FnGBY72R+aKBgwyStnDKUS8yGE+48/ZNFMmeebWwQ4lyGO8 truGMnhXTcKg8huKMbfEmD0vXHJicGUHQrbGROhu6J1UQbQZjPzP17+72uNwcO96DClX xX0g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 23si2485757pfn.28.2018.05.07.01.50.21; Mon, 07 May 2018 01:50:35 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752579AbeEGIta (ORCPT + 99 others); Mon, 7 May 2018 04:49:30 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:38990 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752079AbeEGIiT (ORCPT ); Mon, 7 May 2018 04:38:19 -0400 Received: by mail-wm0-f65.google.com with SMTP id f8-v6so13829676wmc.4 for ; Mon, 07 May 2018 01:38:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Os3mJHwZYo2U7MntH/uNj07TV3UhXwq03mgqi7XmDlY=; b=uMgLiI9nGC9sL15K3SUCyaT0C7QKx0t7+LBV16z8twrttuHyRalqIRrxwypgx3rrAp h93kYdLEEV/ecFbSR+zXx/mFpQHBucqrFo/rvebplNQikm+28ABWLD2mNgZX3wtjRIB8 8/Y+yX9qIeIpu3NRhOZzDLAhZ9GOAcnzRFLIqz31ReczuELRpwmTOWsw27IQ4iNZ3nhJ zseF9OiaZ6bosm50H0d6rbN7Uou8IsV5eXLw9KOmrdWJIdvz2qVoPmhY3Sn2moypyiug CYVvAz+Xqor/4diORxx6RzzcRjbmWI/a9GHuImT+JFxRShNXF9srDuFsSDr/xfP/DdVi K8eA== X-Gm-Message-State: ALKqPweUET2yC7x2X58crjeU4pqLm3TT8jGLjWYQwwGg1SA6FpaUizkR umoSDq6ZkBlExqclDzjHaPiIyg== X-Received: by 10.28.168.77 with SMTP id r74mr186147wme.114.1525682298367; Mon, 07 May 2018 01:38:18 -0700 (PDT) Received: from veci.piliscsaba.redhat.com (C2B0E321.catv.pool.telekom.hu. [194.176.227.33]) by smtp.gmail.com with ESMTPSA id h8-v6sm5908050wmc.16.2018.05.07.01.38.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 May 2018 01:38:17 -0700 (PDT) From: Miklos Szeredi To: linux-unionfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Al Viro Subject: [PATCH v2 05/35] vfs: export vfs_dedupe_file_range_one() to modules Date: Mon, 7 May 2018 10:37:37 +0200 Message-Id: <20180507083807.28792-6-mszeredi@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180507083807.28792-1-mszeredi@redhat.com> References: <20180507083807.28792-1-mszeredi@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is needed by the stacked dedupe implementation in overlayfs. Signed-off-by: Miklos Szeredi --- fs/read_write.c | 6 +++--- include/linux/fs.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/fs/read_write.c b/fs/read_write.c index 023df230e2a0..08708f903fc5 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -1964,9 +1964,8 @@ int vfs_dedupe_file_range_compare(struct inode *src, loff_t srcoff, } EXPORT_SYMBOL(vfs_dedupe_file_range_compare); -static s64 vfs_dedupe_file_range_one(struct file *src_file, loff_t src_pos, - struct file *dst_file, loff_t dst_pos, - u64 len) +s64 vfs_dedupe_file_range_one(struct file *src_file, loff_t src_pos, + struct file *dst_file, loff_t dst_pos, u64 len) { s64 ret; @@ -2001,6 +2000,7 @@ static s64 vfs_dedupe_file_range_one(struct file *src_file, loff_t src_pos, return ret; } +EXPORT_SYMBOL(vfs_dedupe_file_range_one); int vfs_dedupe_file_range(struct file *file, struct file_dedupe_range *same) { diff --git a/include/linux/fs.h b/include/linux/fs.h index 26685011c4bd..c85a8059f038 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1817,6 +1817,10 @@ extern int vfs_dedupe_file_range_compare(struct inode *src, loff_t srcoff, loff_t len, bool *is_same); extern int vfs_dedupe_file_range(struct file *file, struct file_dedupe_range *same); +extern s64 vfs_dedupe_file_range_one(struct file *src_file, loff_t src_pos, + struct file *dst_file, loff_t dst_pos, + u64 len); + struct super_operations { struct inode *(*alloc_inode)(struct super_block *sb); -- 2.14.3