From patchwork Thu Jan 12 14:00:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9513289 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 68B2260710 for ; Thu, 12 Jan 2017 14:02:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56CF3286D4 for ; Thu, 12 Jan 2017 14:02:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48523286DA; Thu, 12 Jan 2017 14:02:15 +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=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,T_DKIM_INVALID autolearn=no 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 51EAE286D4 for ; Thu, 12 Jan 2017 14:02:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751161AbdALOB6 (ORCPT ); Thu, 12 Jan 2017 09:01:58 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:32969 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750998AbdALOBK (ORCPT ); Thu, 12 Jan 2017 09:01:10 -0500 Received: by mail-lf0-f67.google.com with SMTP id k62so1945634lfg.0 for ; Thu, 12 Jan 2017 06:01:09 -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=kpSjVVWfxDXV7ymLPeK8Drt4Uu7iIHyiNTUsjXFgBNU=; b=md7XG0sl0N+fDR7HsEOF9ghNqqYH9pI3e37O3Pi35OIp8tBEHODn26ObhJKVbvOFEd PpUuE9qYEbiVk6f06bFtHRnPRobTdxplfkOztSLvzIicMenzK6aLs/tYORnZhXK05o8i +vwkAf53YTy1uyrjDFBncKHhMpzpurvA0JmJJqBx2+6WLJvkqihFTKJvHZUoVKPQyL2o 4o/DXoPwup494pk0VP+bwpAc9CoReKfZx9jVuSg5kJY+2Cpj+DBI2DkPw5Zy/ByHkE9o 4tULDZC62UbjABgXnaU3eGi8S0CO81W6uCKswwTQE/sxMgvBqCbdz5/JNFl7kekEd0C9 LT8A== 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=kpSjVVWfxDXV7ymLPeK8Drt4Uu7iIHyiNTUsjXFgBNU=; b=Nlq/TZuNTFlGpzwWdJsWl520EaNvotoEH/UMdx+zShPxAMpbcgDwPE1DkIzIvSDSD6 3mqnds/Zs0c7oa+iZe5zgjimUHL2TsbxxtvBRUjUgJQUvvF+njVPwUZtkQg/2W+Iy4Zh 1AvmZWScHxsYnupxlMJf6Q2803qOQZZaPRI6TvBNk4Qso6gdx68ijkB2SUsnM3WFtUA7 3zwj5cMEEk6zx4bgE7vk5lixHTbADhOHbtBF/FenBYIFuTXJySwq+IlF1w+UOqHXPr+T eayhWFnM1GAaNZUrEqm3sKOkS4Tt2pJDEKglmP/6vmhFrFwn8b+d4Smubs9tqIO4Kc94 E+Yw== X-Gm-Message-State: AIkVDXJIS7oTJI4qAtWqHPj+mFePvjYjAHI4tXwSSAtEaRjRxZB32jwfkRcPPPUhnY3V6g== X-Received: by 10.194.242.101 with SMTP id wp5mr8707454wjc.11.1484229668420; Thu, 12 Jan 2017 06:01:08 -0800 (PST) Received: from fisk.lan (ivokamhome.ddns.nbis.net. [87.120.136.31]) by smtp.gmail.com with ESMTPSA id y145sm725670wmc.17.2017.01.12.06.01.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Jan 2017 06:01:07 -0800 (PST) From: Nikolay Borisov To: dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, Nikolay Borisov Subject: [PATCH 11/24] btrfs: Make btrfs_log_all_xattrs take btrfs_inode Date: Thu, 12 Jan 2017 16:00:37 +0200 Message-Id: <1484229650-24554-12-git-send-email-n.borisov.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484229650-24554-1-git-send-email-n.borisov.lkml@gmail.com> References: <1484229650-24554-1-git-send-email-n.borisov.lkml@gmail.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/tree-log.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 4b0bbe05cdae..4d8726aad7b3 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -4276,13 +4276,13 @@ static int logged_inode_size(struct btrfs_root *log, struct btrfs_inode *inode, */ static int btrfs_log_all_xattrs(struct btrfs_trans_handle *trans, struct btrfs_root *root, - struct inode *inode, + struct btrfs_inode *inode, struct btrfs_path *path, struct btrfs_path *dst_path) { int ret; struct btrfs_key key; - const u64 ino = btrfs_ino(BTRFS_I(inode)); + const u64 ino = btrfs_ino(inode); int ins_nr = 0; int start_slot = 0; @@ -4303,7 +4303,7 @@ static int btrfs_log_all_xattrs(struct btrfs_trans_handle *trans, if (ins_nr > 0) { u64 last_extent = 0; - ret = copy_items(trans, BTRFS_I(inode), dst_path, path, + ret = copy_items(trans, inode, dst_path, path, &last_extent, start_slot, ins_nr, 1, 0); /* can't be 1, extent items aren't processed */ @@ -4333,7 +4333,7 @@ static int btrfs_log_all_xattrs(struct btrfs_trans_handle *trans, if (ins_nr > 0) { u64 last_extent = 0; - ret = copy_items(trans, BTRFS_I(inode), dst_path, path, + ret = copy_items(trans, inode, dst_path, path, &last_extent, start_slot, ins_nr, 1, 0); /* can't be 1, extent items aren't processed */ @@ -4912,7 +4912,7 @@ static int btrfs_log_inode(struct btrfs_trans_handle *trans, btrfs_release_path(path); btrfs_release_path(dst_path); - err = btrfs_log_all_xattrs(trans, root, inode, path, dst_path); + err = btrfs_log_all_xattrs(trans, root, BTRFS_I(inode), path, dst_path); if (err) goto out_unlock; if (max_key.type >= BTRFS_EXTENT_DATA_KEY && !fast_search) {