Re: [PATCH 2/2] loop: support 4k physical blocksize

2016-11-03 Thread Ming Lei
On Thu, Nov 3, 2016 at 10:26 PM, Christoph Hellwig wrote: >> -figure_loop_size(struct loop_device *lo, loff_t offset, loff_t sizelimit) >> +figure_loop_size(struct loop_device *lo, loff_t offset, loff_t sizelimit, >> + loff_t logical_blocksize) >> { >> loff_t size

Re: [PATCH 2/2] loop: support 4k physical blocksize

2016-11-03 Thread Ming Lei
On Thu, Nov 3, 2016 at 10:26 PM, Christoph Hellwig wrote: >> -figure_loop_size(struct loop_device *lo, loff_t offset, loff_t sizelimit) >> +figure_loop_size(struct loop_device *lo, loff_t offset, loff_t sizelimit, >> + loff_t logical_blocksize) >> { >> loff_t size =

Re: [PATCH 2/2] loop: support 4k physical blocksize

2016-11-03 Thread Christoph Hellwig
> -figure_loop_size(struct loop_device *lo, loff_t offset, loff_t sizelimit) > +figure_loop_size(struct loop_device *lo, loff_t offset, loff_t sizelimit, > + loff_t logical_blocksize) > { > loff_t size = get_size(offset, sizelimit, lo->lo_backing_file); > sector_t x =

Re: [PATCH 2/2] loop: support 4k physical blocksize

2016-11-03 Thread Christoph Hellwig
> -figure_loop_size(struct loop_device *lo, loff_t offset, loff_t sizelimit) > +figure_loop_size(struct loop_device *lo, loff_t offset, loff_t sizelimit, > + loff_t logical_blocksize) > { > loff_t size = get_size(offset, sizelimit, lo->lo_backing_file); > sector_t x =

[PATCH 2/2] loop: support 4k physical blocksize

2016-11-03 Thread Hannes Reinecke
When generating bootable VM images certain systems (most notably s390x) require devices with 4k blocksize. This patch implements a new flag 'LO_FLAGS_BLOCKSIZE' which will set the physical blocksize to that of the underlying device, and allow to change the logical blocksize for up to the physical

[PATCH 2/2] loop: support 4k physical blocksize

2016-11-03 Thread Hannes Reinecke
When generating bootable VM images certain systems (most notably s390x) require devices with 4k blocksize. This patch implements a new flag 'LO_FLAGS_BLOCKSIZE' which will set the physical blocksize to that of the underlying device, and allow to change the logical blocksize for up to the physical