lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190430105212.GA1642767@laptop>
Date:   Tue, 30 Apr 2019 07:52:15 -0300
From:   Marcos Paulo de Souza <marcos.souza.org@...il.com>
To:     "Martin K. Petersen" <martin.petersen@...cle.com>
Cc:     linux-block@...r.kernel.org, Jens Axboe <axboe@...nel.dk>,
        Hannes Reinecke <hare@...e.com>,
        Omar Sandoval <osandov@...com>, Ming Lei <ming.lei@...hat.com>,
        Damien Le Moal <damien.lemoal@....com>,
        Bart Van Assche <bvanassche@....org>,
        Greg Edwards <gedwards@....com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] blkdev.h: Introduce size_to_sectors hlper function

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ