On Sunday 16 February 2025 10:34:32 Eric Biggers wrote: > On Sun, Feb 16, 2025 at 05:40:26PM +0100, Pali Rohár wrote: > > This allows to get or set FS_COMPR_FL and FS_ENCRYPT_FL bits via FS_IOC_FSGETXATTR/FS_IOC_FSSETXATTR API. > > > > Signed-off-by: Pali Rohár <pali@xxxxxxxxxx> > > Does this really allow setting FS_ENCRYPT_FL via FS_IOC_FSSETXATTR, and how does > this interact with the existing fscrypt support in ext4, f2fs, ubifs, and ceph > which use that flag? In the fscrypt case it's very intentional that > FS_ENCRYPT_FL can be gotten via FS_IOC_GETFLAGS but not set via FS_IOC_SETFLAGS. > A simple toggle of the flag can't work, as it doesn't provide the needed > information. Instead there is a separate ioctl (FS_IOC_SET_ENCRYPTION_POLICY) > for enabling encryption which takes additional parameters and only works on > empty directories. > > - Eric This encrypt flag I have not implemented in the last cifs patch. For SMB it needs to use additional SMB IOCTL which is not supported yet. So I have not looked at that deeply yet. I tested only that setting and clearing compression bit is working over cifs SMB client, via that additional SMB IOCTL.