diff options
author | Dave Chinner <dchinner@redhat.com> | 2010-12-20 20:02:25 -0500 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2010-12-20 20:02:25 -0500 |
commit | 1054794198e39103cb986618c4c10ec2252b7089 (patch) | |
tree | bc1d6a3eece9385bef892c2df7d6dba6f39d3088 /fs/xfs/linux-2.6 | |
parent | 9552e7f2f3dd13a7580e488a7a3582332daad4f5 (diff) |
xfs: convert log grant ticket queues to list heads
The grant write and reserve queues use a roll-your-own double linked
list, so convert it to a standard list_head structure and convert
all the list traversals to use list_for_each_entry(). We can also
get rid of the XLOG_TIC_IN_Q flag as we can use the list_empty()
check to tell if the ticket is in a list or not.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/linux-2.6')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_trace.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/xfs/linux-2.6/xfs_trace.h b/fs/xfs/linux-2.6/xfs_trace.h index 83e8760159ef..69b9e1f1baaf 100644 --- a/fs/xfs/linux-2.6/xfs_trace.h +++ b/fs/xfs/linux-2.6/xfs_trace.h | |||
@@ -766,8 +766,8 @@ DECLARE_EVENT_CLASS(xfs_loggrant_class, | |||
766 | __field(int, curr_res) | 766 | __field(int, curr_res) |
767 | __field(int, unit_res) | 767 | __field(int, unit_res) |
768 | __field(unsigned int, flags) | 768 | __field(unsigned int, flags) |
769 | __field(void *, reserve_headq) | 769 | __field(int, reserveq) |
770 | __field(void *, write_headq) | 770 | __field(int, writeq) |
771 | __field(int, grant_reserve_cycle) | 771 | __field(int, grant_reserve_cycle) |
772 | __field(int, grant_reserve_bytes) | 772 | __field(int, grant_reserve_bytes) |
773 | __field(int, grant_write_cycle) | 773 | __field(int, grant_write_cycle) |
@@ -784,8 +784,8 @@ DECLARE_EVENT_CLASS(xfs_loggrant_class, | |||
784 | __entry->curr_res = tic->t_curr_res; | 784 | __entry->curr_res = tic->t_curr_res; |
785 | __entry->unit_res = tic->t_unit_res; | 785 | __entry->unit_res = tic->t_unit_res; |
786 | __entry->flags = tic->t_flags; | 786 | __entry->flags = tic->t_flags; |
787 | __entry->reserve_headq = log->l_reserve_headq; | 787 | __entry->reserveq = list_empty(&log->l_reserveq); |
788 | __entry->write_headq = log->l_write_headq; | 788 | __entry->writeq = list_empty(&log->l_writeq); |
789 | __entry->grant_reserve_cycle = log->l_grant_reserve_cycle; | 789 | __entry->grant_reserve_cycle = log->l_grant_reserve_cycle; |
790 | __entry->grant_reserve_bytes = log->l_grant_reserve_bytes; | 790 | __entry->grant_reserve_bytes = log->l_grant_reserve_bytes; |
791 | __entry->grant_write_cycle = log->l_grant_write_cycle; | 791 | __entry->grant_write_cycle = log->l_grant_write_cycle; |
@@ -795,8 +795,8 @@ DECLARE_EVENT_CLASS(xfs_loggrant_class, | |||
795 | __entry->tail_lsn = log->l_tail_lsn; | 795 | __entry->tail_lsn = log->l_tail_lsn; |
796 | ), | 796 | ), |
797 | TP_printk("dev %d:%d type %s t_ocnt %u t_cnt %u t_curr_res %u " | 797 | TP_printk("dev %d:%d type %s t_ocnt %u t_cnt %u t_curr_res %u " |
798 | "t_unit_res %u t_flags %s reserve_headq 0x%p " | 798 | "t_unit_res %u t_flags %s reserveq %s " |
799 | "write_headq 0x%p grant_reserve_cycle %d " | 799 | "writeq %s grant_reserve_cycle %d " |
800 | "grant_reserve_bytes %d grant_write_cycle %d " | 800 | "grant_reserve_bytes %d grant_write_cycle %d " |
801 | "grant_write_bytes %d curr_cycle %d curr_block %d " | 801 | "grant_write_bytes %d curr_cycle %d curr_block %d " |
802 | "tail_cycle %d tail_block %d", | 802 | "tail_cycle %d tail_block %d", |
@@ -807,8 +807,8 @@ DECLARE_EVENT_CLASS(xfs_loggrant_class, | |||
807 | __entry->curr_res, | 807 | __entry->curr_res, |
808 | __entry->unit_res, | 808 | __entry->unit_res, |
809 | __print_flags(__entry->flags, "|", XLOG_TIC_FLAGS), | 809 | __print_flags(__entry->flags, "|", XLOG_TIC_FLAGS), |
810 | __entry->reserve_headq, | 810 | __entry->reserveq ? "empty" : "active", |
811 | __entry->write_headq, | 811 | __entry->writeq ? "empty" : "active", |
812 | __entry->grant_reserve_cycle, | 812 | __entry->grant_reserve_cycle, |
813 | __entry->grant_reserve_bytes, | 813 | __entry->grant_reserve_bytes, |
814 | __entry->grant_write_cycle, | 814 | __entry->grant_write_cycle, |