From: Andreas Dilger Date: Fri, 30 Jun 2023 00:19:06 +0000 (-0600) Subject: LU-14301 client: use EOPNOTSUPP instead of ENOTSUPP X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=3deafa8a39a964c67f533173a5b2f90d0d2d7730;p=fs%2Flustre-release.git LU-14301 client: use EOPNOTSUPP instead of ENOTSUPP Don't return NFS-specific error code ENOTSUPP back to userspace, instead use EOPNOTSUPP. Lustre-change: https://review.whamcloud.com/51511 Lustre-commit: TBD (from 1a0d553000d5a869f9039bab74dbdbb20d4259b0) Signed-off-by: Andreas Dilger Change-Id: Iabd07b31069737e8ee7ca2382fd8cff6143ebbe5 --- diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index dba2477..4894ca7 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -1224,7 +1224,7 @@ int quotactl_ioctl(struct super_block *sb, struct if_quotactl *qctl) break; default: CERROR("unsupported quotactl op: %#x\n", cmd); - RETURN(-ENOTSUPP); + RETURN(-EOPNOTSUPP); } if (valid != QC_GENERAL) { @@ -1517,7 +1517,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg) * to send them to the MDS/OST as appropriate and to properly * network encode the arg field. */ case FS_IOC_SETVERSION: - RETURN(-ENOTSUPP); + RETURN(-EOPNOTSUPP); case LL_IOC_GET_MDTIDX: { int mdtidx; @@ -1673,7 +1673,7 @@ lmv_out_free: case LOV_USER_MAGIC_V1: break; default: - GOTO(out, rc = -ENOTSUPP); + GOTO(out, rc = -EOPNOTSUPP); } /* in v1 and v3 cases lumv1 points to data */ @@ -1873,7 +1873,7 @@ finish_req: * on 2.4, we use OBD_CONNECT_LVB_TYPE to detect whether the * server will support REINT_RMENTRY XXX*/ if (!(exp_connect_flags(sbi->ll_md_exp) & OBD_CONNECT_LVB_TYPE)) - RETURN(-ENOTSUPP); + RETURN(-EOPNOTSUPP); filename = ll_getname((const char __user *)arg); if (IS_ERR(filename)) diff --git a/lustre/llite/lcommon_misc.c b/lustre/llite/lcommon_misc.c index cf4659d..93a49d8 100644 --- a/lustre/llite/lcommon_misc.c +++ b/lustre/llite/lcommon_misc.c @@ -145,7 +145,7 @@ int cl_get_grouplock(struct cl_object *obj, unsigned long gid, int nonblock, cl_env_put(env, &refcheck); /* Does not make sense to take GL for released layout */ if (rc > 0) - rc = -ENOTSUPP; + rc = -EOPNOTSUPP; return rc; } diff --git a/lustre/llite/lproc_llite.c b/lustre/llite/lproc_llite.c index cd28ab1..fbff1cf 100644 --- a/lustre/llite/lproc_llite.c +++ b/lustre/llite/lproc_llite.c @@ -1248,7 +1248,7 @@ static ssize_t xattr_cache_store(struct kobject *kobj, return rc; if (val && !(sbi->ll_flags & LL_SBI_XATTR_CACHE)) - return -ENOTSUPP; + return -EOPNOTSUPP; sbi->ll_xattr_cache_enabled = val; sbi->ll_xattr_cache_set = 1; diff --git a/lustre/llite/pcc.c b/lustre/llite/pcc.c index 20bdac5..3aa1fb6 100644 --- a/lustre/llite/pcc.c +++ b/lustre/llite/pcc.c @@ -4339,7 +4339,7 @@ static int pcc_readonly_attach_sync(struct file *file, struct inode *inode, ENTRY; if (!(ll_i2sbi(inode)->ll_flags & LL_SBI_LAYOUT_LOCK)) - RETURN(-ENOTSUPP); + RETURN(-EOPNOTSUPP); rc = pcc_attach_check_set(inode); if (rc) { @@ -4371,7 +4371,7 @@ int pcc_ioctl_attach(struct file *file, struct inode *inode, switch (attach->pcca_type & LU_PCC_TYPE_MASK) { case LU_PCC_READWRITE: - rc = -ENOTSUPP; + rc = -EOPNOTSUPP; break; case LU_PCC_READONLY: if (attach->pcca_type & LU_PCC_FL_ASYNC && diff --git a/lustre/lov/lov_object.c b/lustre/lov/lov_object.c index d316c5c..558dfdd 100644 --- a/lustre/lov/lov_object.c +++ b/lustre/lov/lov_object.c @@ -1993,12 +1993,12 @@ static int lov_object_fiemap(const struct lu_env *env, struct cl_object *obj, if (lsm->lsm_entry_count > 1 || (lsm->lsm_entry_count == 1 && lsm->lsm_entries[0]->lsme_stripe_count > 1)) - GOTO(out_lsm, rc = -ENOTSUPP); + GOTO(out_lsm, rc = -EOPNOTSUPP); } /* No support for DOM layout yet. */ if (lsme_is_dom(lsm->lsm_entries[0])) - GOTO(out_lsm, rc = -ENOTSUPP); + GOTO(out_lsm, rc = -EOPNOTSUPP); if (lsm->lsm_is_released) { if (fiemap->fm_start < fmkey->lfik_oa.o_size) { diff --git a/lustre/mdc/lproc_mdc.c b/lustre/mdc/lproc_mdc.c index f0b79e9..09457f1 100644 --- a/lustre/mdc/lproc_mdc.c +++ b/lustre/mdc/lproc_mdc.c @@ -248,7 +248,7 @@ static ssize_t mdc_checksum_type_seq_write(struct file *file, obd->u.cli.cl_cksum_type = BIT(i); rc = count; } else { - rc = -ENOTSUPP; + rc = -EOPNOTSUPP; } break; } diff --git a/lustre/mdc/mdc_dev.c b/lustre/mdc/mdc_dev.c index 96e896c..af89311 100644 --- a/lustre/mdc/mdc_dev.c +++ b/lustre/mdc/mdc_dev.c @@ -1305,7 +1305,7 @@ static void mdc_io_data_version_end(const struct lu_env *env, slice->cis_io->ci_result = 0; if (!(oio->oi_oa.o_valid & (OBD_MD_LAYOUT_VERSION | OBD_MD_FLDATAVERSION))) - slice->cis_io->ci_result = -ENOTSUPP; + slice->cis_io->ci_result = -EOPNOTSUPP; if (oio->oi_oa.o_valid & OBD_MD_LAYOUT_VERSION) dv->dv_layout_version = oio->oi_oa.o_layout_version; diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index 9a97281..96c6634 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -108,7 +108,7 @@ static int mdc_get_root(struct obd_export *exp, const char *fileset, ENTRY; if (fileset && !(exp_connect_flags(exp) & OBD_CONNECT_SUBTREE)) - RETURN(-ENOTSUPP); + RETURN(-EOPNOTSUPP); req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_MDS_GET_ROOT); diff --git a/lustre/osc/lproc_osc.c b/lustre/osc/lproc_osc.c index a61300e..9e812dd 100644 --- a/lustre/osc/lproc_osc.c +++ b/lustre/osc/lproc_osc.c @@ -443,7 +443,7 @@ static ssize_t osc_checksum_type_seq_write(struct file *file, obd->u.cli.cl_cksum_type = BIT(i); rc = count; } else { - rc = -ENOTSUPP; + rc = -EOPNOTSUPP; } break; } diff --git a/lustre/osc/osc_io.c b/lustre/osc/osc_io.c index c706048..eccafeb 100644 --- a/lustre/osc/osc_io.c +++ b/lustre/osc/osc_io.c @@ -842,7 +842,7 @@ static void osc_io_data_version_end(const struct lu_env *env, slice->cis_io->ci_result = 0; if (!(oa->o_valid & (OBD_MD_LAYOUT_VERSION | OBD_MD_FLDATAVERSION))) - slice->cis_io->ci_result = -ENOTSUPP; + slice->cis_io->ci_result = -EOPNOTSUPP; if (oa->o_valid & OBD_MD_LAYOUT_VERSION) dv->dv_layout_version = oa->o_layout_version; diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c index 2ffd4df..e7c5006 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -2546,7 +2546,7 @@ int lustre_check_lov_comp_md_v1(struct lov_comp_md_v1 *lum) ent = &lum->lcm_entries[i]; if (!llite_enable_compression && ent->lcme_compr_type != LL_COMPR_TYPE_NONE) { - return -ENOTSUPP; + return -EOPNOTSUPP; } } return rc;