Hi,

On Mon 12-06-17 22:40:14, Pali Rohár wrote:
> Hi! I found that following UDF patch was included into linus tree:
> https://patchwork.kernel.org/patch/9524557/
> 
> It is really a good improvement to recognize UDF file system which have 
> block size different from disk sector size and also different from 2048.
> 
> But should not detection on 4K native disks (4096/4096) try to also use 
> block size of 512 bytes? Because current loop is from logical sector 
> size to 4096.

By definition, bdev_logical_block_size() is the smallest block size a
device can support. So if it is larger than 512, the device driver had
explicitely declared that it cannot handle smaller blocks... Look at the
comment before "blk_queue_logical_block_size":

/**
 * blk_queue_logical_block_size - set logical block size for the queue
 * @q:  the request queue for the device
 * @size:  the logical block size, in bytes
 *
 * Description:
 *   This should be set to the lowest possible block size that the
 *   storage device can address.  The default of 512 covers most
 *   hardware.
 **/


> Anyway, macro UDF_DEFAULT_BLOCKSIZE is not used in udf source code 
> anymore, so it can be deleted. I think its name was incorrect as default 
> block size for UDF should be logical block size of disk, not hardcoded 
> value 2048 which is logical block size for optical media.

Thanks. Removed.

                                                                Honza
-- 
Jan Kara <j...@suse.com>
SUSE Labs, CR

Reply via email to