Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp7005375ybh; Thu, 8 Aug 2019 08:52:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxa1ZARvVM0+nG8Y1rabJjo8hGZmwu1/S4xBt5talyG3ixtua7ROkXkmTz6sIi+mlanhh3q X-Received: by 2002:a65:6850:: with SMTP id q16mr13686793pgt.423.1565279523179; Thu, 08 Aug 2019 08:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565279523; cv=none; d=google.com; s=arc-20160816; b=HFkwegNp3kwaXK/lnxtC1VET1k8HPrRaxil5zaRGZ1QFuoEszRiHRPTWEE/g19CwNS ZLRV65zpvE+Igaz+svSG7v3tH5DEPoCAzz4+P3tGfPSCrypzYVUcFuO9Mq77snJXOFI+ k6wtIvKMivCk9c2E9iW+ZB7Odq+OwGAu9H6BdK8QGAN2K5XNgEOe6e+I08ZF7ZrnSbTm THq7VArOG4BT67ChXI34idt8Yab7euXfAV/Ladu20noNpfSzZs8BWsO+Ujlu//F2okpm DCg83AEpItMpUvEFTFhShh/2ONcdFL8WXrdyZQb4p//3KdveIfakpNgOi5R/kv6EemMB vRhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=25slEUORc1b8wFyaFEUlCkdtgL302G1wNVCuMvoTvmk=; b=J9WqPRbT1GAQ0QTTRkcJ9uLgPSh1HSHWSUc6Na3dR6nt6XjbOXQwWpLCFlDk8pmDwC a606pFfW3kzHNMEKGp/GZE5KFJI6zRtRANaszH2XzH/TZ3ffF5rgWxZ/gCaEN6mL1/xt V5Jq4f0fKWxBUd892vrjlzEuYchrx7xxRl+JyFbmOxMFH6Ly0xk67dd8C5coFaQuLGOf Mo5viqkBTqMN3LEcOMwabNalPo2tkxxRg09wT7UMd80TY54mH/gKkfHSQF0MCLRI2b0G o7gob4moY2Mab3KHW2f7v/RM8bIy6mP1snj2dsG9D1UNrC8vUDGJDhqrkArmta9mdfVG TPPg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o70si50321564pgo.280.2019.08.08.08.51.36; Thu, 08 Aug 2019 08:52:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732845AbfHHPut (ORCPT + 99 others); Thu, 8 Aug 2019 11:50:49 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:36971 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728380AbfHHPus (ORCPT ); Thu, 8 Aug 2019 11:50:48 -0400 Received: from callcc.thunk.org (guestnat-104-133-0-107.corp.google.com [104.133.0.107] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x78FofOW028778 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 8 Aug 2019 11:50:42 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id DFC084218EF; Thu, 8 Aug 2019 11:50:40 -0400 (EDT) Date: Thu, 8 Aug 2019 11:50:40 -0400 From: "Theodore Y. Ts'o" To: Chandan Rajendra Cc: linux-ext4@vger.kernel.org, adilger.kernel@dilger.ca, harish@linux.ibm.com, jack@suse.cz Subject: Re: [PATCH V2] jbd2: flush_descriptor(): Do not decrease buffer head's ref count Message-ID: <20190808155040.GF3340@mit.edu> References: <20190805040800.31743-1-chandan@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190805040800.31743-1-chandan@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Aug 05, 2019 at 09:38:00AM +0530, Chandan Rajendra wrote: > When executing generic/388 on a ppc64le machine, we notice the following > call trace, > > VFS: brelse: Trying to free free buffer > WARNING: CPU: 0 PID: 6637 at /root/repos/linux/fs/buffer.c:1195 __brelse+0x84/0xc0 > > Call Trace: > __brelse+0x80/0xc0 (unreliable) > invalidate_bh_lru+0x78/0xc0 > on_each_cpu_mask+0xa8/0x130 > on_each_cpu_cond_mask+0x130/0x170 > invalidate_bh_lrus+0x44/0x60 > invalidate_bdev+0x38/0x70 > ext4_put_super+0x294/0x560 > generic_shutdown_super+0xb0/0x170 > kill_block_super+0x38/0xb0 > deactivate_locked_super+0xa4/0xf0 > cleanup_mnt+0x164/0x1d0 > task_work_run+0x110/0x160 > do_notify_resume+0x414/0x460 > ret_from_except_lite+0x70/0x74 > > The warning happens because flush_descriptor() drops bh reference it > does not own. The bh reference acquired by > jbd2_journal_get_descriptor_buffer() is owned by the log_bufs list and > gets released when this list is processed. The reference for doing IO is > only acquired in write_dirty_buffer() later in flush_descriptor(). > > Reported-by: Harish Sriram > Reviewed-by: Jan Kara > Signed-off-by: Chandan Rajendra Thanks, applied. - Ted