[PATCH] Add missing async fsync_send()/recv() code to ceph VFS.
jra at samba.org
Wed May 2 16:36:03 UTC 2018
On Wed, May 02, 2018 at 07:15:26AM +0300, Uri Simchoni wrote:
> On 05/02/2018 12:10 AM, Jeremy Allison wrote:
> > On Tue, May 01, 2018 at 10:52:30PM +0300, Uri Simchoni wrote:
> >> Hmm... if you can get rid of READ, that's great but do you really want
> >> to get rid of PREAD/PWRITE?
> >> To quote your SambaXP performance talk , the best IO strategy
> >> "Completely depends on available system resources" and on access patterns.
> >> Taking the "tweaking power" away from users/vendors might upset some people.
> >> 
> >> https://sambaxp.org/archive_data/SambaXP2012-DATA/thu/track1/Jeremy_Allison-The-Evolution-of-IO.pdf
> > Well, I'm trying to simplify the VFS so that the
> > primary access methods are async.
> > If you want sync you can always wrap the sync calls
> > inside an async tevent wrapper - exactly how I did
> > in the "fake" async fsync_send/fsync_recv I implemented
> > for ceph (as far as I know, the ceph userspace library
> > doesn't have async IO). That way, although the smbd
> > code is making async calls, underneath the covers
> > it's actually doing sync requests.
> Fair enough - so we can keep "aio write size" and just tuck it into the
> default VFS, or remove it and then restore it into the default VFS if
> too many people complain :)
I was thinking more... In order to keep the ability
try real async
-> fallback: try recvfile
-> fallback: try sync
We could add an bool to the _send VFS calls that
we set to true when we insist on "true" async,
and set to false when we can code with 'faked'
async (sync using tevent under the covers).
Argghh. This is getting too complex. Maybe
it's just better to keep the PREAD/PWRITE
VFS calls as sync versions separate instead.
More information about the samba-technical