On Thu, Jun 24, 2021 at 07:41:12AM +0100, Christoph Hellwig wrote: > I'm also really worried with overloading the regular r/w path and > iov_iter with ever more special cases. We already have various > performance problems in the path, and adding more special cases ain't > gonna help. The changes to the normal path are: * An extra check for RWF_ENCODED and FMODE_ENCODED_IO in kiocb_set_rw_flags(). * Splitting some of the checks in generic_write_checks() into a new function. * Checks for the IOCB_ENCODED flag in the filesystem's read_iter/write_iter. At least for Btrfs, the rest happens in a completely separate code path. So, there are a couple of extra checks, but it's not as drastic as it might first appear.