diff --git a/lustre/include/lustre/liblustreapi.h b/lustre/include/lustre/liblustreapi.h index b3c0adfc5408cbff31730a22e6cf6b446ed99f70..ee7307ed7de49e5a7557abb553e5511ade7848f0 100644 --- a/lustre/include/lustre/liblustreapi.h +++ b/lustre/include/lustre/liblustreapi.h @@ -137,6 +137,9 @@ extern int llapi_ping(char *obd_type, char *obd_name); extern int llapi_target_check(int num_types, char **obd_types, char *dir); extern int llapi_catinfo(char *dir, char *keyword, char *node_name); extern int llapi_file_get_lov_uuid(const char *path, struct obd_uuid *lov_uuid); +extern int llapi_file_fget_lov_uuid(int fd, struct obd_uuid *lov_uuid); +/* Use llapi_file_fget_lov_uuid() instead of llapi_file_get_lov_fuuid(), the + * latter is deprecated and will be removed in a later Lustre release. */ extern int llapi_file_get_lov_fuuid(int fd, struct obd_uuid *lov_uuid); extern int llapi_lov_get_uuids(int fd, struct obd_uuid *uuidp, int *ost_count); extern int llapi_is_lustre_mnttype(const char *type); diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c index 015c4224772ada94d9c1edc75ceb605a47d29478..7fc6b4e42df13105fa56c1130d8c0f44e2122d8d 100644 --- a/lustre/utils/liblustreapi.c +++ b/lustre/utils/liblustreapi.c @@ -346,7 +346,7 @@ static void find_param_fini(struct find_param *param) free(param->lmd); } -int llapi_file_get_lov_fuuid(int fd, struct obd_uuid *lov_name) +int llapi_file_fget_lov_uuid(int fd, struct obd_uuid *lov_name) { int rc = ioctl(fd, OBD_IOC_GETNAME, lov_name); if (rc) { @@ -356,6 +356,12 @@ int llapi_file_get_lov_fuuid(int fd, struct obd_uuid *lov_name) return rc; } +/* deprecated in favour of llapi_file_fget_lov_uuid() in 1.8 and 2.0 */ +int llapi_file_get_lov_fuuid(int fd, struct obd_uuid *lov_name) +{ + return llapi_file_fget_lov_uuid(fd, lov_name); +} + int llapi_file_get_lov_uuid(const char *path, struct obd_uuid *lov_uuid) { int fd, rc; @@ -367,7 +373,7 @@ int llapi_file_get_lov_uuid(const char *path, struct obd_uuid *lov_uuid) return rc; } - rc = llapi_file_get_lov_fuuid(fd, lov_uuid); + rc = llapi_file_fget_lov_uuid(fd, lov_uuid); close(fd); @@ -388,7 +394,7 @@ int llapi_lov_get_uuids(int fd, struct obd_uuid *uuidp, int *ost_count) int rc = 0, index = 0; /* Get the lov name */ - rc = llapi_file_get_lov_fuuid(fd, &lov_name); + rc = llapi_file_fget_lov_uuid(fd, &lov_name); if (rc) return rc; @@ -430,7 +436,7 @@ static int setup_obd_uuid(DIR *dir, char *dname, struct find_param *param) int rc = 0, index; /* Get the lov name */ - rc = llapi_file_get_lov_fuuid(dirfd(dir), &lov_uuid); + rc = llapi_file_fget_lov_uuid(dirfd(dir), &lov_uuid); if (rc) { if (errno != ENOTTY) { rc = errno;