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-init.c | |
parent | db7ada33cdcae7fef0a088141b1e4ab8c25fd395 (diff) | |
download | linux-c2e9f5d457ad6a75516e749a3e544165766ab1ce.tar.gz linux-c2e9f5d457ad6a75516e749a3e544165766ab1ce.tar.xz |
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.c | 2 |
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) pblk->pgs_in_buffer = NVM_MEM_PAGE_WRITE * geo->sec_per_pg * geo->nr_planes * geo->nr_luns; + pblk_set_sec_per_write(pblk, pblk->min_write_pgs); + if (pblk->max_write_pgs > PBLK_MAX_REQ_ADDRS) { pr_err("pblk: cannot support device max_phys_sect\n"); return -EINVAL; |