From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kent Overstreet Subject: Re: [PATCH v5 02/12] dm: Use bioset's front_pad for dm_rq_clone_bio_info Date: Wed, 15 Aug 2012 13:46:18 -0700 Message-ID: <20120815204618.GB2758@google.com> References: <1344290921-25154-1-git-send-email-koverstreet@google.com> <1344290921-25154-3-git-send-email-koverstreet@google.com> <5029E320.3050603@ce.jp.nec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <5029E320.3050603-JhyGz2TFV9J8UrSeD/g0lQ@public.gmane.org> Sender: linux-bcache-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jun'ichi Nomura Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org, agk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, neilb-l3A5Bk7waGM@public.gmane.org, drbd-dev-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org, vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, mpatocka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org, yehuda-L5o5AL9CYN0tUFlbccrkMA@public.gmane.org List-Id: dm-devel.ids On Tue, Aug 14, 2012 at 02:33:20PM +0900, Jun'ichi Nomura wrote: > On 08/07/12 07:08, Kent Overstreet wrote: > > struct dm_rq_clone_bio_info { > > struct bio *orig; > > struct dm_rq_target_io *tio; > > + struct bio clone; > > }; > ... > > - pools->bs = bioset_create(pool_size, 0); > > + pools->bs = bioset_create(pool_size, > > + offsetof(struct dm_rq_clone_bio_info, orig)); > > if (!pools->bs) > > goto free_tio_pool_and_out; > > Shouldn't this be offsetof(struct dm_rq_clone_bio_info, clone)? Ouch! Yes, it definitely should be. Good catch, and thanks. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zimbra.linbit.com (zimbra.linbit.com [212.69.161.123]) by mail09.linbit.com (LINBIT Mail Daemon) with ESMTP id 3EC2B103B4DA for ; Thu, 16 Aug 2012 20:17:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.linbit.com (Postfix) with ESMTP id 394971B4361 for ; Thu, 16 Aug 2012 20:17:09 +0200 (CEST) Received: from zimbra.linbit.com ([127.0.0.1]) by localhost (zimbra.linbit.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rzM31kQWPEmN for ; Thu, 16 Aug 2012 20:17:09 +0200 (CEST) Received: from soda.linbit (tuerlsteher.linbit.com [86.59.100.100]) by zimbra.linbit.com (Postfix) with ESMTP id 202E91B435E for ; Thu, 16 Aug 2012 20:17:09 +0200 (CEST) Resent-Message-ID: <20120816181709.GH8189@soda.linbit> Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by mail09.linbit.com (LINBIT Mail Daemon) with ESMTPS id C1EB41013809 for ; Wed, 15 Aug 2012 22:46:24 +0200 (CEST) Received: by pbbrp2 with SMTP id rp2so442097pbb.27 for ; Wed, 15 Aug 2012 13:46:22 -0700 (PDT) Date: Wed, 15 Aug 2012 13:46:18 -0700 From: Kent Overstreet To: Jun'ichi Nomura Message-ID: <20120815204618.GB2758@google.com> References: <1344290921-25154-1-git-send-email-koverstreet@google.com> <1344290921-25154-3-git-send-email-koverstreet@google.com> <5029E320.3050603@ce.jp.nec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5029E320.3050603@ce.jp.nec.com> Cc: axboe@kernel.dk, dm-devel@redhat.com, neilb@suse.de, linux-kernel@vger.kernel.org, linux-bcache@vger.kernel.org, mpatocka@redhat.com, vgoyal@redhat.com, yehuda@hq.newdream.net, tj@kernel.org, sage@newdream.net, agk@redhat.com, drbd-dev@lists.linbit.com Subject: Re: [Drbd-dev] [PATCH v5 02/12] dm: Use bioset's front_pad for dm_rq_clone_bio_info List-Id: Coordination of development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, Aug 14, 2012 at 02:33:20PM +0900, Jun'ichi Nomura wrote: > On 08/07/12 07:08, Kent Overstreet wrote: > > struct dm_rq_clone_bio_info { > > struct bio *orig; > > struct dm_rq_target_io *tio; > > + struct bio clone; > > }; > ... > > - pools->bs = bioset_create(pool_size, 0); > > + pools->bs = bioset_create(pool_size, > > + offsetof(struct dm_rq_clone_bio_info, orig)); > > if (!pools->bs) > > goto free_tio_pool_and_out; > > Shouldn't this be offsetof(struct dm_rq_clone_bio_info, clone)? Ouch! Yes, it definitely should be. Good catch, and thanks. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756237Ab2HOUqZ (ORCPT ); Wed, 15 Aug 2012 16:46:25 -0400 Received: from mail-yx0-f174.google.com ([209.85.213.174]:62832 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756102Ab2HOUqW (ORCPT ); Wed, 15 Aug 2012 16:46:22 -0400 Date: Wed, 15 Aug 2012 13:46:18 -0700 From: Kent Overstreet To: "Jun'ichi Nomura" Cc: linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org, dm-devel@redhat.com, tj@kernel.org, axboe@kernel.dk, agk@redhat.com, neilb@suse.de, drbd-dev@lists.linbit.com, vgoyal@redhat.com, mpatocka@redhat.com, sage@newdream.net, yehuda@hq.newdream.net Subject: Re: [PATCH v5 02/12] dm: Use bioset's front_pad for dm_rq_clone_bio_info Message-ID: <20120815204618.GB2758@google.com> References: <1344290921-25154-1-git-send-email-koverstreet@google.com> <1344290921-25154-3-git-send-email-koverstreet@google.com> <5029E320.3050603@ce.jp.nec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5029E320.3050603@ce.jp.nec.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 14, 2012 at 02:33:20PM +0900, Jun'ichi Nomura wrote: > On 08/07/12 07:08, Kent Overstreet wrote: > > struct dm_rq_clone_bio_info { > > struct bio *orig; > > struct dm_rq_target_io *tio; > > + struct bio clone; > > }; > ... > > - pools->bs = bioset_create(pool_size, 0); > > + pools->bs = bioset_create(pool_size, > > + offsetof(struct dm_rq_clone_bio_info, orig)); > > if (!pools->bs) > > goto free_tio_pool_and_out; > > Shouldn't this be offsetof(struct dm_rq_clone_bio_info, clone)? Ouch! Yes, it definitely should be. Good catch, and thanks.