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 <mpatocka@xxxxxxxxxx> 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