[PATCH] ext4: fix warning inside ext4_convert_unwritten_extents_endio

2019-08-14 Thread Rakesh Pandit
Really enable warning when CONFIG_EXT4_DEBUG is set and fix missing first argument. This was introduced in commit ff95ec22cd7f ("ext4: add warning to ext4_convert_unwritten_extents_endio") and splitting extents inside endio would trigger it. Signed-off-by: Rakesh Pandit --- fs/ext4

[PATCH V2] vfs: remove unused argument in iterate_bdevs

2018-01-11 Thread Rakesh Pandit
Signed-off-by: Rakesh Pandit Reviewed-by: Jan Kara --- V2: fixed missing removal of 'void *' argument (Jan) fs/block_dev.c | 4 ++-- fs/sync.c | 12 ++-- include/linux/fs.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/fs/block_

Re: [PATCH] vfs: remove unused argument in iterate_bdevs

2018-01-11 Thread Rakesh Pandit
On Thu, Jan 11, 2018 at 04:06:45PM +0100, Jan Kara wrote: > On Thu 11-01-18 16:04:07, Rakesh Pandit wrote: > > @@ -2472,7 +2472,7 @@ static inline int thaw_bdev(struct block_device > > *bdev, struct super_block *sb) > > return 0; > > } > > > > -st

[PATCH] vfs: remove unused argument in iterate_bdevs

2018-01-11 Thread Rakesh Pandit
Signed-off-by: Rakesh Pandit --- fs/block_dev.c | 4 ++-- fs/sync.c | 12 ++-- include/linux/fs.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index 4a181fc..95eba30 100644 --- a/fs/block_dev.c +++ b/fs

[PATCH] block: remove unused return type for invalidate_partitions

2018-01-08 Thread Rakesh Pandit
Signed-off-by: Rakesh Pandit --- block/partition-generic.c | 8 include/linux/genhd.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/block/partition-generic.c b/block/partition-generic.c index 91622db..8df0d03 100644 --- a/block/partition-generic.c +++ b

Re: [GIT PULL 02/58] lightnvm: prevent bd removal if busy

2017-10-13 Thread Rakesh Pandit
On Fri, Oct 13, 2017 at 07:58:09AM -0700, Christoph Hellwig wrote: > On Fri, Oct 13, 2017 at 02:45:51PM +0200, Matias Bjørling wrote: > > From: Rakesh Pandit > > > > When a virtual block device is formatted and mounted after creating > > with "nvme lnvm create.

[PATCH] fs/block_dev: remove vfs_msg() interface

2017-10-12 Thread Rakesh Pandit
Replaced by pr_err usage in commit ef51042472f5 ("block, dax: move "select DAX" from BLOCK to FS_DAX") Signed-off-by: Rakesh Pandit Acked-by: Ross Zwisler --- Al, May you consider queuing this for v4.15 ? Thank you. fs/block_dev.c | 12 include

[PATCH] fs/block_dev: remove vfs_msg() interface

2017-10-11 Thread Rakesh Pandit
Replaced by pr_err usage in commit ef51042472f5 ("block, dax: move "select DAX" from BLOCK to FS_DAX") Signed-off-by: Rakesh Pandit --- fs/block_dev.c | 12 include/linux/blkdev.h | 11 --- 2 files changed, 23 deletions(-) diff --git a

Re: [PATCH] btrfs: use appropriate replacements for __sb_{start,end}_write calls

2017-10-10 Thread Rakesh Pandit
On Tue, Oct 10, 2017 at 02:08:11PM +0300, Nikolay Borisov wrote: > > > On 10.10.2017 13:48, Rakesh Pandit wrote: > > Commit a53f4f8e9c8eb ("btrfs: Don't call btrfs_start_transaction() on > > frozen fs to avoid deadlock.") started using internal calls and we

Re: [PATCH] btrfs: use appropriate replacements for __sb_{start,end}_write calls

2017-10-10 Thread Rakesh Pandit
On Tue, Oct 10, 2017 at 02:00:20PM +0300, Nikolay Borisov wrote: > > > On 10.10.2017 13:48, Rakesh Pandit wrote: > > Commit a53f4f8e9c8eb ("btrfs: Don't call btrfs_start_transaction() on > > frozen fs to avoid deadlock.") started using internal calls and we

[PATCH] btrfs: use appropriate replacements for __sb_{start,end}_write calls

2017-10-10 Thread Rakesh Pandit
Commit a53f4f8e9c8eb ("btrfs: Don't call btrfs_start_transaction() on frozen fs to avoid deadlock.") started using internal calls and we replace them with more suitable ones. Signed-off-by: Rakesh Pandit --- fs/btrfs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

Re: [PATCH V2] writeback: merge try_to_writeback_inodes_sb_nr() into caller

2017-10-10 Thread Rakesh Pandit
Hi Jens, On Mon, Oct 09, 2017 at 02:00:29PM +0200, Jan Kara wrote: > On Mon 09-10-17 13:34:41, Rakesh Pandit wrote: > > Since commit 925a6efb8ff0c ("Btrfs: stop using > > try_to_writeback_inodes_sb_nr to flush delalloc") this function hasn't > > been used outsi

[PATCH V2] writeback: merge try_to_writeback_inodes_sb_nr() into caller

2017-10-09 Thread Rakesh Pandit
eback_inodes_sb to void as the only user ext4 doesn't care. Signed-off-by: Rakesh Pandit --- fs/fs-writeback.c | 30 ++ include/linux/writeback.h | 4 +--- 2 files changed, 7 insertions(+), 27 deletions(-) V2: Merge into only caller, change return type a

[PATCH] writeback: make try_to_writeback_inodes_sb_nr() static

2017-10-09 Thread Rakesh Pandit
Since commit 925a6efb8ff0c ("Btrfs: stop using try_to_writeback_inodes_sb_nr to flush delalloc") this function hasn't been used outside so stop exporting it. Signed-off-by: Rakesh Pandit --- fs/fs-writeback.c | 6 +++--- include/linux/writeback.h | 2 -- 2 files change

Re: [PATCH 2/2] sysctl: remove /proc/sys/vm/nr_pdflush_threads

2017-10-06 Thread Rakesh Pandit
-1345,11 +1345,6 @@ static struct ctl_table vm_table[] = { > .extra1 = &zero, > }, > { > - .procname = "nr_pdflush_threads", > - .mode = 0444 /* read-only */, > - .proc_handler = pdflush_proc_obsolete, It seems you forgot to remove pdflush_proc_obsolete from: ./include/linux/backing-dev.h ./mm/backing-dev.c Best regards, Rakesh Pandit

Re: [PATCH 0/5] lightnvm: pblk: audit mempool usage

2017-10-02 Thread Rakesh Pandit
ries even though I am not aware of some aspects of subsystem yet. This series doesn't seem to touch those. Reviewed-by: Rakesh Pandit > > [1] https://patchwork.kernel.org/patch/9940973/ > > Javier González (5): > lightnvm: pblk: fix min size for page mempool > li

Re: [PATCH 2/6] lightnvm: pblk: reduce arguments in __pblk_rb_update_l2p

2017-10-02 Thread Rakesh Pandit
On Mon, Oct 02, 2017 at 05:16:57PM +0200, Javier González wrote: > > On 2 Oct 2017, at 13.32, Javier González wrote: > > > >> On 1 Oct 2017, at 15.23, Rakesh Pandit wrote: [..] > >> -static int __pblk_rb_update_l2p(struct pblk

Re: [PATCH 6/6] lightnvm: pblk: fix releases of kmem cache in error path

2017-10-02 Thread Rakesh Pandit
On Mon, Oct 02, 2017 at 02:44:23PM +0200, Javier González wrote: > > On 1 Oct 2017, at 15.26, Rakesh Pandit wrote: > > > > If pblk_core_init fails lets destroy all global caches. > > > > Signed-off-by: Rakesh Pandit > > --- > > drivers/lightnvm/pblk

Re: [PATCH 5/6] lightnvm: pblk: free up mempool allocation for erases correctly

2017-10-02 Thread Rakesh Pandit
On Mon, Oct 02, 2017 at 03:25:10PM +0300, Rakesh Pandit wrote: > On Mon, Oct 02, 2017 at 02:09:35PM +0200, Javier González wrote: > > > On 1 Oct 2017, at 15.25, Rakesh Pandit wrote: > > > > > > While separating read and erase mempools in 22da65a1b pblk_g_rq_cache &

Re: [PATCH 5/6] lightnvm: pblk: free up mempool allocation for erases correctly

2017-10-02 Thread Rakesh Pandit
On Mon, Oct 02, 2017 at 02:09:35PM +0200, Javier González wrote: > > On 1 Oct 2017, at 15.25, Rakesh Pandit wrote: > > > > While separating read and erase mempools in 22da65a1b pblk_g_rq_cache > > was used two times to set aside memory both for erase and read > >

Re: [PATCH] lightnvm: pblk: fix changing GC group list for a line

2017-10-02 Thread Rakesh Pandit
On Mon, Oct 02, 2017 at 01:27:42PM +0200, Javier González wrote: > > On 28 Sep 2017, at 16.40, Rakesh Pandit wrote: > > > > pblk_line_gc_list seems to had a bug since the introduction of pblk in > > getting GC list for a line. In b20ba1bc7 while redesigning GC > &

Re: [PATCH 4/6] lightnvm: remove stable extern and unused exported symbols

2017-10-01 Thread Rakesh Pandit
On Sun, Oct 01, 2017 at 04:25:18PM +0300, Rakesh Pandit wrote: > Not all exported symbols are being used outside core and there were > some stable entries in lightnvm.h > If you can replace 'stable' with 'stale' both in subject or body while picking up that would be great. Regards,

[PATCH 6/6] lightnvm: pblk: fix releases of kmem cache in error path

2017-10-01 Thread Rakesh Pandit
If pblk_core_init fails lets destroy all global caches. Signed-off-by: Rakesh Pandit --- drivers/lightnvm/pblk-init.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index 519e5cf..9f39800 100644 --- a

[PATCH 5/6] lightnvm: pblk: free up mempool allocation for erases correctly

2017-10-01 Thread Rakesh Pandit
ng of pblk modules would eventually result in some leak. The fix is to really use separate kmem cache and track it appropriately. Fixes: 22da65a1b ("lightnvm: pblk: decouple read/erase mempools") Signed-off-by: Rakesh Pandit --- drivers/lightnvm/pblk-init.c | 16 ++-- d

[PATCH 4/6] lightnvm: remove stable extern and unused exported symbols

2017-10-01 Thread Rakesh Pandit
Not all exported symbols are being used outside core and there were some stable entries in lightnvm.h Signed-off-by: Rakesh Pandit --- drivers/lightnvm/core.c | 129 +++ include/linux/lightnvm.h | 7 --- 2 files changed, 64 insertions(+), 72

[PATCH 3/6] lightnvm: remove unused argument from nvm_set_tgt_bb_tbl

2017-10-01 Thread Rakesh Pandit
vblk isn't being used anyway and if we ever have a usecase we can introduce this again. This makes the logic easier and removes unnecessary checks. Signed-off-by: Rakesh Pandit --- drivers/lightnvm/core.c | 29 - include/linux/lightnvm.h | 2 +- 2 files ch

[PATCH 2/6] lightnvm: pblk: reduce arguments in __pblk_rb_update_l2p

2017-10-01 Thread Rakesh Pandit
We already pass the structure pointer so no need to pass the member. Signed-off-by: Rakesh Pandit --- drivers/lightnvm/pblk-rb.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/lightnvm/pblk-rb.c b/drivers/lightnvm/pblk-rb.c index 05e6b2e..920ffac 100644

[PATCH 1/6] lightnvm: pblk: remove useless line

2017-10-01 Thread Rakesh Pandit
Signed-off-by: Rakesh Pandit --- drivers/lightnvm/pblk-core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index 1f8aa94..4ffd1d6 100644 --- a/drivers/lightnvm/pblk-core.c +++ b/drivers/lightnvm/pblk-core.c @@ -1053,7 +1053,6

[PATCH 0/6] misc cleanups and error path fixes

2017-10-01 Thread Rakesh Pandit
/linux branch for-4.15/pblk So, they can be queued on top of patches already submitted earlier for 4.15. Most of them are trivial found while reading algorithms used during ALPSS yesterday or day before. Rakesh Pandit (6): lightnvm: pblk: remove useless line lightnvm: pblk: reduce arguments in

[PATCH] lightnvm: pblk: fix changing GC group list for a line

2017-09-28 Thread Rakesh Pandit
satisfy 'vsc < high_thrs' as high_thrs > mid_thrs always. Fixes: a4bd217b4("lightnvm: physical block device (pblk) target") Signed-off-by: Rakesh Pandit --- drivers/lightnvm/pblk-core.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/ligh

Re: [PATCH 3/6] lightnvm: pblk: fix message if L2P MAP is in device

2017-09-22 Thread Rakesh Pandit
On Fri, Sep 22, 2017 at 10:52:19AM +0200, Javier González wrote: > > On 21 Sep 2017, at 13.26, Rakesh Pandit wrote: > > > > This usually happens if we are developing with qemu and ll2pmode has > > default value. Even in that case message seems wrong. > > &g

Re: [PATCH 1/6] lightnvm: pblk: reuse pblk_gc_should_kick

2017-09-22 Thread Rakesh Pandit
On Fri, Sep 22, 2017 at 10:40:57AM +0200, Javier González wrote: > > On 21 Sep 2017, at 13.25, Rakesh Pandit wrote: > > > > This is a trivial change which reuses pblk_gc_should_kick instead of > > repeating it again in pblk_rl_free_lines_inc. > > &g

[PATCH V2] lightnvm: include NVM Express driver if OCSSD is selected for build

2017-09-21 Thread Rakesh Pandit
Because NVM needs BLK_DEV_NVME, select it automatically if we mark NVM in config file before building kernel. Also append PCI to depends as select doesn't automatically add dependencies. Signed-off-by: Rakesh Pandit --- V2: appends 'depends' with PCI drivers/lightnvm/Kconfig

Re: [PATCH 6/6] lightnvm: include NVM Express driver if OCSSD is selected for build

2017-09-21 Thread Rakesh Pandit
On Thu, Sep 21, 2017 at 01:32:40PM +0200, Matias Bjørling wrote: > On 09/21/2017 01:28 PM, Rakesh Pandit wrote: > > Because NVM needs BLK_DEV_NVME, select it automatically if we mark NVM > > in config file before building kernel. > > > > Signed-off-by: Rakesh Pa

[PATCH 5/6] lightnvm: pblk: print incompatible line version correctly

2017-09-21 Thread Rakesh Pandit
Correct it by coverting little endian to cpu endian and also define a macro for line version so that maintenance is easy. Signed-off-by: Rakesh Pandit --- drivers/lightnvm/pblk-core.c | 2 +- drivers/lightnvm/pblk-recovery.c | 4 ++-- drivers/lightnvm/pblk.h | 1 + 3 files changed

[PATCH 6/6] lightnvm: include NVM Express driver if OCSSD is selected for build

2017-09-21 Thread Rakesh Pandit
Because NVM needs BLK_DEV_NVME, select it automatically if we mark NVM in config file before building kernel. Signed-off-by: Rakesh Pandit --- drivers/lightnvm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/lightnvm/Kconfig b/drivers/lightnvm/Kconfig index ead61a9..b3c00cb

[PATCH 4/6] lightnvm: pblk: improve error message if down_timeout fails

2017-09-21 Thread Rakesh Pandit
The two pr_err messages are useless as they don't even differentiate error code. Signed-off-by: Rakesh Pandit --- drivers/lightnvm/pblk-core.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c

[PATCH 3/6] lightnvm: pblk: fix message if L2P MAP is in device

2017-09-21 Thread Rakesh Pandit
This usually happens if we are developing with qemu and ll2pmode has default value. Even in that case message seems wrong. Signed-off-by: Rakesh Pandit --- drivers/lightnvm/pblk-init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/pblk-init.c b/drivers

[PATCH 2/6] lightnvm: pblk: protect line bitmap while submitting meta io

2017-09-21 Thread Rakesh Pandit
It seems pblk_dealloc_page would race against pblk_alloc_pages for line bitmap for sector allocation. The chances are very low but might as well protect the bitmap properly. It's not even in fast path. Signed-off-by: Rakesh Pandit --- drivers/lightnvm/pblk-core.c | 2 ++ 1 file chang

[PATCH 0/6] misc patches mostly for pblk

2017-09-21 Thread Rakesh Pandit
These are trivial changes up for review. Most of them I made while skimming through the code base. They are mostly cleanups and they are at random places. Rakesh Pandit (6): lightnvm: pblk: reuse pblk_gc_should_kick lightnvm: pblk: protect line bitmap while submitting meta io lightnvm

[PATCH 1/6] lightnvm: pblk: reuse pblk_gc_should_kick

2017-09-21 Thread Rakesh Pandit
This is a trivial change which reuses pblk_gc_should_kick instead of repeating it again in pblk_rl_free_lines_inc. Signed-off-by: Rakesh Pandit --- drivers/lightnvm/pblk-core.c | 1 + drivers/lightnvm/pblk-rl.c | 9 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a

Re: [PATCH] lightnvm: pblk: fix error path in pblk_lines_alloc_metadata

2017-09-21 Thread Rakesh Pandit
On Thu, Sep 21, 2017 at 11:56:46AM +0200, Javier González wrote: > > On 20 Sep 2017, at 21.50, Rakesh Pandit wrote: > > > > Use appropriate memory free calls based on allocation type used and > > also fix number of times free is called if kmalloc fails. > > &g

[PATCH] lightnvm: pblk: fix error path in pblk_lines_alloc_metadata

2017-09-20 Thread Rakesh Pandit
Use appropriate memory free calls based on allocation type used and also fix number of times free is called if kmalloc fails. Signed-off-by: Rakesh Pandit --- drivers/lightnvm/pblk-init.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/lightnvm/pblk-init.c b

Re: [PATCH 08/20] lightnvm: pblk: sched. metadata on write thread

2017-09-20 Thread Rakesh Pandit
On Wed, Sep 20, 2017 at 09:28:34PM +0300, Rakesh Pandit wrote: > Hi Javier, > > one small issue I found for error path while going through changes: > > On Mon, Jun 26, 2017 at 11:57:17AM +0200, Javier González wrote: > .. > > +static int pblk_lines_alloc_me

Re: [PATCH 08/20] lightnvm: pblk: sched. metadata on write thread

2017-09-20 Thread Rakesh Pandit
Hi Javier, one small issue I found for error path while going through changes: On Mon, Jun 26, 2017 at 11:57:17AM +0200, Javier González wrote: .. > +static int pblk_lines_alloc_metadata(struct pblk *pblk) > +{ > + struct pblk_line_mgmt *l_mg = &pblk->l_mg; > + struct pblk_line_meta *lm =

[PATCH] lightnvm: remove already calculated nr_chnls

2017-09-17 Thread Rakesh Pandit
Remove repeated calculation for number of channels while creating a target device. Signed-off-by: Rakesh Pandit --- This is also a trivial change I found while investigating/working on other issue. drivers/lightnvm/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/lightnvm

[PATCH V2] lightnvm: protect target type list with correct locks

2017-09-16 Thread Rakesh Pandit
nvm_tgt_types list was protected by wrong lock for NVM_INFO ioctl call and can race with addition or removal of target types. Also unregistering target type was not protected correctly. Fixes: 5cd907853 ("lightnvm: remove nested lock conflict with mm") Signed-off-by: Rakesh Pandit ---

[PATCH] lightnvm: protect target type list with correct locks

2017-09-16 Thread Rakesh Pandit
nvm_tgt_types list was protected by wrong lock for NVM_INFO ioctl call and can race with addition or removal of target types. Fixes: cd9e9808d ("lightnvm: Support for Open-Channel SSDs") Signed-off-by: Rakesh Pandit --- drivers/lightnvm/core.c | 4 ++-- 1 file changed, 2 insert

Re: [PATCH] lightnvm: prevent bd removal if busy

2017-09-10 Thread Rakesh Pandit
On Fri, Sep 08, 2017 at 12:42:47PM +0200, Matias Bjørling wrote: > On 09/07/2017 03:58 PM, Rakesh Pandit wrote: > > Removal of virtual block device by "nvm lnvm remove..." undergoing IO > > and created by "nvme lnvm create... -t pblk" resul

[PATCH V2] lightnvm: prevent bd removal if busy

2017-09-10 Thread Rakesh Pandit
en partitions are opened or closed (first open and last release). This at least does take care sending -EBUSY if removal is being attempted while whole block device or any partition is mounted. Signed-off-by: Rakesh Pandit --- V2: Take a different approach. Instead of checking bd_openers use bd

[PATCH] lightnvm: prevent target type module removal when in use

2017-09-08 Thread Rakesh Pandit
If target type module e.g. pblk here is unloaded (rmmod) while module is in use (after creating target) system crashes. We fix this by using module API refcnt. Signed-off-by: Rakesh Pandit --- drivers/lightnvm/core.c | 4 drivers/lightnvm/pblk-init.c | 1 + include/linux/lightnvm.h

[PATCH] lightnvm: prevent bd removal if busy

2017-09-07 Thread Rakesh Pandit
ull proof either. It does work for general case where device is mounted and removal can be prevented. Signed-off-by: Rakesh Pandit --- drivers/lightnvm/core.c | 42 ++ 1 file changed, 42 insertions(+) diff --git a/drivers/lightnvm/core.c b/drivers/lig

[PATCH V3] lightnvm: if LUNs are already allocated fix return

2017-06-27 Thread Rakesh Pandit
While creating new device with NVM_DEV_CREATE if LUNs are already allocated ioctl would return -ENOMEM which is wrong. This patch propagates -EBUSY from nvm_reserve_luns which is correct response. Fixes: ade69e243 ("lightnvm: merge gennvm with core") Signed-off-by: Rakesh Pandi

Re: [PATCH V2] lightnvm: if LUNs are already allocated fix return

2017-06-27 Thread Rakesh Pandit
On Tue, Jun 27, 2017 at 01:27:40PM +0200, Frans Klaver wrote: > On Tue, Jun 27, 2017 at 1:23 PM, Rakesh Pandit wrote: > > On Tue, Jun 27, 2017 at 01:01:22PM +0200, Frans Klaver wrote: > >> On Tue, Jun 27, 2017 at 12:43 PM, Rakesh Pandit wrote: > >> > While creating

Re: [PATCH V2] lightnvm: if LUNs are already allocated fix return

2017-06-27 Thread Rakesh Pandit
On Tue, Jun 27, 2017 at 01:01:22PM +0200, Frans Klaver wrote: > On Tue, Jun 27, 2017 at 12:43 PM, Rakesh Pandit wrote: > > While creating new device with NVM_DEV_CREATE if LUNs are already > > allocated ioctl would return -ENOMEM which is wrong. This patch > > p

[PATCH V2] lightnvm: if LUNs are already allocated fix return

2017-06-27 Thread Rakesh Pandit
While creating new device with NVM_DEV_CREATE if LUNs are already allocated ioctl would return -ENOMEM which is wrong. This patch propagates -EBUSY from nvm_reserve_luns which is correct response. Fixes: ade69e243 ("lightnvm: merge gennvm with core") Signed-off-by: Rakesh Pandit ---

Re: [PATCH] ligtnvm: if LUNs are already allocated fix return

2017-06-27 Thread Rakesh Pandit
Hi Frans, On Tue, Jun 27, 2017 at 11:06:44AM +0200, Frans Klaver wrote: > On Tue, Jun 27, 2017 at 10:39 AM, Matias Bjørling wrote: > > From: Rakesh Pandit > > > > While creating new device with NVM_DEV_CREATE if LUNs are already > > allocated ioctl would return -E

[PATCH V2] nvme: fix multiple ctrl removal scheduling

2017-06-05 Thread Rakesh Pandit
t;nvme: don't schedule multiple resets") Signed-off-by: Rakesh Pandit --- drivers/nvme/host/pci.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index d52701df..0f9af4d 100644 --- a/drivers/nvme/host/pci.c

Re: [PATCH V2] nvme: fix nvme_remove going to uninterruptible sleep for ever

2017-06-05 Thread Rakesh Pandit
On Mon, Jun 05, 2017 at 10:18:17AM +0200, Christoph Hellwig wrote: > On Sun, Jun 04, 2017 at 06:28:15PM +0300, Sagi Grimberg wrote: > > > >> I think we need the NVME_CTRL_SCHED_RESET state. In fact I'm pretty > >> sure some time in the past I already had it in a local tree as a > >> generalization

Re: [PATCH V2] nvme: fix nvme_remove going to uninterruptible sleep for ever

2017-06-01 Thread Rakesh Pandit
On Thu, Jun 01, 2017 at 10:56:10PM +0800, Ming Lei wrote: > On Thu, Jun 01, 2017 at 02:46:32PM +0200, Christoph Hellwig wrote: > > On Thu, Jun 01, 2017 at 03:36:50PM +0300, Rakesh Pandit wrote: > > > Also Sagi pointed out that user space set_features ioctl if fired up >

Re: [PATCH V2] nvme: fix nvme_remove going to uninterruptible sleep for ever

2017-06-01 Thread Rakesh Pandit
On Thu, Jun 01, 2017 at 03:28:18PM +0300, Rakesh Pandit wrote: > On Thu, Jun 01, 2017 at 01:43:38PM +0200, Christoph Hellwig wrote: > > On Tue, May 30, 2017 at 05:23:46PM +0300, Rakesh Pandit wrote: > > > We can fix user-space triggered set_features higger up e.g. in > >

Re: [PATCH V2] nvme: fix nvme_remove going to uninterruptible sleep for ever

2017-06-01 Thread Rakesh Pandit
On Thu, Jun 01, 2017 at 01:43:38PM +0200, Christoph Hellwig wrote: > On Tue, May 30, 2017 at 05:23:46PM +0300, Rakesh Pandit wrote: > > We can fix user-space triggered set_features higger up e.g. in > > nvme_ioctl by putting same check. Introduction of a separate state > >

Re: [PATCH V2] nvme: fix nvme_remove going to uninterruptible sleep for ever

2017-05-30 Thread Rakesh Pandit
On Tue, May 30, 2017 at 01:18:55PM +0300, Sagi Grimberg wrote: > > > /* > > +* Avoid configuration and syncing commands if controller is already > > +* being removed and queues have been killed. > > +*/ > > + if (ctrl->state == NVME_CTRL_DELETING || ctrl->state == NVME_CTRL_DEAD)

Re: [PATCH 1/1] nvme: fix nvme_remove going to uninterruptible sleep for ever

2017-05-30 Thread Rakesh Pandit
On Mon, May 29, 2017 at 07:58:39PM +0200, Christoph Hellwig wrote: > On Mon, May 29, 2017 at 09:29:54AM +0300, Rakesh Pandit wrote: > > Once controller is in DEAD or DELETING state a call to delete_destroy > > from nvme_uninit_ctrl results in setting the latenc

[PATCH V2] nvme: fix nvme_remove going to uninterruptible sleep for ever

2017-05-30 Thread Rakesh Pandit
ot;nvme: Enable autonomous power state transitions") Signed-off-by: Rakesh Pandit --- drivers/nvme/host/core.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index a609264..8dfe854 100644 --- a/drivers/nvme/host/core.c +++ b/driv

Re: [PATCH] ligtnvm: if LUNs are already allocated fix return

2017-05-29 Thread Rakesh Pandit
Hi Matias, On Mon, May 15, 2017 at 06:31:58AM +, Javier Gonzalez wrote: > > > > On 13 May 2017, at 21.50, Rakesh Pandit wrote: > > > > While creating new device with NVM_DEV_CREATE if LUNs are already > > allocated ioctl would return -ENOMEM which is wro

[PATCH 1/1] nvme: fix nvme_remove going to uninterruptible sleep for ever

2017-05-28 Thread Rakesh Pandit
appen once we are in nvme_remove and allows removal to complete and release remaining resources after nvme_uninit_ctrl. Fixes: c5552fde102fc ("nvme: Enable autonomous power state transitions") Signed-off-by: Rakesh Pandit --- drivers/nvme/host/core.c | 3 +++ 1 file changed, 3 inserti

[PATCH 0/1] nvme: fix nvme_remove going to uninterruptible sleep for ever

2017-05-28 Thread Rakesh Pandit
device as first call hasn't finished. Rakesh Pandit (1): nvme: fix nvme_remove going to uninterruptible sleep for ever drivers/nvme/host/core.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.9.3

Re: [PATCH V3] nvme: fix multiple ctrl removal scheduling

2017-05-28 Thread Rakesh Pandit
On Sun, May 28, 2017 at 11:40:43AM +0200, Christoph Hellwig wrote: > Hi Rakesh, > > this looks reasonable, but we'll need to also adopt the non-PCI > driver to the new state machine. I can give this a spin. > .. Thanks for handling non-PCI driver part.

[PATCH V3] nvme: fix multiple ctrl removal scheduling

2017-05-26 Thread Rakesh Pandit
hristoph Hellwig) Fixes: c5f6ce97c1210 ("nvme: don't schedule multiple resets") Signed-off-by: Rakesh Pandit --- drivers/nvme/host/core.c | 12 +++- drivers/nvme/host/nvme.h | 1 + drivers/nvme/host/pci.c | 12 +--- 3 files changed, 21 insertions(+), 4 deletions(-) di

Re: [PATCH V2 1/1] nvme: fix multiple ctrl removal scheduling

2017-05-26 Thread Rakesh Pandit
On Thu, May 25, 2017 at 10:30:23AM +0200, Christoph Hellwig wrote: > > diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c > > index 4c2ff2b..ba54e2a 100644 > > --- a/drivers/nvme/host/pci.c > > +++ b/drivers/nvme/host/pci.c > > @@ -1903,9 +1903,6 @@ static void nvme_reset_work(struct wo

Re: [PATCH V2 1/1] nvme: fix multiple ctrl removal scheduling

2017-05-26 Thread Rakesh Pandit
Added Andy Lutomirski to CC (APST related issue) On Fri, May 26, 2017 at 06:06:14AM -0400, Keith Busch wrote: > On Wed, May 24, 2017 at 05:26:25PM +0300, Rakesh Pandit wrote: > > Commit c5f6ce97c1210 tries to address multiple resets but fails as > > work_busy doesn't involve

[PATCH V2 1/1] nvme: fix multiple ctrl removal scheduling

2017-05-24 Thread Rakesh Pandit
Hellwig) Fixes: c5f6ce97c1210 ("nvme: don't schedule multiple resets") Signed-off-by: Rakesh Pandit --- drivers/nvme/host/pci.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 4c2ff2b..ba54e2a 100644

[PATCH V2 0/1] nvme: fix multiple ctrl removal scheduling

2017-05-24 Thread Rakesh Pandit
Updated previous patch with correct fix (suggested by Christoph Hellwig) and tested. Rakesh Pandit (1): nvme: fix multiple ctrl removal scheduling drivers/nvme/host/pci.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) -- 2.5.5

Re: [PATCH 1/2] nvme: fix multiple ctrl removal scheduling

2017-05-24 Thread Rakesh Pandit
On Wed, May 24, 2017 at 11:37:55AM +0200, Christoph Hellwig wrote: > On Wed, May 24, 2017 at 01:15:47AM +0300, Rakesh Pandit wrote: > > Commit c5f6ce97c1210 tries to address multiple resets but fails as > > work_busy doesn't involve any synchronization and can fail. This

[PATCH 2/2] nvme: fix status message while removing controller

2017-05-23 Thread Rakesh Pandit
Instead of -ENODEV, -EBUSY seems more appropriate if device state change fails inside nvme_reset_work. This should ideally only fail if device is already undergoing deletion or is dead. Signed-off-by: Rakesh Pandit --- drivers/nvme/host/pci.c | 4 +++- 1 file changed, 3 insertions(+), 1

[PATCH 1/2] nvme: fix multiple ctrl removal scheduling

2017-05-23 Thread Rakesh Pandit
x60/0x60 [ 480.327102] ret_from_fork+0x2c/0x40 [ 480.327103] Code: e8 5a dc ff ff 85 c0 41 89 c1 0f. Fixes: c5f6ce97c1210 ("nvme: don't schedule multiple resets") Signed-off-by: Rakesh Pandit --- drivers/nvme/host/pci.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-

[PATCH 0/2] nvme: fix multiple ctrl removal scheduling and warning

2017-05-23 Thread Rakesh Pandit
The first patch tries to address the repeated queuing of reset work into queue when frequency of I/O is high. Details are in log message. Second one adress a status message which allows one if failure (removal of controller) was due to failure to change state or something else. Rakesh Pandit (2

Re: [PATCH] nvme: pci: Fix NULL dereference when resetting NVMe SSD

2017-05-22 Thread Rakesh Pandit
On Mon, May 22, 2017 at 06:04:20PM +0200, Christoph Hellwig wrote: > On Mon, May 22, 2017 at 06:02:17PM +0200, Christoph Hellwig wrote: > > On Mon, May 22, 2017 at 06:38:29PM +0300, Rakesh Pandit wrote: > > > Just got to use the using the test box again and

Re: [PATCH] nvme: pci: Fix NULL dereference when resetting NVMe SSD

2017-05-22 Thread Rakesh Pandit
On Sun, May 21, 2017 at 08:17:36AM +0200, Christoph Hellwig wrote: > On Sat, May 20, 2017 at 08:59:54PM +0300, Rakesh Pandit wrote: > > While doing IO if I reset NVMe SSD (model :Samsung MZVPV512HDGL-0) > > it doesn't work as expected also results in NULL point derefe

[PATCH] nvme: pci: Fix NULL dereference when resetting NVMe SSD

2017-05-20 Thread Rakesh Pandit
68 [ 1619.131732] CR2: 01f8 Signed-off-by: Rakesh Pandit --- This is produce independent of separate issue under discussion regarding resetting the device (system hang) and works well with or without patch set "nvme: fix hang in path of removing disk". drivers/nvme/host/pci

[PATCH] ligtnvm: if LUNs are already allocated fix return

2017-05-13 Thread Rakesh Pandit
While creating new device with NVM_DEV_CREATE if LUNs are already allocated ioctl would return -ENOMEM which is wrong. This patch propagates -EBUSY from nvm_reserve_luns which is correct response. Fixes: ade69e243 ("lightnvm: merge gennvm with core") Signed-off-by: Rakesh Pandit --

[PATCH] nvme: lightnvm: fix memory leak

2017-05-09 Thread Rakesh Pandit
Free up kmalloc allocated memory if failure happens while handling L2P table transfer in nvme_nvm_get_l2p_tbl. Fixes: 8e79b5cb ("lightnvm: move block provisioning to targets") Signed-off-by: Rakesh Pandit --- drivers/nvme/host/lightnvm.c | 3 ++- 1 file changed, 2 insertions(+),

[PATCH] bfs: Fix sanity checks for empty files

2017-05-05 Thread Rakesh Pandit
p bfs-image bfs-mount-point/ mount: /dev/loop0: can't read superblock $ dmesg [25526.689580] BFS-fs: bfs_fill_super(): Inode 0x0003 corrupted Signed-off-by: Rakesh Pandit --- This was sent three years but maintainer has been unresponsive: https://marc.info/?l=linux-kernel&m=13898

[PATCH] net: alx: handle pci_alloc_irq_vectors return correctly

2017-05-05 Thread Rakesh Pandit
48 89 [ 60.597642] RIP: alx_alloc_napis+0xe6/0x1e0 [alx] RSP: c90003eef660 [ 60.598427] CR2: 00b8 Fixes: f3297f68 ("net: alx: switch to pci_alloc_irq_vectors") Signed-off-by: Rakesh Pandit --- drivers/net/ethernet/atheros/alx/main.c | 4 ++-- 1 file changed, 2

[PATCH] lightnvm: propagate pblk_init return to userspace

2017-04-20 Thread Rakesh Pandit
eds to go in 4.12. Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target") Signed-off-by: Rakesh Pandit --- drivers/lightnvm/core.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm

[PATCH] ligtnvm: fix double blk_put_queue on same queue

2017-04-19 Thread Rakesh Pandit
: 0001 R08: 0020 R09: 0001 [ 391.809311] R10: 053f R11: 0206 R12: [ 391.809316] R13: R14: 7ffc72edb58d R15: 7ffc72edb581 Signed-off-by: Rakesh Pandit --- drivers/lightnvm/core.c | 1 + 1 file changed

Re: [PATCH] aio: add aio_migratepage_helper to get rid of duplicate code

2014-02-10 Thread Rakesh Pandit
On Mon, Feb 10, 2014 at 11:24:02AM -0500, Benjamin LaHaise wrote: > On Mon, Feb 10, 2014 at 01:52:56PM +0200, Rakesh Pandit wrote: > > You're missing a commit message here providing justification for the changes > submitted. Why is this change a good thing? Did it fix any bugs

[PATCH] aio: add aio_migratepage_helper to get rid of duplicate code

2014-02-10 Thread Rakesh Pandit
Signed-off-by: Rakesh Pandit --- fs/aio.c | 55 +++ 1 file changed, 23 insertions(+), 32 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index d3d55dc..20d690a 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -278,32 +278,46 @@ static int

[PATCH] aio: remove unused parameter 'ctx' from kiocb_cancel

2014-02-10 Thread Rakesh Pandit
Not used since commit 57282d8fd. Signed-off-by: Rakesh Pandit Reviewed-by: Christoph Hellwig --- fs/aio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 062a5f6..d3d55dc 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -471,7 +471,7 @@ void

[PATCH] befs: iget_locked() doesn't return an ERR_PTR

2014-01-15 Thread Rakesh Pandit
Also fix befs_iget return value if iget_locked fails. Signed-off-by: Rakesh Pandit --- fs/befs/linuxvfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index daa15d6..845d2d6 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs

[PATCH] bfs: Fix sanity checks for empty files

2014-01-15 Thread Rakesh Pandit
p bfs-image bfs-mount-point/ mount: /dev/loop0: can't read superblock $ dmesg [25526.689580] BFS-fs: bfs_fill_super(): Inode 0x0003 corrupted Signed-off-by: Rakesh Pandit --- fs/bfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/bfs/inode.c b/fs/bfs/ino