diff mbox series

[20/49] lustre: uapi: remove OBD_IOC_LOV_GET_CONFIG

Message ID 1618459361-17909-21-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: sync to OpenSFS as of March 30 2021 | expand

Commit Message

James Simmons April 15, 2021, 4:02 a.m. UTC
From: Andreas Dilger <adilger@whamcloud.com>

The "lctl lov_getconfig" command has been obsolete for some time,
but was kept around for sanity test_44a to work properly.  Now
that LU-11656 has landed, "lfs getstripe -d $DIR" can be used to
get the actual layout used for files created in a directory.

Remove the lov_getconfig command along with the IOC definition
it was using.

WC-bug-id: https://jira.whamcloud.com/browse/LU-13107
Lustre-commit: d2cb789537485eec ("LU-13107 utils: remove lctl lov_getconfig command")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/37106
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/lov/lov_obd.c                  | 43 --------------------------------
 include/uapi/linux/lustre/lustre_ioctl.h |  3 +--
 2 files changed, 1 insertion(+), 45 deletions(-)
diff mbox series

Patch

diff --git a/fs/lustre/lov/lov_obd.c b/fs/lustre/lov/lov_obd.c
index 9554d85..2939d66 100644
--- a/fs/lustre/lov/lov_obd.c
+++ b/fs/lustre/lov/lov_obd.c
@@ -964,7 +964,6 @@  static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 	struct obd_device *obd = class_exp2obd(exp);
 	struct lov_obd *lov = &obd->u.lov;
 	int i = 0, rc = 0, count = lov->desc.ld_tgt_count;
-	struct obd_uuid *uuidp;
 
 	switch (cmd) {
 	case IOC_OBD_STATFS: {
@@ -1013,48 +1012,6 @@  static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 			return -EFAULT;
 		break;
 	}
-	case OBD_IOC_LOV_GET_CONFIG: {
-		struct obd_ioctl_data *data;
-		struct lov_desc *desc;
-		u32 *genp;
-
-		len = 0;
-		if (obd_ioctl_getdata(&data, &len, uarg))
-			return -EINVAL;
-
-		if (sizeof(*desc) > data->ioc_inllen1) {
-			kvfree(data);
-			return -EINVAL;
-		}
-
-		if (sizeof(uuidp->uuid) * count > data->ioc_inllen2) {
-			kvfree(data);
-			return -EINVAL;
-		}
-
-		if (sizeof(u32) * count > data->ioc_inllen3) {
-			kvfree(data);
-			return -EINVAL;
-		}
-
-		desc = (struct lov_desc *)data->ioc_inlbuf1;
-		memcpy(desc, &lov->desc, sizeof(*desc));
-
-		uuidp = (struct obd_uuid *)data->ioc_inlbuf2;
-		genp = (u32 *)data->ioc_inlbuf3;
-		/* the uuid will be empty for deleted OSTs */
-		for (i = 0; i < count; i++, uuidp++, genp++) {
-			if (!lov->lov_tgts[i])
-				continue;
-			*uuidp = lov->lov_tgts[i]->ltd_uuid;
-			*genp = lov->lov_tgts[i]->ltd_gen;
-		}
-
-		if (copy_to_user(uarg, data, len))
-			rc = -EFAULT;
-		kvfree(data);
-		break;
-	}
 	case OBD_IOC_QUOTACTL: {
 		struct if_quotactl *qctl = karg;
 		struct lov_tgt_desc *tgt = NULL;
diff --git a/include/uapi/linux/lustre/lustre_ioctl.h b/include/uapi/linux/lustre/lustre_ioctl.h
index 7d48e27..be388fc 100644
--- a/include/uapi/linux/lustre/lustre_ioctl.h
+++ b/include/uapi/linux/lustre/lustre_ioctl.h
@@ -163,10 +163,9 @@  static inline __u32 obd_ioctl_packlen(struct obd_ioctl_data *data)
 #define OBD_IOC_GETNAME		_IOWR('f', 131, OBD_IOC_DATA_TYPE)
 #define OBD_IOC_GETMDNAME	_IOR('f', 131, char[MAX_OBD_NAME])
 #define OBD_IOC_GETDTNAME	OBD_IOC_GETNAME
-#define OBD_IOC_LOV_GET_CONFIG	_IOWR('f', 132, OBD_IOC_DATA_TYPE)
+/*	OBD_IOC_LOV_GET_CONFIG	_IOWR('f', 132, OBD_IOC_DATA_TYPE) until 2.14 */
 #define OBD_IOC_CLIENT_RECOVER	_IOW('f', 133, OBD_IOC_DATA_TYPE)
 /* was	OBD_IOC_PING_TARGET	_IOW('f', 136, OBD_IOC_DATA_TYPE) until 2.11 */
-
 /*	OBD_IOC_DEC_FS_USE_COUNT _IO('f', 139) */
 /* was OBD_IOC_NO_TRANSNO      _IOW('f', 140, OBD_IOC_DATA_TYPE) until 2.14 */
 #define OBD_IOC_SET_READONLY	_IOW('f', 141, OBD_IOC_DATA_TYPE)