Re: [RFC 0/4] fs: provide per-filesystem options to disable fscrypt

Theodore Ts'o
2022-11-10T15:38:52Z

On Thu, Nov 10, 2022 at 03:12:21PM +0100, Niels de Vos wrote:
> While more filesystems are getting support for fscrypt, it is useful to
> be able to disable fscrypt for a selection of filesystems, while
> enabling it for others.

Could you say why you find it useful? Is it because you are concerned
about the increased binary size of a particular file system if fscrypt
is enabled? That hasn't been my experience, the hooks to call into
fscrypt are small and don't add too much to any one particular file
system; the bulk of the code is in fs/crypto.

Is it because people are pushing buggy code that doesn't compile if
you enable, say, CONFIG_FS_XXX and CONFIG_FSCRYPT at the same time?

Is it because a particular distribution doesn't want to support
fscrypt with a particular file system? If so, there have been plenty
of file system features for say, ext4, xfs, and btrfs, which aren't
supported by a distro, but there isn't a CONFIG_FS_XXX_YYY to disable
that feature, nor have any distros requested such a thing --- which is
good because it would be an explosion of new CONFIG parameters.

Or is it something else?

Note that nearly all of the file systems will only enable fscrypt if
some file system feature flag enabls it. So I'm not sure what's the
motivation behind adding this configuration option. If memory serves,
early in the fscrypt development we did have per-file system CONFIG's
for fscrypt, but we consciously removed it, just as we no longer have
per-file system CONFIG's to enable or disable Posix ACL's or extended
attributes, in the name of simplifying the kernel config.

Cheers,

- Ted