All of lore.kernel.org
 help / color / mirror / Atom feed
* page->index limitation on 32bit system?
@ 2021-02-18  8:54 Qu Wenruo
  2021-02-18 12:15 ` Matthew Wilcox
  0 siblings, 1 reply; 21+ messages in thread
From: Qu Wenruo @ 2021-02-18  8:54 UTC (permalink / raw)
  To: Linux FS Devel; +Cc: linux-btrfs

Hi,

Recently we got a strange bug report that, one 32bit systems like armv6
or non-64bit x86, certain large btrfs can't be mounted.

It turns out that, since page->index is just unsigned long, and on 32bit
systemts, that can just be 32bit.

And when filesystems is utilizing any page offset over 4T, page->index
get truncated, causing various problems.

This is especially a big problem for btrfs, as btrfs uses its internal
address space, which is from 0 to U64_MAX, but still sometimes relies on
page->index, just like most filesystems.

If a metadata is at or beyond 4T boundary (which is not rare, even with
small btrfs, as btrfs can related its chunks to much higher bytenr than
device boundary), then page->index will be truncated and may even
conflicts with existing pages.

I'm wonder if this is a known problem, and if so is there any plan to fix?
If not a known one, does it mean we have to make page->index u64 to fix
it? (this is definitely not going to be easy)

Thanks,
Qu

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2021-03-01  1:50 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18  8:54 page->index limitation on 32bit system? Qu Wenruo
2021-02-18 12:15 ` Matthew Wilcox
2021-02-18 12:42   ` Qu Wenruo
2021-02-18 13:39     ` Matthew Wilcox
2021-02-19  0:37       ` Qu Wenruo
2021-02-19 16:12         ` Theodore Ts'o
2021-02-19 23:10           ` Qu Wenruo
2021-02-20  0:23             ` Matthew Wilcox
2021-02-22  0:19             ` Dave Chinner
2021-02-20  2:20           ` Erik Jensen
2021-02-20  3:40             ` Matthew Wilcox
2021-02-20 23:02       ` Erik Jensen
2021-02-20 23:22         ` Matthew Wilcox
2021-02-21  0:01           ` Erik Jensen
2021-02-21 17:15             ` Matthew Wilcox
2021-02-18 21:27   ` Erik Jensen
2021-02-19 14:22     ` Matthew Wilcox
2021-02-19 17:51       ` Matthew Wilcox
2021-02-19 23:13         ` Qu Wenruo
2021-02-22  1:48       ` Dave Chinner
2021-03-01  1:49         ` GWB

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.