From c2e9f5d457ad6a75516e749a3e544165766ab1ce Mon Sep 17 00:00:00 2001 From: Javier González Date: Mon, 26 Jun 2017 11:57:14 +0200 Subject: lightnvm: pblk: expose max sec per write on sysfs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe --- drivers/lightnvm/pblk.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/lightnvm/pblk.h') 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); -- cgit v1.2.3