From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751774AbdFOIea (ORCPT ); Thu, 15 Jun 2017 04:34:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:46182 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750777AbdFOIe3 (ORCPT ); Thu, 15 Jun 2017 04:34:29 -0400 Date: Thu, 15 Jun 2017 10:34:27 +0200 From: Jan Kara To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Jan Kara , Fabian Frederick , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: udf: allow implicit blocksize specification during mount Message-ID: <20170615083427.GE1764@quack2.suse.cz> References: <201706122240.14996@pali> <20170613125955.GA20258@quack2.suse.cz> <201706142136.45895@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201706142136.45895@pali> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 14-06-17 21:36:45, Pali Rohár wrote: > On Tuesday 13 June 2017 14:59:55 Jan Kara wrote: > > 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... > > Ok, but it is a really problem when trying to read data from filesystem > 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 > can send only block of 4096 bytes (as it does not support smaller > block). Driver receives 4096 bytes, then it process just first 512 bytes > and do not care about remaining data... Well, as much as I agree this is possible in principle, the block layer, block device page cache etc. don't handle this so it would be a non-trivial effort to support this. Honza -- Jan Kara SUSE Labs, CR