From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Date: Tue, 19 Jan 2021 09:14:22 -0500 Subject: [Cluster-devel] [RFC PATCH 00/37] block: introduce bio_init_fields() In-Reply-To: <20210119050631.57073-1-chaitanya.kulkarni@wdc.com> References: <20210119050631.57073-1-chaitanya.kulkarni@wdc.com> Message-ID: <20210119141422.GA23758@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tue, Jan 19 2021 at 12:05am -0500, Chaitanya Kulkarni wrote: > Hi, > > This is a *compile only RFC* which adds a generic helper to initialize > the various fields of the bio that is repeated all the places in > file-systems, block layer, and drivers. > > The new helper allows callers to initialize various members such as > bdev, sector, private, end io callback, io priority, and write hints. > > The objective of this RFC is to only start a discussion, this it not > completely tested at all. ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? > Following diff shows code level benefits of this helper :- > ??38 files changed, 124 insertions(+), 236 deletions(-) Please no... this is just obfuscation. Adding yet another field to set would create a cascade of churn throughout kernel (and invariably many callers won't need the new field initialized, so you keep passing 0 for more and more fields). Nacked-by: Mike Snitzer From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 657B4C433E0 for ; Tue, 19 Jan 2021 14:14:44 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CF8BA2312D for ; Tue, 19 Jan 2021 14:14:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF8BA2312D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611065682; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=tvrnFtZgr4nPb63onkOpSvWJcnf2quIfpILFvYx0bg8=; b=CBDk3jby7y+xr5iB4KGFFexNk43pdNGZXz39MIJyUcRrzSvsDNROkTLuFDMhHn10hi7Lpz e7RZivcmTydLU03zU9FeEKmztbRU39Iob8KH84Zc/hTIjNunaXuEIGig3y5syhBTX5clvC vyuzf7klIL5i6PcaKkOtXgLYsMTv/DQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-294-NXtuhtIBNHyfJ8_mrF2UiA-1; Tue, 19 Jan 2021 09:14:40 -0500 X-MC-Unique: NXtuhtIBNHyfJ8_mrF2UiA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3702CBBEEA; Tue, 19 Jan 2021 14:14:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C7FA55D9FC; Tue, 19 Jan 2021 14:14:34 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 08EC0180954D; Tue, 19 Jan 2021 14:14:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10JEETHB019125 for ; Tue, 19 Jan 2021 09:14:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id B872CE151; Tue, 19 Jan 2021 14:14:29 +0000 (UTC) Received: from localhost (unknown [10.18.25.174]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2AA0D19C47; Tue, 19 Jan 2021 14:14:23 +0000 (UTC) Date: Tue, 19 Jan 2021 09:14:22 -0500 From: Mike Snitzer To: Chaitanya Kulkarni Message-ID: <20210119141422.GA23758@redhat.com> References: <20210119050631.57073-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 In-Reply-To: <20210119050631.57073-1-chaitanya.kulkarni@wdc.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: dm-devel@redhat.com Cc: shaggy@kernel.org, jfs-discussion@lists.sourceforge.net, gustavo@embeddedor.com, linux-nvme@lists.infradead.org, philipp.reisner@linbit.com, song@kernel.org, dm-devel@redhat.com, target-devel@vger.kernel.org, adilger.kernel@dilger.ca, hch@lst.de, agk@redhat.com, naohiro.aota@wdc.com, sagi@grimberg.me, linux-scsi@vger.kernel.org, darrick.wong@oracle.com, osandov@fb.com, cluster-devel@redhat.com, linux-ext4@vger.kernel.org, kent.overstreet@gmail.com, josef@toxicpanda.com, efremov@linux.com, colyli@suse.de, linux-raid@vger.kernel.org, rpeterso@redhat.com, linux-bcache@vger.kernel.org, dsterba@suse.com, viro@zeniv.linux.org.uk, drbd-dev@tron.linbit.com, bvanassche@acm.org, agruenba@redhat.com, axboe@kernel.dk, linux-block@vger.kernel.org, damien.lemoal@wdc.com, tytso@mit.edu, martin.petersen@oracle.com, clm@fb.com, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, jefflexu@linux.alibaba.com, linux-fsdevel@vger.kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, linux-btrfs@vger.kernel.org Subject: Re: [dm-devel] [RFC PATCH 00/37] block: introduce bio_init_fields() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Tue, Jan 19 2021 at 12:05am -0500, Chaitanya Kulkarni wrote: > Hi, >=20 > This is a *compile only RFC* which adds a generic helper to initialize > the various fields of the bio that is repeated all the places in > file-systems, block layer, and drivers. >=20 > The new helper allows callers to initialize various members such as > bdev, sector, private, end io callback, io priority, and write hints. >=20 > The objective of this RFC is to only start a discussion, this it not=20 > completely tested at all. =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 > Following diff shows code level benefits of this helper :- > =C2=A038 files changed, 124 insertions(+), 236 deletions(-) Please no... this is just obfuscation. Adding yet another field to set would create a cascade of churn throughout kernel (and invariably many callers won't need the new field initialized, so you keep passing 0 for more and more fields). Nacked-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA995C4332D for ; Tue, 19 Jan 2021 23:01:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BDD1523110 for ; Tue, 19 Jan 2021 23:01:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727387AbhASXAn (ORCPT ); Tue, 19 Jan 2021 18:00:43 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:53052 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404085AbhASOTe (ORCPT ); Tue, 19 Jan 2021 09:19:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611065887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2ycJhE8mXTZkoJTspQiF4eAdjjIOqaHJTzxw51QUBpw=; b=iH91giBXcrvLWkxZafRwzhtnAaqC4UgOyL2/svKS5JpqN4aXD9uZoHjHC1ghixJvzFQFwB wLFBArEfZwc4Z7vEzAYFoEYWqEGfkJemKwWQ+7hEoy/NTkYb2K/87UEluBwNSQI9TmihSg YrK+WSWmMbUsVGj8AVkkO22Ba2gkMuA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-504-Na2rrFESP2-59Jhvxs6BgA-1; Tue, 19 Jan 2021 09:14:34 -0500 X-MC-Unique: Na2rrFESP2-59Jhvxs6BgA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B9A58806661; Tue, 19 Jan 2021 14:14:29 +0000 (UTC) Received: from localhost (unknown [10.18.25.174]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2AA0D19C47; Tue, 19 Jan 2021 14:14:23 +0000 (UTC) Date: Tue, 19 Jan 2021 09:14:22 -0500 From: Mike Snitzer To: Chaitanya Kulkarni Cc: linux-block@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, drbd-dev@lists.linbit.com, linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, cluster-devel@redhat.com, jfs-discussion@lists.sourceforge.net, dm-devel@redhat.com, axboe@kernel.dk, philipp.reisner@linbit.com, lars.ellenberg@linbit.com, efremov@linux.com, colyli@suse.de, kent.overstreet@gmail.com, agk@redhat.com, song@kernel.org, hch@lst.de, sagi@grimberg.me, martin.petersen@oracle.com, viro@zeniv.linux.org.uk, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, tytso@mit.edu, adilger.kernel@dilger.ca, rpeterso@redhat.com, agruenba@redhat.com, darrick.wong@oracle.com, shaggy@kernel.org, damien.lemoal@wdc.com, naohiro.aota@wdc.com, jth@kernel.org, tj@kernel.org, osandov@fb.com, bvanassche@acm.org, gustavo@embeddedor.com, asml.silence@gmail.com, jefflexu@linux.alibaba.com Subject: Re: [RFC PATCH 00/37] block: introduce bio_init_fields() Message-ID: <20210119141422.GA23758@redhat.com> References: <20210119050631.57073-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210119050631.57073-1-chaitanya.kulkarni@wdc.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-bcache@vger.kernel.org On Tue, Jan 19 2021 at 12:05am -0500, Chaitanya Kulkarni wrote: > Hi, > > This is a *compile only RFC* which adds a generic helper to initialize > the various fields of the bio that is repeated all the places in > file-systems, block layer, and drivers. > > The new helper allows callers to initialize various members such as > bdev, sector, private, end io callback, io priority, and write hints. > > The objective of this RFC is to only start a discussion, this it not > completely tested at all.                                                                                                             > Following diff shows code level benefits of this helper :- >  38 files changed, 124 insertions(+), 236 deletions(-) Please no... this is just obfuscation. Adding yet another field to set would create a cascade of churn throughout kernel (and invariably many callers won't need the new field initialized, so you keep passing 0 for more and more fields). Nacked-by: Mike Snitzer From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mail19.linbit.com (LINBIT Mail Daemon) with ESMTP id 42D4B42006E for ; Tue, 19 Jan 2021 15:20:47 +0100 (CET) Date: Tue, 19 Jan 2021 09:14:22 -0500 From: Mike Snitzer To: Chaitanya Kulkarni Message-ID: <20210119141422.GA23758@redhat.com> References: <20210119050631.57073-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210119050631.57073-1-chaitanya.kulkarni@wdc.com> Cc: shaggy@kernel.org, jfs-discussion@lists.sourceforge.net, gustavo@embeddedor.com, linux-nvme@lists.infradead.org, philipp.reisner@linbit.com, song@kernel.org, dm-devel@redhat.com, target-devel@vger.kernel.org, adilger.kernel@dilger.ca, hch@lst.de, agk@redhat.com, drbd-dev@lists.linbit.com, naohiro.aota@wdc.com, sagi@grimberg.me, linux-scsi@vger.kernel.org, darrick.wong@oracle.com, osandov@fb.com, cluster-devel@redhat.com, linux-ext4@vger.kernel.org, kent.overstreet@gmail.com, josef@toxicpanda.com, efremov@linux.com, colyli@suse.de, linux-raid@vger.kernel.org, rpeterso@redhat.com, linux-bcache@vger.kernel.org, viro@zeniv.linux.org.uk, dsterba@suse.com, bvanassche@acm.org, agruenba@redhat.com, axboe@kernel.dk, linux-block@vger.kernel.org, damien.lemoal@wdc.com, tytso@mit.edu, martin.petersen@oracle.com, clm@fb.com, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, jefflexu@linux.alibaba.com, linux-fsdevel@vger.kernel.org, tj@kernel.org, lars.ellenberg@linbit.com, jth@kernel.org, asml.silence@gmail.com, linux-btrfs@vger.kernel.org Subject: Re: [Drbd-dev] [RFC PATCH 00/37] block: introduce bio_init_fields() List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, Jan 19 2021 at 12:05am -0500, Chaitanya Kulkarni wrote: > Hi, > > This is a *compile only RFC* which adds a generic helper to initialize > the various fields of the bio that is repeated all the places in > file-systems, block layer, and drivers. > > The new helper allows callers to initialize various members such as > bdev, sector, private, end io callback, io priority, and write hints. > > The objective of this RFC is to only start a discussion, this it not > completely tested at all.                                                                                                             > Following diff shows code level benefits of this helper :- >  38 files changed, 124 insertions(+), 236 deletions(-) Please no... this is just obfuscation. Adding yet another field to set would create a cascade of churn throughout kernel (and invariably many callers won't need the new field initialized, so you keep passing 0 for more and more fields). Nacked-by: Mike Snitzer