From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boaz Harrosh Subject: Re: [PATCH v2 08/14] block: Kill bi_destructor Date: Fri, 25 May 2012 09:43:03 +0300 Message-ID: <4FBF29F7.6030808@panasas.com> References: <1337817771-25038-1-git-send-email-koverstreet@google.com> <1337817771-25038-9-git-send-email-koverstreet@google.com> <20120524195202.GG27550@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120524195202.GG27550-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Sender: linux-bcache-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Vivek Goyal Cc: Kent Overstreet , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@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, mpatocka-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, sage-BnTBU8nroG7k1uMJSBkQmQ@public.gmane.org, yehuda-L5o5AL9CYN0tUFlbccrkMA@public.gmane.org List-Id: dm-devel.ids On 05/24/2012 10:52 PM, Vivek Goyal wrote: > In fact I am not even sure that for one driver we should introduce > bio_reset() in generic block layer. So to me we should get rid of bio_reset() > and let all the gory details remain in driver. > I disagree. The kind of trick we do where up to BIO_RESET_BYTES the struct is memset **must** stay at header, very close to the structure. I would though make bio_reset() inline at header, it's a single memset. Even the memset is inlined by the compiler. > Thanks > Vivek Thanks Boaz 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 1C4E81005415 for ; Fri, 25 May 2012 09:04:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.linbit.com (Postfix) with ESMTP id 141001B4262 for ; Fri, 25 May 2012 09:04:10 +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 CxQRxBAjSLZJ for ; Fri, 25 May 2012 09:04:10 +0200 (CEST) Received: from soda.linbit (tuerlsteher.linbit.com [86.59.100.100]) by zimbra.linbit.com (Postfix) with ESMTP id EDDFD1B4206 for ; Fri, 25 May 2012 09:04:09 +0200 (CEST) Resent-Message-ID: <20120525070409.GR12726@soda.linbit> Received: from natasha.panasas.com (natasha.panasas.com [67.152.220.90]) by mail09.linbit.com (LINBIT Mail Daemon) with ESMTP id 14B6F1019A78 for ; Fri, 25 May 2012 08:43:44 +0200 (CEST) Message-ID: <4FBF29F7.6030808@panasas.com> Date: Fri, 25 May 2012 09:43:03 +0300 From: Boaz Harrosh MIME-Version: 1.0 To: Vivek Goyal References: <1337817771-25038-1-git-send-email-koverstreet@google.com> <1337817771-25038-9-git-send-email-koverstreet@google.com> <20120524195202.GG27550@redhat.com> In-Reply-To: <20120524195202.GG27550@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: axboe@kernel.dk, dm-devel@redhat.com, neilb@suse.de, Kent Overstreet , linux-kernel@vger.kernel.org, tj@kernel.org, linux-bcache@vger.kernel.org, mpatocka@redhat.com, yehuda@hq.newdream.net, linux-fsdevel@vger.kernel.org, sage@newdream.net, agk@redhat.com, drbd-dev@lists.linbit.com Subject: Re: [Drbd-dev] [PATCH v2 08/14] block: Kill bi_destructor List-Id: Coordination of development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 05/24/2012 10:52 PM, Vivek Goyal wrote: > In fact I am not even sure that for one driver we should introduce > bio_reset() in generic block layer. So to me we should get rid of bio_reset() > and let all the gory details remain in driver. > I disagree. The kind of trick we do where up to BIO_RESET_BYTES the struct is memset **must** stay at header, very close to the structure. I would though make bio_reset() inline at header, it's a single memset. Even the memset is inlined by the compiler. > Thanks > Vivek Thanks Boaz From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boaz Harrosh Subject: Re: [PATCH v2 08/14] block: Kill bi_destructor Date: Fri, 25 May 2012 09:43:03 +0300 Message-ID: <4FBF29F7.6030808@panasas.com> References: <1337817771-25038-1-git-send-email-koverstreet@google.com> <1337817771-25038-9-git-send-email-koverstreet@google.com> <20120524195202.GG27550@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Kent Overstreet , , , , , , , , , , , , To: Vivek Goyal Return-path: In-Reply-To: <20120524195202.GG27550-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Sender: linux-bcache-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org On 05/24/2012 10:52 PM, Vivek Goyal wrote: > In fact I am not even sure that for one driver we should introduce > bio_reset() in generic block layer. So to me we should get rid of bio_reset() > and let all the gory details remain in driver. > I disagree. The kind of trick we do where up to BIO_RESET_BYTES the struct is memset **must** stay at header, very close to the structure. I would though make bio_reset() inline at header, it's a single memset. Even the memset is inlined by the compiler. > Thanks > Vivek Thanks Boaz From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754889Ab2EYGn4 (ORCPT ); Fri, 25 May 2012 02:43:56 -0400 Received: from natasha.panasas.com ([67.152.220.90]:43537 "EHLO natasha.panasas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751053Ab2EYGny (ORCPT ); Fri, 25 May 2012 02:43:54 -0400 Message-ID: <4FBF29F7.6030808@panasas.com> Date: Fri, 25 May 2012 09:43:03 +0300 From: Boaz Harrosh User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111113 Thunderbird/8.0 MIME-Version: 1.0 To: Vivek Goyal CC: Kent Overstreet , , , , , , , , , , , , Subject: Re: [PATCH v2 08/14] block: Kill bi_destructor References: <1337817771-25038-1-git-send-email-koverstreet@google.com> <1337817771-25038-9-git-send-email-koverstreet@google.com> <20120524195202.GG27550@redhat.com> In-Reply-To: <20120524195202.GG27550@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/24/2012 10:52 PM, Vivek Goyal wrote: > In fact I am not even sure that for one driver we should introduce > bio_reset() in generic block layer. So to me we should get rid of bio_reset() > and let all the gory details remain in driver. > I disagree. The kind of trick we do where up to BIO_RESET_BYTES the struct is memset **must** stay at header, very close to the structure. I would though make bio_reset() inline at header, it's a single memset. Even the memset is inlined by the compiler. > Thanks > Vivek Thanks Boaz