All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
	Hannes Reinecke <hare@suse.com>, Omar Sandoval <osandov@fb.com>,
	Ming Lei <ming.lei@redhat.com>,
	Damien Le Moal <damien.lemoal@wdc.com>,
	Bart Van Assche <bvanassche@acm.org>,
	Greg Edwards <gedwards@ddn.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] blkdev.h: Introduce size_to_sectors hlper function
Date: Tue, 30 Apr 2019 07:52:15 -0300	[thread overview]
Message-ID: <20190430105212.GA1642767@laptop> (raw)
In-Reply-To: <yq1bm0ow6iv.fsf@oracle.com>

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

  reply	other threads:[~2019-04-30 10:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-30  1:32 [PATCH 0/2] Introduce size_to_sectors helper in blkdev.h Marcos Paulo de Souza
2019-04-30  1:32 ` [PATCH 1/2] blkdev.h: Introduce size_to_sectors hlper function Marcos Paulo de Souza
2019-04-30  2:50   ` Martin K. Petersen
2019-04-30 10:52     ` Marcos Paulo de Souza [this message]
2019-05-02 21:51   ` Elliott, Robert (Servers)
2019-04-30  1:32 ` [PATCH 2/2] null_blk: Make use of size_to_sectors helper Marcos Paulo de Souza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190430105212.GA1642767@laptop \
    --to=marcos.souza.org@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=damien.lemoal@wdc.com \
    --cc=gedwards@ddn.com \
    --cc=hare@suse.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ming.lei@redhat.com \
    --cc=osandov@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.