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: linux-bcache@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.