From patchwork Wed Dec 5 09:17:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Maiolino X-Patchwork-Id: 10713411 Return-Path: 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 801241057 for ; Wed, 5 Dec 2018 09:18:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 708972BE54 for ; Wed, 5 Dec 2018 09:18:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 64E7A2CD12; Wed, 5 Dec 2018 09:18:07 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07C0B2BE54 for ; Wed, 5 Dec 2018 09:18:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727182AbeLEJSG (ORCPT ); Wed, 5 Dec 2018 04:18:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59880 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727084AbeLEJSG (ORCPT ); Wed, 5 Dec 2018 04:18:06 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A1AE316972C; Wed, 5 Dec 2018 09:18:05 +0000 (UTC) Received: from hades.usersys.redhat.com (unknown [10.43.17.43]) by smtp.corp.redhat.com (Postfix) with ESMTP id 775025D967; Wed, 5 Dec 2018 09:18:04 +0000 (UTC) From: Carlos Maiolino To: linux-fsdevel@vger.kernel.org Cc: hch@lst.de, adilger@dilger.ca, sandeen@redhat.com, david@fromorbit.com Subject: [PATCH 06/10] iomap: Remove length and start fields from iomap_fiemap Date: Wed, 5 Dec 2018 10:17:24 +0100 Message-Id: <20181205091728.29903-7-cmaiolino@redhat.com> In-Reply-To: <20181205091728.29903-1-cmaiolino@redhat.com> References: <20181205091728.29903-1-cmaiolino@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 05 Dec 2018 09:18:05 +0000 (UTC) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP fiemap_extent_info now embeds start and length parameters, users of iomap_fiemap() doesn't need to pass it individually anymore. Signed-off-by: Carlos Maiolino Reviewed-by: Christoph Hellwig --- fs/gfs2/inode.c | 4 +--- fs/iomap.c | 4 +++- fs/xfs/xfs_iops.c | 8 ++------ include/linux/iomap.h | 2 +- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index 9669ad6224da..f728f00c9998 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c @@ -2006,8 +2006,6 @@ static int gfs2_getattr(const struct path *path, struct kstat *stat, static int gfs2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo) { - u64 start = fieinfo->fi_start; - u64 len = fieinfo->fi_len; struct gfs2_inode *ip = GFS2_I(inode); struct gfs2_holder gh; int ret; @@ -2018,7 +2016,7 @@ static int gfs2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo) if (ret) goto out; - ret = iomap_fiemap(inode, fieinfo, start, len, &gfs2_iomap_ops); + ret = iomap_fiemap(inode, fieinfo, &gfs2_iomap_ops); gfs2_glock_dq_uninit(&gh); diff --git a/fs/iomap.c b/fs/iomap.c index b0462b363bad..64cee9b6f133 100644 --- a/fs/iomap.c +++ b/fs/iomap.c @@ -1156,9 +1156,11 @@ iomap_fiemap_actor(struct inode *inode, loff_t pos, loff_t length, void *data, } int iomap_fiemap(struct inode *inode, struct fiemap_extent_info *fi, - loff_t start, loff_t len, const struct iomap_ops *ops) + const struct iomap_ops *ops) { struct fiemap_ctx ctx; + loff_t start = fi->fi_start; + loff_t len = fi->fi_len; loff_t ret; memset(&ctx, 0, sizeof(ctx)); diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index 1040e8346286..2b04f69c2c58 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -1095,18 +1095,14 @@ xfs_vn_fiemap( struct inode *inode, struct fiemap_extent_info *fieinfo) { - u64 start = fieinfo->fi_start; - u64 length = fieinfo->fi_len; int error; xfs_ilock(XFS_I(inode), XFS_IOLOCK_SHARED); if (fieinfo->fi_flags & FIEMAP_FLAG_XATTR) { fieinfo->fi_flags &= ~FIEMAP_FLAG_XATTR; - error = iomap_fiemap(inode, fieinfo, start, length, - &xfs_xattr_iomap_ops); + error = iomap_fiemap(inode, fieinfo, &xfs_xattr_iomap_ops); } else { - error = iomap_fiemap(inode, fieinfo, start, length, - &xfs_iomap_ops); + error = iomap_fiemap(inode, fieinfo, &xfs_iomap_ops); } xfs_iunlock(XFS_I(inode), XFS_IOLOCK_SHARED); diff --git a/include/linux/iomap.h b/include/linux/iomap.h index 9a4258154b25..c2b5542694a2 100644 --- a/include/linux/iomap.h +++ b/include/linux/iomap.h @@ -145,7 +145,7 @@ int iomap_truncate_page(struct inode *inode, loff_t pos, bool *did_zero, vm_fault_t iomap_page_mkwrite(struct vm_fault *vmf, const struct iomap_ops *ops); int iomap_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, - loff_t start, loff_t len, const struct iomap_ops *ops); + const struct iomap_ops *ops); loff_t iomap_seek_hole(struct inode *inode, loff_t offset, const struct iomap_ops *ops); loff_t iomap_seek_data(struct inode *inode, loff_t offset,