aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lightnvm/pblk-init.c
diff options
context:
space:
mode:
authorJavier González <jg@lightnvm.io>2017-06-26 05:57:14 -0400
committerJens Axboe <axboe@kernel.dk>2017-06-26 18:24:53 -0400
commitc2e9f5d457ad6a75516e749a3e544165766ab1ce (patch)
treec7d78f902aecf429b7b422fd0ba4d6b0c8807b9c /drivers/lightnvm/pblk-init.c
parentdb7ada33cdcae7fef0a088141b1e4ab8c25fd395 (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-init.c')
-rw-r--r--drivers/lightnvm/pblk-init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
index 2d79336748ee..0389068c60cb 100644
--- a/drivers/lightnvm/pblk-init.c
+++ b/drivers/lightnvm/pblk-init.c
@@ -250,6 +250,8 @@ static int pblk_core_init(struct pblk *pblk)
250 pblk->pgs_in_buffer = NVM_MEM_PAGE_WRITE * geo->sec_per_pg * 250 pblk->pgs_in_buffer = NVM_MEM_PAGE_WRITE * geo->sec_per_pg *
251 geo->nr_planes * geo->nr_luns; 251 geo->nr_planes * geo->nr_luns;
252 252
253 pblk_set_sec_per_write(pblk, pblk->min_write_pgs);
254
253 if (pblk->max_write_pgs > PBLK_MAX_REQ_ADDRS) { 255 if (pblk->max_write_pgs > PBLK_MAX_REQ_ADDRS) {
254 pr_err("pblk: cannot support device max_phys_sect\n"); 256 pr_err("pblk: cannot support device max_phys_sect\n");
255 return -EINVAL; 257 return -EINVAL;