From: Li Xi Date: Sun, 18 Sep 2016 20:37:21 +0000 (-0400) Subject: staging: lustre: llog: add newly opened llog at tail of handle list X-Git-Tag: v4.9.8~1233^2~481 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=460554c3587ae0e0ff82f175f926eecbb225ee41;p=platform%2Fkernel%2Flinux-rpi3.git staging: lustre: 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 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5405 Reviewed-on: http://review.whamcloud.com/11575 Reviewed-by: Ian Costello Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/obdclass/llog_cat.c b/drivers/staging/lustre/lustre/obdclass/llog_cat.c index d28751a..b27f08f 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog_cat.c +++ b/drivers/staging/lustre/lustre/obdclass/llog_cat.c @@ -107,7 +107,7 @@ static int llog_cat_id2handle(const struct lu_env *env, } down_write(&cathandle->lgh_lock); - list_add(&loghandle->u.phd.phd_entry, &cathandle->u.chd.chd_head); + 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;