From fcfd78204a9fbd6b2c353403844ca57541d9c5cd Mon Sep 17 00:00:00 2001 From: Li Xi Date: Mon, 25 Aug 2014 16:56:29 +0800 Subject: [PATCH] LU-5405 llog: add newly opened llog at tail of handle list Add newly opened llog handle at the tail of handle list to increase lookup speed, especially for cancel operation, because the canceled log will be removed from the list, and lookup is from the beginning. Signed-off-by: Lai Siyao Signed-off-by: Li Xi Change-Id: I4c5c22901ea5818a8ee50ef97d6dabe4839b9a74 Reviewed-on: http://review.whamcloud.com/11575 Tested-by: Jenkins Reviewed-by: Ian Costello Tested-by: Maloo Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin Conflicts: lustre/obdclass/llog_cat.c --- lustre/obdclass/llog_cat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/obdclass/llog_cat.c b/lustre/obdclass/llog_cat.c index 4ec7794..2a0c9991 100644 --- a/lustre/obdclass/llog_cat.c +++ b/lustre/obdclass/llog_cat.c @@ -201,7 +201,7 @@ int llog_cat_id2handle(const struct lu_env *env, struct llog_handle *cathandle, } down_write(&cathandle->lgh_lock); - cfs_list_add(&loghandle->u.phd.phd_entry, &cathandle->u.chd.chd_head); + cfs_list_add_tail(&loghandle->u.phd.phd_entry, &cathandle->u.chd.chd_head); up_write(&cathandle->lgh_lock); loghandle->u.phd.phd_cat_handle = cathandle; -- 1.8.3.1