mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Joel Stanley <joel@jms.id.au>,
	Anton Altaparmakov <anton@tuxera.com>,
	linux-ntfs-dev@lists.sourceforge.net,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH v2] fs: ntfs: Disable NTFS_RW for PPC
Date: Tue, 23 Nov 2021 08:11:48 -0800	[thread overview]
Message-ID: <20211123161148.GC2326185@roeck-us.net> (raw)
In-Reply-To: <87a6hvqeq3.fsf@mpe.ellerman.id.au>

On Tue, Nov 23, 2021 at 10:43:48PM +1100, Michael Ellerman wrote:
[ ... ]
> >
> > So we are looking for something like
> >
> > config DISABLE_NTFS_RW
> > 	bool
> > 	default y if PAGE_SIZE_256KB || PPC_256K_PAGES || \
> > 		PAGE_SIZE_64KB || ARM64_64K_PAGES || IA64_PAGE_SIZE_64KB || \
> > 		PARISC_PAGE_SIZE_64KB || PPC_64K_PAGES
> >
> > Anything else ?
> 
> Can we do something like this instead?
> 
> I'm pretty sure it does what we want for NTFS, and also for VMXNET3.
> 
> It is not pretty, but at least keeps the arch specifics out of driver
> Kconfigs.
> 
> cheers
> 
> 
> diff --git a/arch/Kconfig b/arch/Kconfig
> index 26b8ed11639d..d3c4ab249e9c 100644
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -991,6 +991,16 @@ config HAVE_ARCH_COMPAT_MMAP_BASES
>  	  and vice-versa 32-bit applications to call 64-bit mmap().
>  	  Required for applications doing different bitness syscalls.
>  
> +config PAGE_SIZE_LESS_THAN_64KB
> +	def_bool y
> +	depends on !ARM64_64K_PAGES
> +	depends on !IA64_PAGE_SIZE_64KB
> +	depends on !PAGE_SIZE_64KB
> +	depends on !PARISC_PAGE_SIZE_64KB
> +	depends on !PPC_64K_PAGES
> +	depends on !PPC_256K_PAGES
> +	depends on !PAGE_SIZE_256KB
> +

Sure, works for me. I'll wait another day or two for additional feedback
before sending out v3.

Guenter

>  # This allows to use a set of generic functions to determine mmap base
>  # address by giving priority to top-down scheme only if the process
>  # is not in legacy mode (compat task, unlimited stack size or
> diff --git a/fs/ntfs/Kconfig b/fs/ntfs/Kconfig
> index 1667a7e590d8..f93e69a61283 100644
> --- a/fs/ntfs/Kconfig
> +++ b/fs/ntfs/Kconfig
> @@ -52,6 +52,7 @@ config NTFS_DEBUG
>  config NTFS_RW
>  	bool "NTFS write support"
>  	depends on NTFS_FS
> +	depends on PAGE_SIZE_LESS_THAN_64KB
>  	help
>  	  This enables the partial, but safe, write support in the NTFS driver.
>  

      reply	other threads:[~2021-11-23 16:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 23:06 Guenter Roeck
2021-11-23  1:15 ` Joel Stanley
2021-11-23  2:09   ` Guenter Roeck
2021-11-23 11:43     ` Michael Ellerman
2021-11-23 16:11       ` Guenter Roeck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211123161148.GC2326185@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=anton@tuxera.com \
    --cc=joel@jms.id.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ntfs-dev@lists.sourceforge.net \
    --cc=mpe@ellerman.id.au \
    --cc=sfr@canb.auug.org.au \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®