From patchwork Wed Sep 21 15:36:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 9343749 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 A96CD601C2 for ; Wed, 21 Sep 2016 15:39:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FD312A79F for ; Wed, 21 Sep 2016 15:39:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93CA52A7A1; Wed, 21 Sep 2016 15:39: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=-6.9 required=2.0 tests=BAYES_00,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 9A8D02A79F for ; Wed, 21 Sep 2016 15:39:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936020AbcIUPjB (ORCPT ); Wed, 21 Sep 2016 11:39:01 -0400 Received: from mx2.suse.de ([195.135.220.15]:46320 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936013AbcIUPi7 (ORCPT ); Wed, 21 Sep 2016 11:38:59 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 8F039AB9F for ; Wed, 21 Sep 2016 15:38:57 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 05836DA949; Wed, 21 Sep 2016 17:36:58 +0200 (CEST) Date: Wed, 21 Sep 2016 17:36:58 +0200 From: David Sterba To: jeffm@suse.com Cc: linux-btrfs@vger.kernel.org, David Sterba Subject: Re: [PATCH 4/5] btrfs: convert pr_* to btrfs_* where possible Message-ID: <20160921153658.GK16983@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, jeffm@suse.com, linux-btrfs@vger.kernel.org, David Sterba References: <1474380303-25995-1-git-send-email-jeffm@suse.com> <1474380303-25995-5-git-send-email-jeffm@suse.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1474380303-25995-5-git-send-email-jeffm@suse.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) 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 On Tue, Sep 20, 2016 at 10:05:02AM -0400, jeffm@suse.com wrote: > static struct btrfs_block_group_cache * > diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c > index 6fdc701..c9bb727 100644 > --- a/fs/btrfs/extent_io.c > +++ b/fs/btrfs/extent_io.c > @@ -2186,6 +2187,7 @@ void btrfs_free_io_failure_record(struct inode *inode, u64 start, u64 end) > int btrfs_get_io_failure_record(struct inode *inode, u64 start, u64 end, > struct io_failure_record **failrec_ret) > { > + struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); I get a compiler warning: fs/btrfs/extent_io.c: In function 'btrfs_get_io_failure_record': fs/btrfs/extent_io.c:2191:24: warning: unused variable 'fs_info' [-Wunused-variable] as btrfs_debug is compiled out. The following diff silences the warning for me: --- so to keep the build clean we might need to do some more tweaks. I'll look if I can kill the warning quickly, the remaing are fs/btrfs/send.c: In function 'send_rename': fs/btrfs/send.c:726:24: warning: unused variable 'fs_info' [-Wunused-variable] fs/btrfs/send.c: In function 'send_link': fs/btrfs/send.c:751:24: warning: unused variable 'fs_info' [-Wunused-variable] fs/btrfs/send.c: In function 'send_unlink': fs/btrfs/send.c:775:24: warning: unused variable 'fs_info' [-Wunused-variable] fs/btrfs/send.c: In function 'send_rmdir': fs/btrfs/send.c:798:24: warning: unused variable 'fs_info' [-Wunused-variable] fs/btrfs/send.c: In function 'send_truncate': fs/btrfs/send.c:2425:24: warning: unused variable 'fs_info' [-Wunused-variable] fs/btrfs/send.c: In function 'send_chmod': fs/btrfs/send.c:2455:24: warning: unused variable 'fs_info' [-Wunused-variable] fs/btrfs/send.c: In function 'send_chown': fs/btrfs/send.c:2485:24: warning: unused variable 'fs_info' [-Wunused-variable] fs/btrfs/send.c: In function 'send_utimes': fs/btrfs/send.c:2517:24: warning: unused variable 'fs_info' [-Wunused-variable] fs/btrfs/send.c: In function 'send_create_inode': fs/btrfs/send.c:2580:24: warning: unused variable 'fs_info' [-Wunused-variable] fs/btrfs/send.c: In function 'process_recorded_refs': fs/btrfs/send.c:3646:24: warning: unused variable 'fs_info' [-Wunused-variable] fs/btrfs/send.c: In function 'send_write': fs/btrfs/send.c:4669:24: warning: unused variable 'fs_info' [-Wunused-variable] -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2188,7 +2188,7 @@ void btrfs_free_io_failure_record(struct inode *inode, u64 start, u64 end) int btrfs_get_io_failure_record(struct inode *inode, u64 start, u64 end, struct io_failure_record **failrec_ret) { - struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); + struct btrfs_fs_info *fs_info; struct io_failure_record *failrec; struct extent_map *em; struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; @@ -2197,6 +2197,8 @@ int btrfs_get_io_failure_record(struct inode *inode, u64 start, u64 end, int ret; u64 logical; + fs_info = btrfs_sb(inode->i_sb); + ret = get_state_failrec(failure_tree, start, &failrec); if (ret) { failrec = kzalloc(sizeof(*failrec), GFP_NOFS);