Re: [PATCH 1/2] blkdev.h: Introduce size_to_sectors hlper function

From: Marcos Paulo de Souza
Date: Tue Apr 30 2019 - 06:52:43 EST


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