diff options
author | Ed Cashin <ecashin@coraid.com> | 2013-09-11 17:25:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-11 18:59:25 -0400 |
commit | 2256c1c51e98d4eb2063a7f84f9ea783fda95f7f (patch) | |
tree | a48329d95fc14306d59dc1b4e4ae5a7569fa46de /drivers/block | |
parent | 1cf94797c2bbc514c2bd0892e1774a0a8ca9afdb (diff) |
aoe: fill in per-AoE-target information for debugfs file
This information is presented in a compact format that has evolved for
easy routine scanning by expert humans, mostly developers and support
technicians helping to troubleshoot or test AoE-based systems.
Signed-off-by: Ed Cashin <ecashin@coraid.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/aoe/aoeblk.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c index 0511d38e412d..b58cbeb43e05 100644 --- a/drivers/block/aoe/aoeblk.c +++ b/drivers/block/aoe/aoeblk.c | |||
@@ -113,11 +113,42 @@ static ssize_t aoedisk_show_payload(struct device *dev, | |||
113 | static int aoedisk_debugfs_show(struct seq_file *s, void *ignored) | 113 | static int aoedisk_debugfs_show(struct seq_file *s, void *ignored) |
114 | { | 114 | { |
115 | struct aoedev *d; | 115 | struct aoedev *d; |
116 | struct aoetgt **t, **te; | ||
117 | struct aoeif *ifp, *ife; | ||
116 | unsigned long flags; | 118 | unsigned long flags; |
119 | char c; | ||
117 | 120 | ||
118 | d = s->private; | 121 | d = s->private; |
122 | seq_printf(s, "rttavg: %d rttdev: %d\n", | ||
123 | d->rttavg >> RTTSCALE, | ||
124 | d->rttdev >> RTTDSCALE); | ||
125 | seq_printf(s, "nskbpool: %d\n", skb_queue_len(&d->skbpool)); | ||
126 | seq_printf(s, "kicked: %ld\n", d->kicked); | ||
127 | seq_printf(s, "maxbcnt: %ld\n", d->maxbcnt); | ||
128 | seq_printf(s, "ref: %ld\n", d->ref); | ||
129 | |||
119 | spin_lock_irqsave(&d->lock, flags); | 130 | spin_lock_irqsave(&d->lock, flags); |
120 | seq_printf(s, "%s\n", d->gd->disk_name); /* place holder */ | 131 | t = d->targets; |
132 | te = t + d->ntargets; | ||
133 | for (; t < te && *t; t++) { | ||
134 | c = '\t'; | ||
135 | seq_printf(s, "falloc: %ld\n", (*t)->falloc); | ||
136 | seq_printf(s, "ffree: %p\n", | ||
137 | list_empty(&(*t)->ffree) ? NULL : (*t)->ffree.next); | ||
138 | seq_printf(s, "%pm:%d:%d:%d\n", (*t)->addr, (*t)->nout, | ||
139 | (*t)->maxout, (*t)->nframes); | ||
140 | seq_printf(s, "\tssthresh:%d\n", (*t)->ssthresh); | ||
141 | seq_printf(s, "\ttaint:%d\n", (*t)->taint); | ||
142 | seq_printf(s, "\tr:%d\n", (*t)->rpkts); | ||
143 | seq_printf(s, "\tw:%d\n", (*t)->wpkts); | ||
144 | ifp = (*t)->ifs; | ||
145 | ife = ifp + ARRAY_SIZE((*t)->ifs); | ||
146 | for (; ifp->nd && ifp < ife; ifp++) { | ||
147 | seq_printf(s, "%c%s", c, ifp->nd->name); | ||
148 | c = ','; | ||
149 | } | ||
150 | seq_puts(s, "\n"); | ||
151 | } | ||
121 | spin_unlock_irqrestore(&d->lock, flags); | 152 | spin_unlock_irqrestore(&d->lock, flags); |
122 | 153 | ||
123 | return 0; | 154 | return 0; |