Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp241933lqo; Thu, 9 May 2024 20:07:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWjGqM01/EfK5aPO+qGJrYdIsC8EZAOhFKEzEfULqT72wglbvwzyihUnSKEuIFMnxF81Jv/ZwBTvpitxrX658+0/1YjHiFh1R4qJxkkwQ== X-Google-Smtp-Source: AGHT+IFF6C/gwgVDHXe5ATH8EG+Fx2+kb2ITuvNUn9hjks5ZTaL8mU6rFiRqLPwm9vl7N6aDleWW X-Received: by 2002:a05:6a00:2410:b0:6f3:ea67:48c3 with SMTP id d2e1a72fcca58-6f4e01b9368mr1470859b3a.0.1715310443693; Thu, 09 May 2024 20:07:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715310443; cv=pass; d=google.com; s=arc-20160816; b=uQPrnKdjfvaPXX8BmkmeQAgI5xkQnN0sthOySomlc3CCucaUVUDTEvi4ZMGniVs5La rByTXKoDFNSRKC4mAVzExe/ftY//MBV2KMq2jOu+1vKl+JmPz0JwPu1INLHoloClSTFw tWAxMYzIdLsYSw7y2nPptJ/SzqSKqeHhn2Nu3R6KhZK66C2IvtgPCxxFJB6mCeQ2dY3J mqgyTarV2EvC2K5tl6YfbpRPHlPw9OPxffpVf/1Ez45UXkQeY1cTdBIE9scLLcfDFwvY 3sLpufSa64iipL3BOO/1bA6ri8Dj1THtNM/kimsKqYyaMA5xSdMs3LWDqEusC3sMlZTq zoSw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pFFaiOKvmV+vo0PVVMiVz0GTsIpZpZQBHjNqBGv0W2Q=; fh=phxo+rPQwF4sva4AsCSyugIcCkqVq37ob1vYSyH0pF0=; b=EJJZMFgMNNfCLoLVePnRVDAX63z4iOPZcwPSkIKB1+LCXBFBTeuEuhnWBAJq4fSd4c YFqsXmWAFJM3HtxqT369e36FouWgnjsyTAuXUimcdm8Y7mUC582aJrsXAPXqCH6hxBe1 UguuZ45Tn9aN6EK13dkKvrsV3kdgvL8gSHwYeg0GI3vqBjiCm2mD9LXXv3zzjuKnZiHb T+dFSAuuWRb5ddPyn7MGYbDtMRXQStaaHlFiLhDPrstZ21q5NKNWfIoCPAO4DF+iKmk9 W7EweGcGNnB5YFgbOtVHeDuiPP1cLhw2NYUyXdHqO3c6rjhOLC772K5CxaFe4t3inpCU CkIA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=D2+A3yFI; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-175230-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175230-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2a97abbsi2742688b3a.142.2024.05.09.20.07.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 20:07:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175230-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=D2+A3yFI; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-175230-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175230-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F0AD4281920 for ; Fri, 10 May 2024 03:07:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9BE01148858; Fri, 10 May 2024 03:07:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="D2+A3yFI" Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 729BD14882B; Fri, 10 May 2024 03:07:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715310436; cv=none; b=aQ2x18ccNVyo/N09ZktGPxEbHlAtY9nV7L20KZE/2LLeqP455cK7nr34VetZrZhWBsMP5Pnx3CAaU5SmL/brfDGLj4Ol0AyZ/c1JfmZY0+4ZIHAlfVnkIbXjUu289Rf0t+i6P3viqtWVguNEzieEGPiX852KLhIgq3LLfZ27b+c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715310436; c=relaxed/simple; bh=Na5tJlHqz8QEgBdxLiHuZ0FJpnvP58ur8r7XWRE/Hhc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=l79XiEQMigiYbUWj5JxgQZI/G1x1NDjBWQ85k+RfvnL+zi++fLASKs0VJaQIu1szYVVl/+/bk+i+MVVbozIzcK9C3Nv8byEABigk5Cyq1YIrrqb/b+v49OvvcB1HoS5CZr9sbYI8DrFUtkTNft7xTmKqFrBcqp5TmeiyfHP9o/A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=D2+A3yFI; arc=none smtp.client-ip=209.85.216.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-2ab48c14334so414930a91.3; Thu, 09 May 2024 20:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715310435; x=1715915235; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=pFFaiOKvmV+vo0PVVMiVz0GTsIpZpZQBHjNqBGv0W2Q=; b=D2+A3yFI3zJRwSEphmJh+486G9tGZBara1PJpuM3o7VX23mdqgRc3qdRDJ3lAss1DY 98IBW/mhgpNcxiT76zVwpTTinrvFLcBo2E+61GZRfxTI9fqfoSVO/zliZQUywcmoBgPi M0SzFE1fFz+hUhWnFWmZXgexBv/fLTpc7RYbDEas31vig7bJnBup8OK6SrjqqUajODtO /OnQn+AMjhWPVAyZDTJuHcdTyn0HqfkD6ILWBs2RnrDotxmvATseNwgXJ/K74baZ2SE6 Cin+c+LQo+ftQ79eiGQUHeNdJCgSez00/xVve/JsX7LSDYYgpD+yETrGJbhobBnN5Px0 SrLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715310435; x=1715915235; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pFFaiOKvmV+vo0PVVMiVz0GTsIpZpZQBHjNqBGv0W2Q=; b=de7ZMRvLGrCXxuGZTuMn2iqDmCL+IJJ0QErqprRmxdPTTW+Z7jt8yh1Ksig8GGkd98 POZodwVao4MqDGRrevoAx/3w22f47A1SCKu7uJqDj7wHVKeZxdhzY8MJkN/HyZfmXh2+ 2tcbAfXaCVchV/OgGW+R/wg+jVe7b2gW+3aWISb2x4OMKiCV5K+mqrWLMsoAhBAwwVQf BwYqWVyNZMYPTDHKIyKe9oe2udzGUGCnKbHt0GU8wYHteICGGTBMdo5N0k609aY0MubI uzkpePz0BVParXNlCvUVp6ENLcBJP1gHYEd6/xDP1JLfkCjXrTRTkKqK7EQGq7Oos/du 1WTw== X-Forwarded-Encrypted: i=1; AJvYcCWk0DCT88iHBAJmsKDHbSb604KJ2A4f3wBLWNUk2jViurEovIYyWGdHgl08IB7qj5r1aBEigdvywq/NG3YTh2KZ0A9YDCopcX6o+HL7Cb9xTWh0YkIl3WikmylRPzPYRul/03GDn+d1ig== X-Gm-Message-State: AOJu0Yw4fC4v7hSJsxQcWzAIc6BNgpkryQR2ENbL52yg7IT5gHOnJ1Id 1XkbUJQe/p8NLOfetISEtYxjLRM7vjTWbHxqg7DObIO66gLo1W4K X-Received: by 2002:a17:902:da8f:b0:1eb:2e59:d6a with SMTP id d9443c01a7336-1ef44049772mr16873055ad.3.1715310434774; Thu, 09 May 2024 20:07:14 -0700 (PDT) Received: from visitorckw-System-Product-Name ([140.113.216.168]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0bf30b0csm21558645ad.176.2024.05.09.20.07.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 20:07:14 -0700 (PDT) Date: Fri, 10 May 2024 11:07:11 +0800 From: Kuan-Wei Chiu To: Kent Overstreet Cc: Coly Li , Linux Kernel Mailing List , Linux Next Mailing List , Matthew Mirvish Subject: Re: linux-next: manual merge of the refactor-heap tree with the block tree Message-ID: References: <20240509152745.08af752f@canb.auug.org.au> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, May 09, 2024 at 07:16:31PM -0400, Kent Overstreet wrote: > On Fri, May 10, 2024 at 06:44:29AM +0800, Kuan-Wei Chiu wrote: > > On Thu, May 09, 2024 at 03:58:57PM -0400, Kent Overstreet wrote: > > > On Thu, May 09, 2024 at 03:27:45PM +1000, Stephen Rothwell wrote: > > > > Hi all, > > > > > > > > Today's linux-next merge of the refactor-heap tree got conflicts in: > > > > > > > > drivers/md/bcache/bset.c > > > > drivers/md/bcache/bset.h > > > > drivers/md/bcache/btree.c > > > > drivers/md/bcache/writeback.c > > > > > > > > between commit: > > > > > > > > 3a861560ccb3 ("bcache: fix variable length array abuse in btree_iter") > > > > > > > > from the block tree and commit: > > > > > > > > afa5721abaaa ("bcache: Remove heap-related macros and switch to generic min_heap") > > > > > > > > from the refactor-heap tree. > > > > > > > > Ok, these conflicts are too extensive, so I am dropping the refactor-heap > > > > tree for today. I suggest you all get together and sort something out. > > > > > > Coli and Kuan, you guys will need to get this sorted out quick if we > > > want refactor-heap to make the merge window > > > > Hi Coli and Kent, > > > > If I understand correctly, the reported bug is because we attempted to > > point (heap)->data to a dynamically allocated memory , but at that time > > (heap)->data was not a regular pointer but a fixed size array with a > > length of MAX_BSETS. > > > > In my refactor heap patch series, I introduced a preallocated array and > > decided in min_heap_init() whether the data pointer should point to an > > incoming pointer or to the preallocated array. Therefore, I am > > wondering if my patch might have unintentionally fixed this bug? > > > > I am unsure how to reproduce the reported issue. Could you assist me in > > verifying whether my assumption is correct? > > This is a merge conflict, not a runtime. Can you rebase onto Coli's > tree? We'll have to retest. Oh, sorry for the misunderstanding I caused. When I mentioned "bug" [1] earlier, I was referring to the bug addressed in 3a861560ccb3 ("bcache: fix variable length array abuse in btree_iter"), not a merge conflict. Here are the results after the rebase: https://github.com/visitorckw/linux.git refactor-heap [1]: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2039368 Regards, Kuan-Wei