History

mmc: queue: append partition subname to queue thread name

For example, an eMMC with 2 boot partitions will have 3 threads. The names change from: 40 ? 00:00:00 mmcqd/0 41 ? 00:00:00 mmcqd/0 42 ? 00:00:00 mmcqd/0 to: 40 ? 00:00:00 mmcqd/0 41 ? 00:00:00 mmcqd/0boot0 42 ? 00:00:00 mmcqd/0boot1

Adrian Hunter committed 15 years ago

Commit d09408a1 parent 4cf8c6d3 files · +8 −5Browse files

Unified · Split

3 files
  1. drivers/mmc/card/block.c +1 −1
  2. drivers/mmc/card/queue.c +5 −3
  3. drivers/mmc/card/queue.h +2 −1
drivers/mmc/card/block.c+1−1
@@ -1024,7 +1024,7 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card, · 1023 unmodified lines
10241024 INIT_LIST_HEAD(&md->part);
10251025 md->usage = 1;
10261026
1027− ret = mmc_init_queue(&md->queue, card, &md->lock);
1027+ ret = mmc_init_queue(&md->queue, card, &md->lock, subname);
10281028 if (ret)
10291029 goto err_putdisk;
10301030
drivers/mmc/card/queue.c+5−3
@@ -106,10 +106,12 @@ static void mmc_request(struct request_queue *q) · 105 unmodified lines
106106 * @mq: mmc queue
107107 * @card: mmc card to attach this queue
108108 * @lock: queue lock
109+ * @subname: partition subname
109110 *
110111 * Initialise a MMC card request queue.
111112 */
112−int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock)
113+int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card,
114+ spinlock_t *lock, const char *subname)
113115 {
114116 struct mmc_host *host = card->host;
115117 u64 limit = BLK_BOUNCE_HIGH;
@@ -209,8 +211,8 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock · 93 unmodified lines
209211
210212 sema_init(&mq->thread_sem, 1);
211213
212− mq->thread = kthread_run(mmc_queue_thread, mq, "mmcqd/%d",
213− host->index);
214+ mq->thread = kthread_run(mmc_queue_thread, mq, "mmcqd/%d%s",
215+ host->index, subname ? subname : "");
214216
215217 if (IS_ERR(mq->thread)) {
216218 ret = PTR_ERR(mq->thread);
drivers/mmc/card/queue.h+2−1
@@ -19,7 +19,8 @@ struct mmc_queue { · 18 unmodified lines
1919 unsigned int bounce_sg_len;
2020 };
2121
22−extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *);
22+extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *,
23+ const char *);
2324 extern void mmc_cleanup_queue(struct mmc_queue *);
2425 extern void mmc_queue_suspend(struct mmc_queue *);
2526 extern void mmc_queue_resume(struct mmc_queue *);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t