Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1631854iob; Thu, 5 May 2022 05:32:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0l3uZWLL/0uTfxElhVoDtvgdAjDwV9494riTfgMrIbv7e98aJ1wNs5gR7Ct770mL5+fKM X-Received: by 2002:a63:e146:0:b0:39d:1b00:e475 with SMTP id h6-20020a63e146000000b0039d1b00e475mr22147231pgk.537.1651753951600; Thu, 05 May 2022 05:32:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651753951; cv=none; d=google.com; s=arc-20160816; b=r7GYbXYOp6zj3G/ngvikcHiDYtyyoT8ci+KpFLRl2xKwEfFbHXxDq3eL4izX2RN4q6 nwqeZVz3KdQ1MKXS/Yx4111uPDeKh6P77z32YctKcukEQcyvFWWS0oKskLUnU58H1R+k xLSQxBMtdVerbXuMimrki15ECDN5C63XIn0hjsCz4RUDlGRbvGu1keJVvNSYM4RQrsCD KHE08hcx33yxlzw1adHTmhY8hXhELa7mjAKVoI/8biRZ2IudrPkV1box9XmYWGzTcWsd I7TW9V+vwXFEbPhDEOguUChxtD/LjxQK/rFwMO0SYnvKTbwjoEUaTciFmZeH1/ycFFk2 KPvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:to:from :references:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature:dkim-signature; bh=vIH8khGfsWQr/G8XxJBCff3FHm1s2U5cIJcIUqX8z74=; b=GE4gEQdVXOnXM1HrOYZo/n+8jorR3XWCk3Th5mtmjreg6fGxid4AV6zYu7w6gXAozR uRs9fo1msd1llAr05U183rpxdaf/kH4vEef9nX/IOniTvJWOoVY19+p9YBtDJsWegcwI arn/btgcjYreV2IGEGPKeV8yIzs6qgmHySPm9g12+b6S5jYKQZwNQUc2YFcVDrKuBlb+ kJ25InQe88x5YtU83SY2W1Ha/vdTUKPxgCIkD5VEKp4JI8lJlE7BdCCCdPtOp4bCjFUk 2XCOBw8c+Hkik3mPpWk7ZxOqZOE7Irv2fOejqX1E7HagP1Ug4ZR6SmDN8FbvkW/ugDmZ 8cmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@suse.de header.s=susede2_rsa header.b="fxvMs/oy"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w20-20020a17090a8a1400b001da3cfee1bdsi7840826pjn.25.2022.05.05.05.32.13; Thu, 05 May 2022 05:32:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@suse.de header.s=susede2_rsa header.b="fxvMs/oy"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240562AbiEDRku (ORCPT + 99 others); Wed, 4 May 2022 13:40:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356672AbiEDRJh (ORCPT ); Wed, 4 May 2022 13:09:37 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC032DFC0; Wed, 4 May 2022 09:55:21 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 56CEC1F38D; Wed, 4 May 2022 16:55:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1651683320; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vIH8khGfsWQr/G8XxJBCff3FHm1s2U5cIJcIUqX8z74=; b=fxvMs/oy3r+8L1n1MFQIapG73Ibm3O6/tat7+NP9WW1TW8r09Du8uoO6rocjdXzlpyGvwk C5hEla1QoB9EEgtab/YDHaB2tVq7238KrlBol0zAj2Qjbef06pxxIesMIcT6fEQSxkR9D/ BoZBGUCuzL5vXw3JnF4pK4+YU3x97Ok= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1651683320; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vIH8khGfsWQr/G8XxJBCff3FHm1s2U5cIJcIUqX8z74=; b=ZP5QPuSU+43VPlOkMbFvUEvnny6lgfp5xqVC+flR2XZPgdo+xyxM/1E7KQx4QYaM3MKY3Z 0aJBeF5beNC5vnAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id ED96A131BD; Wed, 4 May 2022 16:55:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id dlZdLvKvcmLmVAAAMHmgww (envelope-from ); Wed, 04 May 2022 16:55:14 +0000 Message-ID: Date: Wed, 4 May 2022 09:55:12 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH 02/16] block: add blk_queue_zone_aligned and bdev_zone_aligned helper Content-Language: en-US References: <20220427160255.300418-1-p.raghav@samsung.com> <20220427160255.300418-3-p.raghav@samsung.com> From: Hannes Reinecke To: undisclosed-recipients:; In-Reply-To: <20220427160255.300418-3-p.raghav@samsung.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/27/22 09:02, Pankaj Raghav wrote: > Checking if a given sector is aligned to a zone is a very common > operation that is performed for zoned devices. Add > blk_queue_zone_aligned helper to check for this instead of opencoding it > everywhere. > > The helper is made to be generic so that it can also check for alignment > for non non-power-of-2 zone size devices. > > As the existing deployments of zoned devices had power-of-2 > assumption, power-of-2 optimized calculation is done for devices with > power-of-2 zone size > > Reviewed-by: Luis Chamberlain > Signed-off-by: Pankaj Raghav > --- > include/linux/blkdev.h | 31 +++++++++++++++++++++++++++++++ > 1 file changed, 31 insertions(+) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer