@@ -1634,10 +1634,10 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return ll_obd_statfs(inode, (void __user *)arg);
case LL_IOC_LOV_GETSTRIPE:
case LL_IOC_LOV_GETSTRIPE_NEW:
- case LL_IOC_MDC_GETINFO:
- case LL_IOC_MDC_GETINFO_OLD:
- case IOC_MDC_GETFILEINFO:
- case IOC_MDC_GETFILEINFO_OLD:
+ case LL_IOC_MDC_GETINFO_V1:
+ case LL_IOC_MDC_GETINFO_V2:
+ case IOC_MDC_GETFILEINFO_V1:
+ case IOC_MDC_GETFILEINFO_V2:
case IOC_MDC_GETFILESTRIPE: {
struct ptlrpc_request *request = NULL;
struct ptlrpc_request *root_request = NULL;
@@ -1652,8 +1652,8 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
struct lu_fid __user *fidp = NULL;
int lmmsize;
- if (cmd == IOC_MDC_GETFILEINFO_OLD ||
- cmd == IOC_MDC_GETFILEINFO ||
+ if (cmd == IOC_MDC_GETFILEINFO_V1 ||
+ cmd == IOC_MDC_GETFILEINFO_V2 ||
cmd == IOC_MDC_GETFILESTRIPE) {
filename = ll_getname((const char __user *)arg);
if (IS_ERR(filename))
@@ -1675,10 +1675,10 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
goto out_req;
}
- if (rc == -ENODATA && (cmd == IOC_MDC_GETFILEINFO ||
- cmd == LL_IOC_MDC_GETINFO ||
- cmd == IOC_MDC_GETFILEINFO_OLD ||
- cmd == LL_IOC_MDC_GETINFO_OLD)) {
+ if (rc == -ENODATA && (cmd == IOC_MDC_GETFILEINFO_V1 ||
+ cmd == LL_IOC_MDC_GETINFO_V1 ||
+ cmd == IOC_MDC_GETFILEINFO_V2 ||
+ cmd == LL_IOC_MDC_GETINFO_V2)) {
lmmsize = 0;
rc = 0;
}
@@ -1690,8 +1690,8 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
cmd == LL_IOC_LOV_GETSTRIPE ||
cmd == LL_IOC_LOV_GETSTRIPE_NEW) {
lump = (struct lov_user_md __user *)arg;
- } else if (cmd == IOC_MDC_GETFILEINFO_OLD ||
- cmd == LL_IOC_MDC_GETINFO_OLD){
+ } else if (cmd == IOC_MDC_GETFILEINFO_V1 ||
+ cmd == LL_IOC_MDC_GETINFO_V1) {
struct lov_user_mds_data_v1 __user *lmdp;
lmdp = (struct lov_user_mds_data_v1 __user *)arg;
@@ -1724,8 +1724,8 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
rc = -EOVERFLOW;
}
- if (cmd == IOC_MDC_GETFILEINFO_OLD ||
- cmd == LL_IOC_MDC_GETINFO_OLD) {
+ if (cmd == IOC_MDC_GETFILEINFO_V1 ||
+ cmd == LL_IOC_MDC_GETINFO_V1) {
lstat_t st = { 0 };
st.st_dev = inode->i_sb->s_dev;
@@ -1748,8 +1748,8 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
rc = -EFAULT;
goto out_req;
}
- } else if (cmd == IOC_MDC_GETFILEINFO ||
- cmd == LL_IOC_MDC_GETINFO) {
+ } else if (cmd == IOC_MDC_GETFILEINFO_V2 ||
+ cmd == LL_IOC_MDC_GETINFO_V2) {
struct statx stx = { 0 };
u64 valid = body->mbo_valid;
@@ -1783,7 +1783,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
* However, this whould be better decided by the MDS
* instead of the client.
*/
- if (cmd == LL_IOC_MDC_GETINFO &&
+ if (cmd == LL_IOC_MDC_GETINFO_V2 &&
ll_i2info(inode)->lli_lsm_md)
valid &= ~(OBD_MD_FLSIZE | OBD_MD_FLBLOCKS);
@@ -86,8 +86,6 @@
#define fstatat_f fstatat
#endif
-#define HAVE_LOV_USER_MDS_DATA
-
#define LUSTRE_EOF 0xffffffffffffffffULL
/* for statfs() */
@@ -384,10 +382,12 @@ struct ll_ioc_lease_id {
#define IOC_MDC_TYPE 'i'
#define IOC_MDC_LOOKUP _IOWR(IOC_MDC_TYPE, 20, struct obd_device *)
#define IOC_MDC_GETFILESTRIPE _IOWR(IOC_MDC_TYPE, 21, struct lov_user_md *)
-#define IOC_MDC_GETFILEINFO_OLD _IOWR(IOC_MDC_TYPE, 22, struct lov_user_mds_data_v1 *)
-#define IOC_MDC_GETFILEINFO _IOWR(IOC_MDC_TYPE, 22, struct lov_user_mds_data)
-#define LL_IOC_MDC_GETINFO_OLD _IOWR(IOC_MDC_TYPE, 23, struct lov_user_mds_data_v1 *)
-#define LL_IOC_MDC_GETINFO _IOWR(IOC_MDC_TYPE, 23, struct lov_user_mds_data)
+#define IOC_MDC_GETFILEINFO_V1 _IOWR(IOC_MDC_TYPE, 22, struct lov_user_mds_data_v1 *)
+#define IOC_MDC_GETFILEINFO_V2 _IOWR(IOC_MDC_TYPE, 22, struct lov_user_mds_data)
+#define LL_IOC_MDC_GETINFO_V1 _IOWR(IOC_MDC_TYPE, 23, struct lov_user_mds_data_v1 *)
+#define LL_IOC_MDC_GETINFO_V2 _IOWR(IOC_MDC_TYPE, 23, struct lov_user_mds_data)
+#define IOC_MDC_GETFILEINFO IOC_MDC_GETFILEINFO_V1
+#define LL_IOC_MDC_GETINFO LL_IOC_MDC_GETINFO_V1
#define MAX_OBD_NAME 128 /* If this changes, a NEW ioctl must be added */
@@ -658,7 +658,6 @@ static inline __u32 lov_user_md_size(__u16 stripes, __u32 lmm_magic)
* use this. It is unsafe to #define those values in this header as it
* is possible the application has already #included <sys/stat.h>.
*/
-#ifdef HAVE_LOV_USER_MDS_DATA
#define lov_user_mds_data lov_user_mds_data_v2
struct lov_user_mds_data_v1 {
lstat_t lmd_st; /* MDS stat struct */
@@ -678,7 +677,6 @@ struct lov_user_mds_data_v3 {
lstat_t lmd_st; /* MDS stat struct */
struct lov_user_md_v3 lmd_lmm; /* LOV EA V3 user data */
} __attribute__((packed));
-#endif
struct lmv_user_mds_data {
struct lu_fid lum_fid;