From 765683bbf71efec84feb79eab5a056c3c273ce92 Mon Sep 17 00:00:00 2001 From: Timothy Day Date: Sat, 8 Mar 2025 17:03:30 -0500 Subject: [PATCH] LU-16518 lod: remove unused dt_object_qos_mkdir() This function was rendered obsolete in a previous patch, but was not removed. Fixes: c1d0a355a6a6 ("LU-12624 lod: alloc dir stripes by QoS") Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: I33ce5a5b745bff7414df8aa04ecf72d68cf8f715 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58351 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin --- lustre/lod/lod_object.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/lustre/lod/lod_object.c b/lustre/lod/lod_object.c index a2b078c..10cbafd 100644 --- a/lustre/lod/lod_object.c +++ b/lustre/lod/lod_object.c @@ -6166,48 +6166,6 @@ out: RETURN(rc); } -/* - * Whether subdirectories under \a dt should be created on MDTs by space QoS - * - * If LMV_HASH_FLAG_SPACE is set on directory default layout, its subdirectories - * should be created on MDT by space QoS. - * - * \param[in] env execution environment - * \param[in] dev lu device - * \param[in] dt object - * - * \retval 1 if directory should create subdir by space usage - * \retval 0 if not - * \retval -ev if failed - */ -static inline int dt_object_qos_mkdir(const struct lu_env *env, - struct lu_device *dev, - struct dt_object *dt) -{ - struct lod_thread_info *info = lod_env_info(env); - struct lu_object *obj; - struct lod_object *lo; - struct lmv_user_md *lmu; - int rc; - - obj = lu_object_find_slice(env, dev, lu_object_fid(&dt->do_lu), NULL); - if (IS_ERR(obj)) - return PTR_ERR(obj); - - lo = lu2lod_obj(obj); - - rc = lod_get_default_lmv_ea(env, lo); - dt_object_put(env, dt); - if (rc <= 0) - return rc; - - if (rc < (int)sizeof(*lmu)) - return -EINVAL; - - lmu = info->lti_ea_store; - return le32_to_cpu(lmu->lum_stripe_offset) == LMV_OFFSET_DEFAULT; -} - /** * Implementation of dt_object_operations::do_declare_create. * -- 1.8.3.1