Fixes: https://tracker.ceph.com/issues/43601
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
dout(7) << "dispatch_client_request " << *req << dendl;
- if (mdcache->is_readonly() ||
- (mdr->has_more() && mdr->more()->slave_error == -EROFS)) {
+ if (req->may_write() && mdcache->is_readonly()) {
dout(10) << " read-only FS" << dendl;
respond_to_request(mdr, -EROFS);
return;
}
+ if (mdr->has_more() && mdr->more()->slave_error) {
+ dout(10) << " got error from slaves" << dendl;
+ respond_to_request(mdr, mdr->more()->slave_error);
+ return;
+ }
if (is_full) {
if (req->get_op() == CEPH_MDS_OP_SETLAYOUT ||