From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bart Van Assche Subject: Re: [PATCH 3/9] sd: configure ZBC devices Date: Fri, 15 Apr 2016 08:47:29 -0700 Message-ID: <57110D11.2010201@sandisk.com> References: <1459764020-126038-1-git-send-email-hare@suse.de> <1459764020-126038-4-git-send-email-hare@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail-by2on0073.outbound.protection.outlook.com ([207.46.100.73]:55883 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751269AbcDOPri (ORCPT ); Fri, 15 Apr 2016 11:47:38 -0400 In-Reply-To: <1459764020-126038-4-git-send-email-hare@suse.de> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Hannes Reinecke Cc: Jens Axboe , linux-block@vger.kernel.org, "Martin K. Petersen" , Christoph Hellwig , Shaun Tancheff , Damien Le Moal , linux-scsi@vger.kernel.org, Sathya Prakash , Hannes Reinecke On 04/04/2016 03:00 AM, Hannes Reinecke wrote: > +static int > +sd_zbc_report_zones(struct scsi_disk *sdkp, sector_t start_lba, > + unsigned char *buffer, int bufflen ) > +{ > [ ... ] > + put_unaligned_be64(start_lba, &cmd[2]); > + put_unaligned_be32(bufflen, &cmd[10]); The argument "sector_t start_lba" is confusing me. Isn't a number either a sector number or an LBA? Shouldn't that number be shifted right by ilog2(sdp->sector_size) - 9 before storing it in the CDB? Bart.