If you don't get a patch from me by tomorrow, then please do it yourself.

I'm about to go away for a 10-14 days.

On Thu, Feb 28, 2019 at 4:33 PM Frank Filz <ffilzlnx@mindspring.com> wrote:

Oops…

 

The if statement at the top of nfs3_read_cb (and I assume nfs3_write_cb also) needs to be re-organized to handle the no-error case first so that doesn’t go through nfs_RetryableError.

 

I can patch, or you can submit, either way.

 

Frank

 

From: Bjorn Leffler [mailto:leffler@google.com]
Sent: Wednesday, February 27, 2019 8:51 PM
To: devel@lists.nfs-ganesha.org
Subject: [NFS-Ganesha-Devel] Correct usage of nfs3_read_cb callback?

 

I'm implementing a new FSAL. At the end of a successful read2() function, I call the callback as follows:

 

void myfsal_read2(struct fsal_obj_handle *obj_hdl,

  bool bypass,

  fsal_async_cb done_cb,

  struct fsal_io_arg *read_arg,

  void *caller_arg){

  // ... read data ...

  fsal_status_t status = fsalstat(ERR_FSAL_NO_ERROR, 0);

  done_cb(obj_hdl, status, read_arg, caller_arg);

}

 

This generates the following error in src/Protocols/NFS/nfs_proto_tools.c, line 213:

nfs_RetryableError :NFS3 :CRIT :Possible implementation error: ERR_FSAL_NO_ERROR managed as an error

 

From the client side, read / write operations work as expected. If I don't call the callback function, the NFS operation doesn't complete.

 

What are the correct usage of the callback functions, after successful operations?

 

Thanks,

Bjorn