summaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm/pblk.h
diff options
context:
space:
mode:
authorJavier González <jg@lightnvm.io>2017-06-26 11:57:14 +0200
committerJens Axboe <axboe@kernel.dk>2017-06-27 00:24:53 +0200
commitc2e9f5d457ad6a75516e749a3e544165766ab1ce (patch)
treec7d78f902aecf429b7b422fd0ba4d6b0c8807b9c /drivers/lightnvm/pblk.h
parentlightnvm: pblk: add debug stat for read cache hits (diff)
downloadlinux-c2e9f5d457ad6a75516e749a3e544165766ab1ce.tar.xz
linux-c2e9f5d457ad6a75516e749a3e544165766ab1ce.zip
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.h2
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);