From: Jens Axboe This is a debug entry that isn't of much use to the generic user or on a production system. Additionally it can also easy overflow the sysfs PAGE_SIZE limitation, if you have many processes doing io. So kill the entry. Signed-off-by: Jens Axboe Signed-off-by: Andrew Morton --- 25-akpm/drivers/block/cfq-iosched.c | 54 ------------------------------------ 1 files changed, 54 deletions(-) diff -puN drivers/block/cfq-iosched.c~cfq-iosched-kill-show_status-sysfs-entry drivers/block/cfq-iosched.c --- 25/drivers/block/cfq-iosched.c~cfq-iosched-kill-show_status-sysfs-entry 2004-11-29 23:03:33.690639456 -0800 +++ 25-akpm/drivers/block/cfq-iosched.c 2004-11-29 23:03:33.695638696 -0800 @@ -1688,55 +1688,6 @@ cfq_read_key_type(struct cfq_data *cfqd, return len; } -static ssize_t -cfq_status_show(struct cfq_data *cfqd, char *page) -{ - struct list_head *entry; - struct cfq_queue *cfqq; - ssize_t len; - int i = 0, queues; - - len = sprintf(page, "Busy queues: %u\n", cfqd->busy_queues); - len += sprintf(page+len, "key type: %s\n", - cfq_key_types[cfqd->key_type]); - len += sprintf(page+len, "last sector: %Lu\n", - (unsigned long long)cfqd->last_sector); - len += sprintf(page+len, "max time in iosched: %lu\n", - max_elapsed_dispatch); - len += sprintf(page+len, "max completion time: %lu\n", max_elapsed_crq); - - len += sprintf(page+len, "Busy queue list:\n"); - spin_lock_irq(cfqd->queue->queue_lock); - list_for_each(entry, &cfqd->rr_list) { - i++; - cfqq = list_entry_cfqq(entry); - len += sprintf(page+len, " cfqq: key=%lu alloc=%d/%d, " - "queued=%d/%d, last_fifo=%lu, service_used=%lu\n", - cfqq->key, cfqq->allocated[0], cfqq->allocated[1], - cfqq->queued[0], cfqq->queued[1], - cfqq->last_fifo_expire, cfqq->service_used); - } - len += sprintf(page+len, " busy queues total: %d\n", i); - queues = i; - - len += sprintf(page+len, "Empty queue list:\n"); - i = 0; - list_for_each(entry, &cfqd->empty_list) { - i++; - cfqq = list_entry_cfqq(entry); - len += sprintf(page+len, " cfqq: key=%lu alloc=%d/%d, " - "queued=%d/%d, last_fifo=%lu, service_used=%lu\n", - cfqq->key, cfqq->allocated[0], cfqq->allocated[1], - cfqq->queued[0], cfqq->queued[1], - cfqq->last_fifo_expire, cfqq->service_used); - } - len += sprintf(page+len, " empty queues total: %d\n", i); - queues += i; - len += sprintf(page+len, "Total queues: %d\n", queues); - spin_unlock_irq(cfqd->queue->queue_lock); - return len; -} - #define SHOW_FUNCTION(__FUNC, __VAR, __CONV) \ static ssize_t __FUNC(struct cfq_data *cfqd, char *page) \ { \ @@ -1824,10 +1775,6 @@ static struct cfq_fs_entry cfq_clear_ela .attr = {.name = "clear_elapsed", .mode = S_IWUSR }, .store = cfq_clear_elapsed, }; -static struct cfq_fs_entry cfq_misc_entry = { - .attr = {.name = "show_status", .mode = S_IRUGO }, - .show = cfq_status_show, -}; static struct cfq_fs_entry cfq_key_type_entry = { .attr = {.name = "key_type", .mode = S_IRUGO | S_IWUSR }, .show = cfq_read_key_type, @@ -1845,7 +1792,6 @@ static struct attribute *default_attrs[] &cfq_back_max_entry.attr, &cfq_back_penalty_entry.attr, &cfq_clear_elapsed_entry.attr, - &cfq_misc_entry.attr, NULL, }; _