Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286298
b: refs/heads/master
c: 184d294
h: refs/heads/master
v: v3
  • Loading branch information
Matthew Wilcox committed Nov 4, 2011
1 parent d4e7106 commit 9fb210e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b77954cbddff28d55a36fad3c16f4daebb0f01df
refs/heads/master: 184d2944cb3b92a2e8e1733c59d1e531ad6e924a
11 changes: 10 additions & 1 deletion trunk/drivers/block/nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ static struct nvme_cmd_info *nvme_cmd_info(struct nvme_queue *nvmeq)
* the bottom two bits of the ctx pointer to store the handler ID.
* Passing in a pointer that's not 4-byte aligned will cause a BUG.
* We can change this if it becomes a problem.
*
* May be called with local interrupts disabled and the q_lock held,
* or with interrupts enabled and no locks held.
*/
static int alloc_cmdid(struct nvme_queue *nvmeq, void *ctx, int handler,
unsigned timeout)
Expand Down Expand Up @@ -202,6 +205,9 @@ enum {
#define CMD_CTX_INVALID (0x314 + CMD_CTX_BASE)
#define CMD_CTX_FLUSH (0x318 + CMD_CTX_BASE)

/*
* Called with local interrupts disabled and the q_lock held. May not sleep.
*/
static unsigned long free_cmdid(struct nvme_queue *nvmeq, int cmdid)
{
unsigned long data;
Expand Down Expand Up @@ -326,7 +332,7 @@ static void bio_completion(struct nvme_queue *nvmeq, void *ctx,
}
}

/* length is in bytes */
/* length is in bytes. gfp flags indicates whether we may sleep. */
static struct nvme_prps *nvme_setup_prps(struct nvme_dev *dev,
struct nvme_common_command *cmd,
struct scatterlist *sg, int *len,
Expand Down Expand Up @@ -483,6 +489,9 @@ static int nvme_submit_flush_data(struct nvme_queue *nvmeq, struct nvme_ns *ns)
return nvme_submit_flush(nvmeq, ns, cmdid);
}

/*
* Called with local interrupts disabled and the q_lock held. May not sleep.
*/
static int nvme_submit_bio_queue(struct nvme_queue *nvmeq, struct nvme_ns *ns,
struct bio *bio)
{
Expand Down

0 comments on commit 9fb210e

Please sign in to comment.