1 Change list_add_tail to list_add. It gives advantages to ldiskfs
2 in tgt_cb_last_committed. In the beginning of list will be placed
3 thandles with the highest transaction numbers. So at the first
4 iterations we will have the highest transno. It will save from
5 extra call of ptlrpc_commit_replies.
7 Index: linux-3.10.0-229.1.2.fc21.x86_64/fs/ext4/ext4_jbd2.c
8 ===================================================================
9 --- linux-3.10.0-229.1.2.fc21.x86_64.orig/fs/ext4/ext4_jbd2.h
10 +++ linux-3.10.0-229.1.2.fc21.x86_64/fs/ext4/ext4_jbd2.h
11 @@ -3644,7 +3644,7 @@ void ext4_truncate(struct inode *inode)
12 /* Add the jce to transaction's private list */
14 spin_lock(&sbi->s_md_lock);
15 - list_add_tail(&jce->jce_list, &handle->h_transaction->t_private_list);
16 + list_add(&jce->jce_list, &handle->h_transaction->t_private_list);
17 spin_unlock(&sbi->s_md_lock);