From: Lucian Petrut Date: Mon, 12 Sep 2022 13:05:33 +0000 (+0000) Subject: client: use CEPHFS_E* X-Git-Tag: v18.1.0~369^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ad0094fa04dbcb70ed1979ad980baa7ec96c4611;p=ceph.git client: use CEPHFS_E* The cephfs client uses CEPHFS_E* errors, except for a few methods that are still using errno values. We're addressing this inconsistency. Signed-off-by: Lucian Petrut --- diff --git a/src/client/Client.cc b/src/client/Client.cc index b1f20c8e7550..21921715c062 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -2539,7 +2539,7 @@ ref_t Client::build_client_request(MetaRequest *request) int max_retry = sizeof(((struct ceph_mds_request_head*)0)->num_retry); max_retry = 1 << (max_retry * CHAR_BIT); if (request->retry_attempt >= max_retry) { - request->abort(-EMULTIHOP); + request->abort(-CEPHFS_EMULTIHOP); request->caller_cond->notify_all(); ldout(cct, 1) << __func__ << " request tid " << request->tid << " seq overflow" << ", abort it" << dendl; @@ -2623,7 +2623,7 @@ void Client::handle_client_request_forward(const MConstRefget_num_fwd(); if (num_fwd <= request->num_fwd || num_fwd >= max_fwd) { if (request->num_fwd >= max_fwd || num_fwd >= max_fwd) { - request->abort(-EMULTIHOP); + request->abort(-CEPHFS_EMULTIHOP); request->caller_cond->notify_all(); ldout(cct, 1) << __func__ << " tid " << tid << " seq overflow" << ", abort it" << dendl; @@ -5952,7 +5952,7 @@ int Client::may_delete(const char *relpath, const UserPerm& perms) { RWRef_t mref_reader(mount_state, CLIENT_MOUNTING); if (!mref_reader.is_state_satisfied()) - return -ENOTCONN; + return -CEPHFS_ENOTCONN; filepath path(relpath); string name = path.last_dentry();