Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4495581ybl; Mon, 26 Aug 2019 11:14:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzaqrFr7XFiEYojM0UM+jXc99PNg+t4nj/5g4YBNoMIqxm074Byxpnkia6Ulg+rKE2ofwj/ X-Received: by 2002:a17:902:4303:: with SMTP id i3mr2207552pld.30.1566843299727; Mon, 26 Aug 2019 11:14:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566843299; cv=none; d=google.com; s=arc-20160816; b=q3Ue+7LQgDNWFgrCPXd5VPKxnOWTDrs2YD3hoCKjxoEwBHicBL0WdpFeYEMKtUjV1H 7FvIApfd1B08eslZ7wB0SYRkerB/RhH3JiMavg5Zn6sr5My1KogAA2IPyH8EyY5o1HEm SybI/Q7QlVGLFtB9caeI9pXf8ITllyZrwj9YIviy23nlDSA56SF5hBf16gG6vEv1A6NB oqiqwlU5A76amcxiCIAE48mz6hKR/9L771oBowy26CWpCE0jlLrpEEsw3oP4F8Yb0OQg fBZCTGhpg7pH6C+6WNH081hFfAKj956hRJehG+1hh9Tck9X5WrE2HokpVuhpE/7bp2d4 rtIQ== 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:mail-followup-to :reply-to:message-id:subject:cc:to:from:date; bh=hLYMrG61h4XXVXVC1MzJnFIn7WGKyjX4UhwTpodL8WA=; b=urrjC1DCS7rxDnkwQYLNBAdushYf2WZb3iUFbaRqI2uessgK/7YoWRSdON/KvGj6pL Y816QQotvxwuTx4+1gFxWWlhkJGHJ6KAwRAHROX37VfwXUFj1MG6f8frSYttzfuBkR54 BwPd7x0eDxG+NzFoihPjDAzaEFB8wQLlfA9tMHNc+PGoF/2im04DHksIEKJtW2xiINYV sOXtGzFBsT6aT3gz/6gTY1TzYqNjuRSYKCxrj+oviyspG3EzO0COjRsYnySrvz2lWhQz AWa0O8fbYtqgcSNYzflo89zEYxb5l0bN4TNfvKbJyDPPUX7rT0VZpu2x51odpyM2j3gI Ppuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 b19si1134892pfd.196.2019.08.26.11.14.43; Mon, 26 Aug 2019 11:14:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733105AbfHZQqZ (ORCPT + 99 others); Mon, 26 Aug 2019 12:46:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:40726 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729065AbfHZQqZ (ORCPT ); Mon, 26 Aug 2019 12:46:25 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9B23DAE47; Mon, 26 Aug 2019 16:46:23 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 1DFFCDA98E; Mon, 26 Aug 2019 18:46:47 +0200 (CEST) Date: Mon, 26 Aug 2019 18:46:47 +0200 From: David Sterba To: Nikolay Borisov Cc: dsterba@suse.cz, Christophe Leroy , erhard_f@mailbox.org, Chris Mason , Josef Bacik , David Sterba , Andrew Morton , linux-mm@kvack.org, stable@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org Subject: Re: [PATCH v2] btrfs: fix allocation of bitmap pages. Message-ID: <20190826164646.GX2752@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Nikolay Borisov , Christophe Leroy , erhard_f@mailbox.org, Chris Mason , Josef Bacik , David Sterba , Andrew Morton , linux-mm@kvack.org, stable@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org References: <20190826153757.GW2752@twin.jikos.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 26, 2019 at 06:40:24PM +0300, Nikolay Borisov wrote: > >> Link: https://bugzilla.kernel.org/show_bug.cgi?id=204371 > >> Fixes: 69d2480456d1 ("btrfs: use copy_page for copying pages instead of memcpy") > >> Cc: stable@vger.kernel.org > >> Signed-off-by: Christophe Leroy > >> --- > >> v2: Using kmem_cache instead of get_zeroed_page() in order to benefit from SLAB debugging features like redzone. > > > > I'll take this version, thanks. Though I'm not happy about the allocator > > behaviour. The kmem cache based fix can be backported independently to > > 4.19 regardless of the SL*B fixes. > > > >> +extern struct kmem_cache *btrfs_bitmap_cachep; > > > > I've renamed the cache to btrfs_free_space_bitmap_cachep > > > > Reviewed-by: David Sterba > > Isn't this obsoleted by > > '[PATCH v2 0/2] guarantee natural alignment for kmalloc()' ? Yeah, but this would add maybe another whole dev cycle to merge and release. The reporters of the bug seem to care enough to identify the problem and propose the fix so I feel like adding the btrfs-specific fix now is a little favor we can afford. The bug is reproduced on an architecture that's not widely tested so from practical POV I think this adds more coverage which is desirable.