lkml.org 
[lkml]   [2019]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] blkdev.h: Introduce size_to_sectors hlper function
From
Date

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.

--
Martin K. Petersen Oracle Linux Engineering

\
 
 \ /
  Last update: 2019-04-30 04:52    [W:0.071 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site