ceph: if we are blacklisted, __do_request returns directly
diff mbox series

Message ID 20200417083448.9122-1-gmayyyha@gmail.com
State New
Headers show
Series
  • ceph: if we are blacklisted, __do_request returns directly
Related show

Commit Message

Yanhu Cao April 17, 2020, 8:34 a.m. UTC
Signed-off-by: Yanhu Cao <gmayyyha@gmail.com>
---
 fs/ceph/mds_client.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Yanhu Cao April 17, 2020, 9:18 a.m. UTC | #1
DNM. will add test mount option recover_session.

On Fri, Apr 17, 2020 at 4:35 PM Yanhu Cao <gmayyyha@gmail.com> wrote:
>
> Signed-off-by: Yanhu Cao <gmayyyha@gmail.com>
> ---
>  fs/ceph/mds_client.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index 486f91f9685b..d2ea755b7c02 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -2708,6 +2708,11 @@ static void __do_request(struct ceph_mds_client *mdsc,
>
>         put_request_session(req);
>
> +       if (mdsc->fsc->blacklisted) {
> +               err = -EACCES;
> +               goto finish;
> +       }
> +
>         mds = __choose_mds(mdsc, req, &random);
>         if (mds < 0 ||
>             ceph_mdsmap_get_state(mdsc->mdsmap, mds) < CEPH_MDS_STATE_ACTIVE) {
> --
> 2.24.2 (Apple Git-127)
>

Patch
diff mbox series

diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 486f91f9685b..d2ea755b7c02 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -2708,6 +2708,11 @@  static void __do_request(struct ceph_mds_client *mdsc,
 
 	put_request_session(req);
 
+	if (mdsc->fsc->blacklisted) {
+		err = -EACCES;
+		goto finish;
+	}
+
 	mds = __choose_mds(mdsc, req, &random);
 	if (mds < 0 ||
 	    ceph_mdsmap_get_state(mdsc->mdsmap, mds) < CEPH_MDS_STATE_ACTIVE) {