As 'aio read size = 1' and 'aio write size = 1' by default in 4.8.0 and above, all VFS modules that implement pread/pwrite *must* also implement at least a fallback pread_send/pwrite_send that returns an error. The reason is that with aio turned on as the the default smbd code tries async pread_send/pwrite_send first, and only if that fails falls back to the synchronous pread/pwrite path. As VFS modules stack on top of vfs_default by default, any module that implements pread/pwrite without also implementing pread_send/pwrite_send will be calling the default vfs pread_send/pwrite_send instead of the custom versions. For most modules this doesn't matter, but for modules like CEPH which should never call down to the default POSIX layer this can cause error. Fix to follow.
Created attachment 14191 [details] git-am fix for 4.8.next Back-ported from master.
Checked carefully, and the only other modules that implement pread/pwrite without pread_send/pwrite_send are non-stackable (readahead etc. that call directly into underlying POSIX functions as does vfs_default). So I think this is the only patch needed to fix this on all VFS modules in 4.8.x.
Re-assigning to Karolin for inclusion in 4.8.next.
@Jeremy: I'd like to pull in the same patch for (maintenance mode) 4.7, despite the differing "aio read/write size" defaults. I've done sanity testing locally - are you okay with that?
Sure, I'm happy with that. If anyone sets aio read/write size to anything other than 0 then it's also needed for 4.7.x.
Pushed to autobuild-v4-{8,7}-test.
(In reply to Karolin Seeger from comment #6) Pushed to both branches. Closing out bug report. Thanks!