From: Milan Broz Subject: Re: [git pull] device mapper changes for 4.21 Date: Thu, 3 Jan 2019 08:45:27 +0100 Message-ID: References: <20181227160944.GA12190@redhat.com> <20181230090646.GB1022@infradead.org> <20190103072754.GA2667@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190103072754.GA2667@infradead.org> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Christoph Hellwig , Linus Torvalds Cc: Sweet Tea , wuzhouhui , AliOS system security , Nikos Tsironis , Mike Snitzer , Eric Biggers , Heinz Mauelshagen , Shenghui Wang , linux-block , dm-devel@redhat.com, Mikulas Patocka , Jaegeuk Kim , Colin Ian King , Milan Broz , Alasdair G Kergon List-Id: dm-devel.ids On 03/01/2019 08:27, Christoph Hellwig wrote: > On Sun, Dec 30, 2018 at 04:25:46PM -0800, Linus Torvalds wrote: >> On Sun, Dec 30, 2018 at 11:15 AM Mikulas Patocka wrote: >>> >>> But you're right that 2TiB devices are common and that perhaps this option >>> should go away. >> >> 2TiB devices are definitely not common in the one situation where this >> option might matter: small embedded devices. >> >> I don't think the cost of 64 bit is in the arithmetic, but it might be >> in some of the data structures. >> >> But my gut feel is that it probably doesn't much matter, and we could >> get rid of the config option without anybody ever noticing. I don't >> think we have that many data structures with 'sector_t' in them. >> >> We might try to first just force the option on, and see if anybody even cares. > > Our smallest embedded devices use raw flash using the MTD subsystem, > and even that is using 64-bit size types everywhere. So I'd be really > surprised if it is an issue. I agree with Christoph here. (I fixed some CONFIG_LBDAF problems in DM in this pull request because the code was apparently wrong, but it was a pain to see all these possible sector overflow checks...) If it helps anything, we require 64-bit calculations for cryptsetup userspace for >5 years (you cannot compile it with 32bit support; everything uses 64bit, including these DM table sector calculations for kernel) and NOBODY complained since we enforced it. (Ok, it is not a hot path, but....) Please, if possible, go with 64-bit sector size types by default in future. Thanks, Milan