From patchwork Fri Feb 17 14:42:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 9580035 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 C97F5600F6 for ; Fri, 17 Feb 2017 14:46:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9C1F286F4 for ; Fri, 17 Feb 2017 14:46:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AEBE3286F6; Fri, 17 Feb 2017 14:46:10 +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 5EA4B286F4 for ; Fri, 17 Feb 2017 14:46:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934242AbdBQOqI (ORCPT ); Fri, 17 Feb 2017 09:46:08 -0500 Received: from mail-wr0-f196.google.com ([209.85.128.196]:34693 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934300AbdBQOnt (ORCPT ); Fri, 17 Feb 2017 09:43:49 -0500 Received: by mail-wr0-f196.google.com with SMTP id c4so5515731wrd.1 for ; Fri, 17 Feb 2017 06:43:49 -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=CGX5KcMgR1YdF1MLsyzZuWPMSzLWCC5xeyklbJilCV4=; b=cv6hmp4E2OJh8Z9JWsmjmTsnXCl5LDo3jmJe9mNWzJbQhHG3pTEDzM17j7d382IzUH 70SbqPutILodXYXKoSjiJn4ntK0w14SQvaes3svtN6z89BSLvty9JWg5ZSAQjsWZrugE 4W/NPLkCIO3uOB1Si/hCk14EZ8Lv6NbEKA/sr3K4UD/1OfIvpIg2Dfw9qPC9jqKFHu3H Tv5Z6vPLRUtlmUr232HuzvUmqTw1Gccy5iuqQGM5Th8p6qICXp8MLnnclkUEm4HjWGv6 u8l2U46/DfPPhWLZYEdHX2YKngB7ngZWYrjyKJVhEk/symQ5LuaEResZqIlUr7b+i1Np tSVg== 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=CGX5KcMgR1YdF1MLsyzZuWPMSzLWCC5xeyklbJilCV4=; b=kplC+QRKl8e2mo4syR30q1q7OG4ZLfvLK8yhULUzDEurW8GSENOhgoseolCAYmlaqw GwpkbpkShzyytMRbOW8R+DT2nc55vBXGEIShaSqMNcNVJMIytlO2pFjMcdSqI8Zg13Kj wHGTx7OYoGe5NXnCpT5XWawrDP/z2AuqYVpWq8U/NIbofWH1giQ889PmuXhFqBDuYx1w 2OQubkbiQSBZnStiCmqXKHGl0Vx8TTi1eeV3bByiL8U9Cvn/sVD98kDSQuYK6aWgCkqr phNTMOCGiuKQcadRIzZFHe275EjMvxqoGDhW78eywLxzVlNRCL9gmLC1NQkl8A5Bc295 WeVQ== X-Gm-Message-State: AMke39n4x7UW91PIwpW/ZnQv+3qb0g3Len3+ha+onBGQ46dE3Wuznbjn7g3zHM5o1+CnXg== X-Received: by 10.223.162.133 with SMTP id s5mr7394188wra.149.1487342628554; Fri, 17 Feb 2017 06:43:48 -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.43.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 17 Feb 2017 06:43:48 -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 01/38] btrfs: Make btrfs_log_all_parents take btrfs_inode Date: Fri, 17 Feb 2017 16:42:52 +0200 Message-Id: <1487342609-20652-2-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/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 3cc972330ab3..a92a73139065 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -5292,15 +5292,15 @@ static int log_new_dir_dentries(struct btrfs_trans_handle *trans, } static int btrfs_log_all_parents(struct btrfs_trans_handle *trans, - struct inode *inode, + struct btrfs_inode *inode, struct btrfs_log_ctx *ctx) { - struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); + struct btrfs_fs_info *fs_info = btrfs_sb(inode->vfs_inode.i_sb); int ret; struct btrfs_path *path; struct btrfs_key key; - struct btrfs_root *root = BTRFS_I(inode)->root; - const u64 ino = btrfs_ino(BTRFS_I(inode)); + struct btrfs_root *root = inode->root; + const u64 ino = btrfs_ino(inode); path = btrfs_alloc_path(); if (!path) @@ -5511,7 +5511,7 @@ static int btrfs_log_inode_parent(struct btrfs_trans_handle *trans, * and has a link count of 2. */ if (BTRFS_I(inode)->last_unlink_trans > last_committed) { - ret = btrfs_log_all_parents(trans, orig_inode, ctx); + ret = btrfs_log_all_parents(trans, BTRFS_I(orig_inode), ctx); if (ret) goto end_trans; }