From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com ([209.85.128.193]:35761 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752004AbdFNTgt (ORCPT ); Wed, 14 Jun 2017 15:36:49 -0400 From: Pali =?utf-8?q?Roh=C3=A1r?= To: Jan Kara Subject: Re: udf: allow implicit blocksize specification during mount Date: Wed, 14 Jun 2017 21:36:45 +0200 Cc: Fabian Frederick , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org References: <201706122240.14996@pali> <20170613125955.GA20258@quack2.suse.cz> In-Reply-To: <20170613125955.GA20258@quack2.suse.cz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart71337091.9CMYGYe9H6"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201706142136.45895@pali> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: --nextPart71337091.9CMYGYe9H6 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Tuesday 13 June 2017 14:59:55 Jan Kara wrote: > Hi, >=20 > On Mon 12-06-17 22:40:14, Pali Roh=C3=A1r wrote: > > Hi! I found that following UDF patch was included into linus tree: > > https://patchwork.kernel.org/patch/9524557/ > >=20 > > 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. > >=20 > > 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. >=20 > 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... Ok, but it is a really problem when trying to read data from filesystem=20 which has smaller blocks as the smallest block size of a device? In the worst case filesystem driver needs to read 512 bytes, but device=20 can send only block of 4096 bytes (as it does not support smaller=20 block). Driver receives 4096 bytes, then it process just first 512 bytes=20 and do not care about remaining data... > Look at the comment before "blk_queue_logical_block_size": >=20 > /** > * 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. > **/ >=20 > > 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. >=20 > Thanks. Removed. >=20 > Honza =2D-=20 Pali Roh=C3=A1r pali.rohar@gmail.com --nextPart71337091.9CMYGYe9H6 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAllBkE0ACgkQi/DJPQPkQ1LYTACfb7QJ9a/QaqREKWXcb9eqkHwT rH0AoKD7OoZZkNlaE/dqsZc+oeaqEzDV =Wf4T -----END PGP SIGNATURE----- --nextPart71337091.9CMYGYe9H6--