Skip to contentSkip to conversation

fs: ntfs: Mark NTFS_RW as BROKEN for PPC

PATCH In review Guenter Roeck 2 participants 2 messages Nov 22, 2021 NTFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: ntfs: Mark NTFS_RW as BROKEN for PPC

NTFS_RW code allocates page size dependent arrays on the stack. This results in build failures if the page size is 64k, which is now the default for PPC.

fs/ntfs/aops.c: In function 'ntfs_write_mst_block':
fs/ntfs/aops.c:1311:1: error:
the frame size of 2240 bytes is larger than 2048 bytes

Increasing the maximum frame size for PPC just to silence this error does not really help. It would have to be set to a really large value for 256k pages. Such a large frame size could potentially result in stack overruns in this code and elsewhere and is therefore not desirable. Mark NTFS_RW as broken for PPC instead.

Cc Michael Ellerman <[email protected]>
Cc Stephen Rothwell <[email protected]>
Cc Linus Torvalds <[email protected]>

---
The Kconfig language does not support "depends on XXX if YYY", so this is the next best choice.

 fs/ntfs/Kconfig | 1 +
 1 file changed, 1 insertion(+)
fs/ntfs/Kconfig +1 -0
index 1667a7e590d8..094ddef6010a 100644
@@ -51,6 +51,7 @@ config NTFS_DEBUG
 
 config NTFS_RW
 	bool "NTFS write support"
+	depends on BROKEN || !PPC
 	depends on NTFS_FS
 	help
 	  This enables the partial, but safe, write support in the NTFS driver.
Signature · 1 line
2.33.0
#1 lore raw
Quoted 3 lines · Guenter Roeck

The Kconfig language does not support "depends on XXX if YYY", so this is the next best choice.

Ugh. This is hard to read, and it will get much worse if we then end up making the conditional more complicated if we actually want to introduce some page size logic..

Quoted 6 lines

config NTFS_RW
bool "NTFS write support"
+ depends on BROKEN || !PPC
depends on NTFS_FS
help
This enables the partial, but safe, write support in the NTFS driver.

How about we do a

config DISABLE_NTFS_RW
bool
default y if PPC

and then in NTFS_RW we just do

depends on !DISABLE_NTFS_RW

which at least makes each case easy, and makes it much clearer if we extend that DISABLE_NTFS_RW condition later.

Linus