diff options
author | Javier González <jg@lightnvm.io> | 2017-06-26 11:57:14 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-06-26 16:24:53 -0600 |
commit | c2e9f5d457ad6a75516e749a3e544165766ab1ce (patch) | |
tree | c7d78f902aecf429b7b422fd0ba4d6b0c8807b9c /drivers/lightnvm/pblk.h | |
parent | db7ada33cdcae7fef0a088141b1e4ab8c25fd395 (diff) |
lightnvm: pblk: expose max sec per write on sysfs
Allow to configure the number of maximum sectors per write command
through sysfs. This makes it easier to tune write command sizes for
different controller configurations.
Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <matias@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/lightnvm/pblk.h')
-rw-r--r-- | drivers/lightnvm/pblk.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h index 77ee42a3f514..edff59aae741 100644 --- a/drivers/lightnvm/pblk.h +++ b/drivers/lightnvm/pblk.h @@ -499,6 +499,7 @@ struct pblk { /* pblk provisioning values. Used by rate limiter */ struct pblk_rl rl; + int sec_per_write; struct semaphore erase_sem; unsigned char instance_uuid[16]; @@ -613,6 +614,7 @@ ssize_t pblk_rb_sysfs(struct pblk_rb *rb, char *buf); * pblk core */ struct nvm_rq *pblk_alloc_rqd(struct pblk *pblk, int rw); +void pblk_set_sec_per_write(struct pblk *pblk, int sec_per_write); int pblk_setup_w_rec_rq(struct pblk *pblk, struct nvm_rq *rqd, struct pblk_c_ctx *c_ctx); void pblk_free_rqd(struct pblk *pblk, struct nvm_rq *rqd, int rw); |