Re: [PATCH 3/4] loop: Add 'lo_logical_blocksize'

From: Hannes Reinecke
Date: Tue Nov 01 2016 - 12:57:35 EST

On 11/01/2016 03:01 PM, Christoph Hellwig wrote:
On Mon, Oct 31, 2016 at 08:37:18PM +0100, Hannes Reinecke wrote:
Add a new field 'lo_logical_blocksize' to hold the logical
blocksize of the loop device.

Why do we use the same flag for both block sizes? If there is a good
reason for that it should be documented and both should be in the same

_Actually_ the flag enables you to set the logical blocksize.
However, if you want to set the logical blocksize you also have to set a matching physical blocksize.
And the physical blocksize itself isn't settable, rather taken from the underlying device/filesystem/whatever.
So the flag itself does not have a dual purpose, it's just out of necessity that you have to set the physical blocksize if you want to change the logical blocksize.

And I got pushback when I proposed to set the physical blocksize always,
so I made it dependent on the LO_BLOCKSIZE flag, too.


Dr. Hannes Reinecke zSeries & Storage
hare@xxxxxxx +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)