From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95E64175579 for ; Tue, 11 Jun 2024 08:12:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718093538; cv=none; b=dFUPIU9cArzV4EhXzlK10JkPmSaJonsbAsdjtVn1XzFgwHG+JtG0LBjFbeM7164XA77LpOVvkF/8YMHP2xii0NfUXlHJnPPkdaOsDzqT/oNAw8Dx+tmUu3H/Al5jGfcbY95mb4AwijXGhv7oQchKOFKLcki4ia5E+C5sGr51kBA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718093538; c=relaxed/simple; bh=AauTPLgm0FonMDbEnLtMgAvubRqLx1bZAaVkd4WBLlc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=o6Ugf8vTicRJf+nNDpgRfPFW24npbtgDktmL6PxrEMPwImujlEUzrdnus5JnVr1A7wWU3Kghn+HujOUqsc8PEhIRwDgQ08h9gcrE2rqfj7Slc3uzut+zt+zATm9Aq/53tWgCpjQ7Z8bWkBibE4wn29OE/O5JnLHju6mk+n8rOg0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id F414222D0F; Tue, 11 Jun 2024 08:12:14 +0000 (UTC) Authentication-Results: smtp-out1.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id EBB43137DF; Tue, 11 Jun 2024 08:12:13 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id VT1AN90GaGbKWQAAD6G6ig (envelope-from ); Tue, 11 Jun 2024 08:12:13 +0000 Message-ID: <4032635d-a17f-44e5-a547-b175fa271945@suse.de> Date: Tue, 11 Jun 2024 10:12:13 +0200 Precedence: bulk X-Mailing-List: linux-m68k@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 02/26] sd: move zone limits setup out of sd_read_block_characteristics To: Christoph Hellwig , Jens Axboe Cc: Geert Uytterhoeven , Richard Weinberger , Philipp Reisner , Lars Ellenberg , =?UTF-8?Q?Christoph_B=C3=B6hmwalder?= , Josef Bacik , Ming Lei , "Michael S. Tsirkin" , Jason Wang , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Alasdair Kergon , Mike Snitzer , Mikulas Patocka , Song Liu , Yu Kuai , Vineeth Vijayan , "Martin K. Petersen" , linux-m68k@lists.linux-m68k.org, linux-um@lists.infradead.org, drbd-dev@lists.linbit.com, nbd@other.debian.org, linuxppc-dev@lists.ozlabs.org, ceph-devel@vger.kernel.org, virtualization@lists.linux.dev, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, dm-devel@lists.linux.dev, linux-raid@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, nvdimm@lists.linux.dev, linux-nvme@lists.infradead.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, linux-block@vger.kernel.org References: <20240611051929.513387-1-hch@lst.de> <20240611051929.513387-3-hch@lst.de> Content-Language: en-US From: Hannes Reinecke In-Reply-To: <20240611051929.513387-3-hch@lst.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spam-Level: X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Flag: NO X-Spam-Score: -4.00 X-Rspamd-Queue-Id: F414222D0F X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action On 6/11/24 07:19, Christoph Hellwig wrote: > Move a bit of code that sets up the zone flag and the write granularity > into sd_zbc_read_zones to be with the rest of the zoned limits. > > Signed-off-by: Christoph Hellwig > --- > drivers/scsi/sd.c | 21 +-------------------- > drivers/scsi/sd_zbc.c | 13 ++++++++++++- > 2 files changed, 13 insertions(+), 21 deletions(-) > > diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c > index 85b45345a27739..5bfed61c70db8f 100644 > --- a/drivers/scsi/sd.c > +++ b/drivers/scsi/sd.c > @@ -3308,29 +3308,10 @@ static void sd_read_block_characteristics(struct scsi_disk *sdkp, > blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, q); > } > > - > -#ifdef CONFIG_BLK_DEV_ZONED /* sd_probe rejects ZBD devices early otherwise */ > - if (sdkp->device->type == TYPE_ZBC) { > - lim->zoned = true; > - > - /* > - * Per ZBC and ZAC specifications, writes in sequential write > - * required zones of host-managed devices must be aligned to > - * the device physical block size. > - */ > - lim->zone_write_granularity = sdkp->physical_block_size; > - } else { > - /* > - * Host-aware devices are treated as conventional. > - */ > - lim->zoned = false; > - } > -#endif /* CONFIG_BLK_DEV_ZONED */ > - > if (!sdkp->first_scan) > return; > > - if (lim->zoned) > + if (sdkp->device->type == TYPE_ZBC) Why not sd_is_zoned()? Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich