]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: lustre: llog: add newly opened llog at tail of handle list
authorLi Xi <lixi@ddn.com>
Sun, 18 Sep 2016 20:37:21 +0000 (16:37 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Sep 2016 07:37:46 +0000 (09:37 +0200)
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 <lai.siyao@intel.com>
Signed-off-by: Li Xi <lixi@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5405
Reviewed-on: http://review.whamcloud.com/11575
Reviewed-by: Ian Costello <costello.ian@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdclass/llog_cat.c

index d28751a022264f75ea4695c8361431eff956901f..b27f08fd549b37cc4461e1d35622150076b1ccc7 100644 (file)
@@ -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;