Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4750699yba; Tue, 30 Apr 2019 03:54:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLJdh7mSHSHvJVhrUw4ZQfJ7STmfr8tSzX4H1p/0bGqcE6NGRO1CfCDEWjiFpHz5LuDHbj X-Received: by 2002:a17:902:e512:: with SMTP id ck18mr8864367plb.251.1556621652774; Tue, 30 Apr 2019 03:54:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556621652; cv=none; d=google.com; s=arc-20160816; b=r/IQosLSj/ckzDHL/3mg91PxPUe7OpS2P9syC4dcRgEIlg349PbqNeY4rM+mcNHDow HqBPSILGX9nKXsCGvXgKtzD1AMiUqmZK+SaC0tnquERJ56xb1knbp5d5eZ037nNf44YW UMPpKU5F10xL45VyYCumwyCGXmECVKQZlfeWit/nP8SZG+nVyscyFXTwF91pLZxEZNti 4T0Af5hb0dRtoFsaTRpAWzuUmHVpaRLNqFPDCHSYg5xxmCxpdA4E9F9OUDqZYvcJkf+k 3ngl2eKEWfHKJlqWM5OHAzDsjqeuqMPFXnERY9t9+ZoMcoktLHOBn603bUbuAYKOOcwg Xqfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LnKYy8jFj+JVpVc0C/UzgZXSpL4E0hdFTQaCn24mwco=; b=S0RzN3cEaWUPbfbd4QJgm8rlLbndI3UyO/VaIVIJvNWoW1Hs13Rs5Uv6R0tlXTYsHC jvXVEtZxuONiSEKUlQ7usS+Pa59XX3+DrgboufNxdObJScJ5R+l7Zg2z9A4XwYLryk80 PW+LpoE8+TeKUS3B9/0sQj2dcf7tCIAyLJwnCo3PqpgWDmA++X8/y6f5nMVfXIxvxgPz 1vUFblgPBponWBoQPr1y1JMmLpJN981cHrJYKu0JnDZKpnxUvfislkGHZV/5zMnLZu10 s357tkzMC928wkgJw1iRSInSFODYLdedcmfIEaUiS0U2kgGDfAIoDc95YRCt7noSl+0K OGsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZoSzjyAF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7si37761320pfc.152.2019.04.30.03.53.57; Tue, 30 Apr 2019 03:54:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZoSzjyAF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727529AbfD3Kwk (ORCPT + 99 others); Tue, 30 Apr 2019 06:52:40 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:34110 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727253AbfD3Kwi (ORCPT ); Tue, 30 Apr 2019 06:52:38 -0400 Received: by mail-qk1-f195.google.com with SMTP id n68so7836653qka.1; Tue, 30 Apr 2019 03:52:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=LnKYy8jFj+JVpVc0C/UzgZXSpL4E0hdFTQaCn24mwco=; b=ZoSzjyAFUIkT/IJEHAragzsBdlhhXZzJTUJVioDNkVtECy/vvUL0m8oBhzUu+irnqG OkN4BD3T9QdnGO7JhpIvWx3ufxUQST4hhDUljQiTj5W9n7aM+a1ZaQx35XSwQneiwz9R ZfwuvPcaSOEcH9oMkTtq2YbB/0hWzmP4qAlKhF/2HhOqniJRShrkgJboNt0yK+0vks48 /lNukNAOpB241V+d0DDTcM5aQBXRfvAEhWgnET/BS4JvN9iodjsmHIUeMD0G9fzbPJPe ddROflj3IUdU+gmVAYmnEsg6sfmsePB1ZPudkwyMJvJQojxZpIOuKbYdozVTLoCqlae5 5LxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=LnKYy8jFj+JVpVc0C/UzgZXSpL4E0hdFTQaCn24mwco=; b=iPwAt18yxPHA9pA3RfCyeIvsrbhNfV7zUAJ47XwNVAM5CyxEsjVNFWswzGJZFz/rXW pjtwog6Fj+yKcW2yOTDlm5lj/o1TqVvG1uPOBVDOne1Wn4G8EfGyVeP1PEQtOjvIZF0T 6oNSuxhO4fkZmiBMF5oENyG/TSg/uMATdNV9cM+UMekENMZ8taXaoB7Jhz/ZFC8s8sw6 /bqURkwgCqM/bpZ/fwlsfWB3EzUBLEla6+p1UDuFOB3PcVQwszzY26FpUQzU1d9GsC1s aQGjWl8v3ue1K/YYhIKyNhwIJHj2LCinw8vPJlUnlhZzFoD5O6db4v5xAqOYAGsseuiH Hvbg== X-Gm-Message-State: APjAAAWzjpHd41ZVkAFbVuLgyjZCwDcH2waWobXUbT2+xEhvNgvq7P6N lOlTRY6IW8JjAnLcDiVR2H0= X-Received: by 2002:a37:2c06:: with SMTP id s6mr48810567qkh.142.1556621557170; Tue, 30 Apr 2019 03:52:37 -0700 (PDT) Received: from laptop (189.26.185.89.dynamic.adsl.gvt.net.br. [189.26.185.89]) by smtp.gmail.com with ESMTPSA id w58sm19627363qtw.93.2019.04.30.03.52.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Apr 2019 03:52:35 -0700 (PDT) Date: Tue, 30 Apr 2019 07:52:15 -0300 From: Marcos Paulo de Souza To: "Martin K. Petersen" Cc: linux-block@vger.kernel.org, Jens Axboe , Hannes Reinecke , Omar Sandoval , Ming Lei , Damien Le Moal , Bart Van Assche , Greg Edwards , open list Subject: Re: [PATCH 1/2] blkdev.h: Introduce size_to_sectors hlper function Message-ID: <20190430105212.GA1642767@laptop> References: <20190430013205.1561708-1-marcos.souza.org@gmail.com> <20190430013205.1561708-2-marcos.souza.org@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 29, 2019 at 10:50:32PM -0400, Martin K. Petersen wrote: > > Hi Marco, > > > +static inline sector_t size_to_sectors(long long size) > > +{ > > + return size >> SECTOR_SHIFT; > > +} > > + > > FWIW, in SCSI we have: > > logical_to_sectors() > logical_to_bytes() > bytes_to_logical() > sectors_to_logical() > > I'm not attached to "bytes" in any way but it would be nice to be > consistent. > Thanks for the suggestion. I will send a new version using "bytes_to_sectors" instead. > -- > Martin K. Petersen Oracle Linux Engineering -- Thanks, Marcos