From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH v5 05/12] block: Kill bi_destructor Date: Wed, 8 Aug 2012 23:34:09 -0700 Message-ID: References: <1344290921-25154-1-git-send-email-koverstreet@google.com> <1344290921-25154-6-git-send-email-koverstreet@google.com> <20120808222223.GD6983@dhcp-172-17-108-109.mtv.corp.google.com> <20120809002154.GE7262@moria.home.lan> <20120809060517.GB2845@dhcp-172-17-108-109.mtv.corp.google.com> <20120809061214.GA9128@dhcp-172-18-216-138.mtv.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120809061214.GA9128-RcKxWJ4Cfj3IzGYXcIpNmNLIRw13R84JkQQo+JxHRPFibQn6LdNjmg@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: drbd-dev-bounces-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org Errors-To: drbd-dev-bounces-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org To: Kent Overstreet Cc: axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org, dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, neilb-l3A5Bk7waGM@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, mpatocka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, yehuda-L5o5AL9CYN0tUFlbccrkMA@public.gmane.org, sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org, agk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, drbd-dev-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org List-Id: linux-bcache@vger.kernel.org Hello, On Wed, Aug 8, 2012 at 11:12 PM, Kent Overstreet wrote: > But if it's a pointer to heap allocated memory, but the bio was embedded > in another struct? I've seen a fair number of instances of that (md, off > the top of my head). > > If you're sure that in a normal config the slab allocator is going to > complain right away and not corrupt itself, fine. But I've been bitten > way too hard by bugs that could've been caught right away by a simple > assert and instead I had to spend hours backtracking, and the block > layer is _rife_ with that kind of thing. Let's let slab debug code deal with that. I really don't see much benefit in doing this. The said kind of bugs aren't particularly difficult to track down. Thanks. -- tejun