From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936635AbcIRVET (ORCPT ); Sun, 18 Sep 2016 17:04:19 -0400 Received: from smtp2.ccs.ornl.gov ([160.91.203.11]:58126 "EHLO smtp2.ccs.ornl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936487AbcIRUkd (ORCPT ); Sun, 18 Sep 2016 16:40:33 -0400 From: James Simmons To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Oleg Drokin Cc: Linux Kernel Mailing List , Lustre Development List , Li Xi , Lai Siyao , James Simmons Subject: [PATCH 022/124] staging: lustre: llog: add newly opened llog at tail of handle list Date: Sun, 18 Sep 2016 16:37:21 -0400 Message-Id: <1474231143-4061-23-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1474231143-4061-1-git-send-email-jsimmons@infradead.org> References: <1474231143-4061-1-git-send-email-jsimmons@infradead.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Li Xi 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 --- drivers/staging/lustre/lustre/obdclass/llog_cat.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; -- 1.7.1