On 2/6/18 8:25 AM, Daniel Gryniewicz wrote:
Hi, all.
I've worked up a sample API for async/vector for FSAL ops. The example op is read(), and I've "implemented" it for all FSALs, so that I can verify that it does, in fact, work for some definition of work.
I'm a bit surprised it works, as the alloca needs the sizeof struct PLUS the
sizeof iov * iov_count. Right now it's writing off the end.
"asynchronous: has an 'h' in it.
"it's" means "it is". Most places should be "its".
To be async, need to move the status return into the arg struct, and pass
NULL for the caller's parameter at the top level.
Why not move the other arguments into the struct?
* bypass
* state
* offset
Also it will be the same for write, so we can just name it
struct fsal_cb_arg -- and the function typedef fsal_cb to match.
Why not get rid of fsal_read2(), and call the function directly in
the 3 places it's used?
Anyway, a good effort. I see how you've wrapped for stacking. Thanks!
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel