Bug #23291

Updated by Jeff Layton over 2 years ago

Zheng pointed out that we could end up with a setattr request being cached in the libcephfs client after it has replied with success to the application. This is problematic for ganesha:

1/ NFS client does a NFS SETATTR
2/ ganesha issues setattrx to libcephfs, result is cached in client and not sent to MDS
3/ ganesha replies with success to client
4/ ganesha crashes

setattrx changes are then lost.

NFS expects setattr requests to be durable. The right fix is probably to allow the application ceph client to request that a setattrx be forced through to the MDS. In practice, ganesha and samba will almost never want the client to cache the results of a setattr.

In the libcephfs code the decision to cache the change is done in _do_setattr. We just need to provide some way to force the change to go to the MDS, even when it holds the appropriate caps. Alternately, we could just always have ceph_ll_setattr do that. AFAIK, ganesha is the only caller of that function user so far.