From patchwork Fri Feb 17 14:43:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9580001 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 38D0C600F6 for ; Fri, 17 Feb 2017 14:44:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2934A286F3 for ; Fri, 17 Feb 2017 14:44:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E3A5286F5; Fri, 17 Feb 2017 14:44:54 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 A24AF286F3 for ; Fri, 17 Feb 2017 14:44:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933994AbdBQOos (ORCPT ); Fri, 17 Feb 2017 09:44:48 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33533 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934526AbdBQOoU (ORCPT ); Fri, 17 Feb 2017 09:44:20 -0500 Received: by mail-wm0-f66.google.com with SMTP id v77so2937906wmv.0 for ; Fri, 17 Feb 2017 06:44:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Hmd3wD0qyvPVpgkg+G9BqgApMbCaoTS2HSBnFWQURkQ=; b=kV7uHGS93eyakkdUvoIxypu9foFibzQALLiKSb5NyAVuuNdL3oNaAjhKoFKFXHmoLl iCJqRVttqiWOr8EVINH/IZO4HNOoMl1Supr8kJQjSvqqzauN7yvL67GiC9GnPtLPtjoH vmZFFv2xUXhpZQ3SpRkCys3+GlOKz/Wpt8npH07Ec7MWF/ApTY7VkeN9FzBaLWLElx96 q67/1yI0ffvSIPDRLzoxX2mNUztcApX/7rMx9GavdpipW/7B4gtRCniyYPi3o0QoCE3A FmKo3qmER955NSogSjRqshByi8+0af+0LhjlQfOr+eaY723oZA/0WCOC3sJZpLyAJrFG NTjA== 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=Hmd3wD0qyvPVpgkg+G9BqgApMbCaoTS2HSBnFWQURkQ=; b=PweVeAQTEorfUAQpwF9bafA3F9oIfJKWQrYvC5hnGYqOBFm/pv/7EowRpjlzRA6Joq k7hyvUAAVnrnCmDI1CbJkXr6YQrl1xU71WGM+fz9TVyYznisTU0vcgjvZGIgmZzB5mPb hddEfIY410dgDjy6vyqdmKU6nGpYQPiSmVeVOCDMrBH5LNHCe20xjSwMk8yqKx8Bj7q+ ULek3cZwK3wdoDJ52REvrkRhE7u0dyyiSzXDOu1P3JysEkgSvXXi70n1nyGhKPTjwWrj 1Kem2HV56fDL4v76EIfiawBT/3oOg/ytb7r22rETCzXbJ5ErAMy2VyXyMUvsgjaJ4zZ9 EfjQ== X-Gm-Message-State: AMke39l2e5PJqdoHCDoLS0hGnPqefJiPKFloR6A3Mtrj0vkdgXnU6Os47Jj/sSF3wUA+DA== X-Received: by 10.28.66.221 with SMTP id k90mr4196344wmi.90.1487342659512; Fri, 17 Feb 2017 06:44:19 -0800 (PST) Received: from fisk.suse.de (ivokamhome.ddns.nbis.net. [87.120.136.31]) by smtp.gmail.com with ESMTPSA id y126sm1932713wmg.19.2017.02.17.06.44.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Feb 2017 06:44:19 -0800 (PST) From: Nikolay Borisov X-Google-Original-From: Nikolay Borisov To: dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCH 33/38] btrfs: Make btrfs_extent_item_to_extent_map take btrfs_inode Date: Fri, 17 Feb 2017 16:43:24 +0200 Message-Id: <1487342609-20652-34-git-send-email-nborisov@suse.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1487342609-20652-1-git-send-email-nborisov@suse.com> References: <1487342609-20652-1-git-send-email-nborisov@suse.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nikolay Borisov --- fs/btrfs/ctree.h | 2 +- fs/btrfs/file-item.c | 9 ++++----- fs/btrfs/inode.c | 2 +- fs/btrfs/ioctl.c | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index cfa63b13d247..d44d414a2127 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -3081,7 +3081,7 @@ int btrfs_csum_one_bio(struct inode *inode, struct bio *bio, u64 file_start, int contig); int btrfs_lookup_csums_range(struct btrfs_root *root, u64 start, u64 end, struct list_head *list, int search_commit); -void btrfs_extent_item_to_extent_map(struct inode *inode, +void btrfs_extent_item_to_extent_map(struct btrfs_inode *inode, const struct btrfs_path *path, struct btrfs_file_extent_item *fi, const bool new_inline, diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 71ed7f051685..640341ab692c 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c @@ -930,14 +930,14 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans, goto out; } -void btrfs_extent_item_to_extent_map(struct inode *inode, +void btrfs_extent_item_to_extent_map(struct btrfs_inode *inode, const struct btrfs_path *path, struct btrfs_file_extent_item *fi, const bool new_inline, struct extent_map *em) { - struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); - struct btrfs_root *root = BTRFS_I(inode)->root; + struct btrfs_fs_info *fs_info = btrfs_sb(inode->vfs_inode.i_sb); + struct btrfs_root *root = inode->root; struct extent_buffer *leaf = path->nodes[0]; const int slot = path->slots[0]; struct btrfs_key key; @@ -1003,7 +1003,6 @@ void btrfs_extent_item_to_extent_map(struct inode *inode, } else { btrfs_err(fs_info, "unknown file extent item type %d, inode %llu, offset %llu, root %llu", - type, btrfs_ino(BTRFS_I(inode)), extent_start, - root->root_key.objectid); + type, btrfs_ino(inode), extent_start, root->root_key.objectid); } } diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 1bf7d10e15bd..5545a49a3396 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6853,7 +6853,7 @@ struct extent_map *btrfs_get_extent(struct inode *inode, struct page *page, goto not_found_em; } - btrfs_extent_item_to_extent_map(inode, path, item, new_inline, em); + btrfs_extent_item_to_extent_map(BTRFS_I(inode), path, item, new_inline, em); if (found_type == BTRFS_FILE_EXTENT_REG || found_type == BTRFS_FILE_EXTENT_PREALLOC) { diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9f712207a7db..f907853e1c47 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -3323,7 +3323,7 @@ static void clone_update_extent_map(struct inode *inode, fi = btrfs_item_ptr(path->nodes[0], path->slots[0], struct btrfs_file_extent_item); - btrfs_extent_item_to_extent_map(inode, path, fi, false, em); + btrfs_extent_item_to_extent_map(BTRFS_I(inode), path, fi, false, em); em->generation = -1; if (btrfs_file_extent_type(path->nodes[0], fi) == BTRFS_FILE_EXTENT_INLINE)