[PATCH V4 1/1] block: reject I/O for same fd if block size changed

2021-01-05 Thread Minwoo Im
in blk_queue_logical_block_size to minimize caller-side updates. Signed-off-by: Minwoo Im --- block/blk-settings.c| 3 +++ block/partitions/core.c | 12 fs/block_dev.c | 8 include/linux/blkdev.h | 1 + 4 files changed, 24 insertions(+) diff --git a/block/blk

[PATCH V4 0/1] block: fix I/O errors in BLKRRPART

2021-01-05 Thread Minwoo Im
83143.GB13354@localhost.localdomain/T/#t [2] https://lore.kernel.org/linux-nvme/20201230140504.GB7917@localhost.localdomain/T/#t [3] https://lore.kernel.org/linux-block/20210105101202.GA9970@localhost.localdomain/T/#u Thanks, Minwoo Im (1): block: reject I/O for same fd if block size changed block/blk-setti

Re: [RFC PATCH V3 1/1] block: reject I/O for same fd if block size changed

2021-01-05 Thread Minwoo Im
Hello, On 21-01-05 08:50:09, Christoph Hellwig wrote: > On Tue, Jan 05, 2021 at 10:04:56AM +0900, Minwoo Im wrote: > > It was a point that I really would like to ask by RFC whether we can > > have backpointer to the gendisk from the request_queue. And I'd like to > >

Re: [RFC PATCH V3 1/1] block: reject I/O for same fd if block size changed

2021-01-04 Thread Minwoo Im
Hello Christoph, Thanks for your review. On 21-01-04 18:11:41, Christoph Hellwig wrote: > On Mon, Jan 04, 2021 at 06:11:08PM +0100, Christoph Hellwig wrote: > > On Mon, Jan 04, 2021 at 10:06:59PM +0900, Minwoo Im wrote: > > > + if (q->backing_dev_info &&am

[RFC PATCH V3 1/1] block: reject I/O for same fd if block size changed

2021-01-04 Thread Minwoo Im
in blk_queue_logical_block_size to minimize caller-side updates. Signed-off-by: Minwoo Im --- block/blk-settings.c| 8 block/partitions/core.c | 11 +++ fs/block_dev.c | 6 ++ include/linux/genhd.h | 1 + 4 files changed, 26 insertions(+) diff --git a/block

[RFC PATCH V3 0/1] block: fix I/O errors in BLKRRPART

2021-01-04 Thread Minwoo Im
O rather than updating i_blkbits of the block device's inode directly from driver. (Christoph, [1]) [1] https://lore.kernel.org/linux-nvme/20201223183143.GB13354@localhost.localdomain/T/#t [2] https://lore.kernel.org/linux-nvme/20201230140504.GB7917@localhost.localdomain/T/#t Thanks, Minwoo Im

Re: [RFC V2] block: reject I/O for same fd if block size changed

2021-01-03 Thread Minwoo Im
On 21-01-04 00:57:07, Chaitanya Kulkarni wrote: > On 12/30/20 08:03, Minwoo Im wrote: > > Let's say, for example of NVMe device, Format command to change out > > LBA format to another logical block size and BLKRRPART to re-read > > partition information with a same

[RFC V2] block: reject I/O for same fd if block size changed

2020-12-30 Thread Minwoo Im
st.localdomain/T/#t Signed-off-by: Minwoo Im --- block/blk-settings.c| 7 +++ block/genhd.c | 1 + block/partitions/core.c | 11 +++ fs/block_dev.c | 6 ++ include/linux/genhd.h | 1 + 5 files changed, 26 insertions(+) diff --git a/block/blk-settings.c b/b

Re: [RFC] block: reject I/O in BLKRRPART if block size changed

2020-12-30 Thread Minwoo Im
On 20-12-27 03:02:32, Minwoo Im wrote: > Background: > Let's say we have 2 LBA format for 4096B and 512B LBA size for a > NVMe namespace. Assume that current LBA format is 4096B and in case > we convert namespace to 512B and 4096B back again: > > nvme format /dev/nvme0n

[RFC] block: reject I/O in BLKRRPART if block size changed

2020-12-26 Thread Minwoo Im
t_init_blocksize(). This patch rejects I/O from the path of add_partitions() and application should open the file descriptor again to update the block size of the block device inode. [1] https://lore.kernel.org/linux-nvme/20201223183143.GB13354@localhost.localdomain/T/#t Signed-off-by: Minwo

Re: [PATCH] vfs: remove comment for deleted argument 'cred'

2020-12-11 Thread Minwoo Im
On 20-12-02 21:52:32, Minwoo Im wrote: > Removed credential argument comment with no functional changes. > > Signed-off-by: Minwoo Im > --- > fs/open.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/fs/open.c b/fs/open.c > index 9af548fb841b..85a532af09

Re: [PATCH 0/3] blk-mq: trivial helper and fixes comments

2020-12-11 Thread Minwoo Im
On 20-12-05 00:20:52, Minwoo Im wrote: > Hello, > > This patch set contains: > - Introduce a helper to allocate tagset tags for the first time > without 'realloc' keyword that used to be taken. > - Fixes for comments need to be updated. > > Please have a look. >

[PATCH 2/3] blk-mq: update arg in comment of blk_mq_map_queue

2020-12-04 Thread Minwoo Im
Update mis-named argument description of blk_mq_map_queue(). This patch also updates description that argument to software queue percpu context. Signed-off-by: Minwoo Im --- block/blk-mq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-mq.h b/block/blk-mq.h index

[PATCH 3/3] blk-mq: fix msec comment from micro to milli seconds

2020-12-04 Thread Minwoo Im
Delay to wait for queue running is milli second unit which is passed to delayed work via msecs_to_jiffies() which is to convert milliseconds to jiffies. Signed-off-by: Minwoo Im --- block/blk-mq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/blk-mq.c b/block

[PATCH 1/3] blk-mq: add helper allocating tagset->tags

2020-12-04 Thread Minwoo Im
tagset->set is allocated from blk_mq_alloc_tag_set() rather than being reallocated. This patch added a helper to make its meaning explicitly which is to allocate rather than to reallocate. Signed-off-by: Minwoo Im --- block/blk-mq.c | 8 +++- 1 file changed, 7 insertions(+), 1 delet

[PATCH 0/3] blk-mq: trivial helper and fixes comments

2020-12-04 Thread Minwoo Im
Hello, This patch set contains: - Introduce a helper to allocate tagset tags for the first time without 'realloc' keyword that used to be taken. - Fixes for comments need to be updated. Please have a look. Thanks, Minwoo Im (3): blk-mq: add helper allocating tagset->tags blk

[PATCH] vfs: remove comment for deleted argument 'cred'

2020-12-02 Thread Minwoo Im
Removed credential argument comment with no functional changes. Signed-off-by: Minwoo Im --- fs/open.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/open.c b/fs/open.c index 9af548fb841b..85a532af0946 100644 --- a/fs/open.c +++ b/fs/open.c @@ -923,7 +923,6 @@ EXPORT_SYMBOL(file_path

Re: [PATCHv2] nvme: Assign subsy instance from first ctrl

2019-09-07 Thread Minwoo Im
h Keith, Thanks for this patch. I really like this concept which can avoid from instance mistakes. Otherwise looks good to me. Reviewed-by: Minwoo Im

[PATCH 2/2] lightnvm: print error when target is not found

2019-07-27 Thread Minwoo Im
If userspace requests target to be removed, nvm_remove_tgt() will iterate the nvm_devices to find out the given target, but if not found, then it should print out the error. Cc: Matias Bjørling Cc: Javier González Signed-off-by: Minwoo Im --- drivers/lightnvm/core.c | 5 - 1 file changed

Re: [PATCH] nvme-pci: Use dev_get_drvdata where possible

2019-07-25 Thread Minwoo Im
On 19-07-24 20:22:35, Chuhong Yuan wrote: > Instead of using to_pci_dev + pci_get_drvdata, > use dev_get_drvdata to make code simpler. > > Signed-off-by: Chuhong Yuan This looks good to me. Reviewed-by: Minwoo Im

Re: [PATCH] firmware: qcom_scm: fix error for incompatible pointer

2019-07-23 Thread Minwoo Im
> > > > We just can cast phys_addr_t to dma_addr_t here. > > > > > > IME, casting is rarely a proper solution. > > > > *nod* > > > > ptr_phys probably should be a dma_addr_t. Unless this driver is so > > magic that it really wants a physical and not a dma address, in which > > case it needs to

[PATCH] firmware: qcom_scm: fix error for incompatible pointer

2019-07-19 Thread Minwoo Im
aka unsigned int *}’ static inline void *dma_alloc_coherent(struct device *dev, size_t size, ^~ ``` We just can cast phys_addr_t to dma_addr_t here. Cc: Andy Gross Cc: David Brown Signed-off-by: Minwoo Im --- drivers/firmware/qcom_scm.c | 3 ++- 1 file chan

Re: [PATCH v2 3/3] nvme-pci: Add support for Apple 2018+ models

2019-07-17 Thread Minwoo Im
ar + 4096; > - dev->io_sqes = NVME_NVM_IOSQES; > + > + /* > + * Some Apple controllers require a non-standard SQE size. > + * Interestingly they also seem to ignore the CC:IOSQES register > + * so we don't bother updating it here. > + */ That is really interesting. This also looks good to me. Reviewed-by: Minwoo Im Thanks,

Re: [PATCH v2 2/3] nvme-pci: Add support for variable IO SQ element size

2019-07-17 Thread Minwoo Im
_dev(struct > nvme_ctrl *ctrl) > struct nvme_queue { > struct nvme_dev *dev; > spinlock_t sq_lock; > - struct nvme_command *sq_cmds; > + void *sq_cmds; It would be great if it can remain the existing data type for the SQEs... But I'm fine with this also. It looks good to me. Reviewed-by: Minwoo Im Thanks,

Re: [PATCH v2 1/3] nvme-pci: Pass the queue to SQ_SIZE/CQ_SIZE macros

2019-07-17 Thread Minwoo Im
On 19-07-17 10:45:25, Benjamin Herrenschmidt wrote: > This will make it easier to handle variable queue entry sizes > later. No functional change. > > Signed-off-by: Benjamin Herrenschmidt > Reviewed-by: Christoph Hellwig Reviewed-by: Minwoo Im

Re: linux-next: Fixes tag needs some work in the block tree

2019-07-12 Thread Minwoo Im
On 19-07-11 16:03:22, Jens Axboe wrote: > On 7/11/19 3:35 PM, Stephen Rothwell wrote: > > Hi all, > > > > In commit > > > >8f3858763d33 ("nvme: fix NULL deref for fabrics options") > > > > Fixes tag > > > >Fixes: 958f2a0f8 ("nvme-tcp: set the STABLE_WRITES flag when data digests > > >

Re: [PATCH -next] nvme-pci: Make nvme_dev_pm_ops static

2019-06-26 Thread Minwoo Im
device *dev) > return 0; > } > > -const struct dev_pm_ops nvme_dev_pm_ops = { > +static const struct dev_pm_ops nvme_dev_pm_ops = { > .suspend= nvme_suspend, > .resume = nvme_resume, > .freeze = nvme_simple_suspend, IMHO, it should be in static. Reviewed-by: Minwoo Im

Re: [PATCH][next] nvme-trace: fix spelling mistake "spcecific" -> "specific"

2019-06-26 Thread Minwoo Im
-- > 2.20.1 > > > ___ > Linux-nvme mailing list > linux-n...@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-nvme *facepalm*.. Thanks for fixing this, Colin! Reviewed-by: Minwoo Im

Re: [RFC PATCH] mpt3sas: support target smid for [abort|query] task

2019-06-13 Thread Minwoo Im
On 19-06-13 16:54:02, Minwoo Im wrote: > We can request task management IOCTL command(MPI2_FUNCTION_SCSI_TASK_MGMT) > to /dev/mpt3ctl. If the given task_type is either abort task or query > task, it may need a field named "Initiator Port Transfer Tag to Manage" > in the IU.

[RFC PATCH] mpt3sas: support target smid for [abort|query] task

2019-06-13 Thread Minwoo Im
andler. Signed-off-by: Minwoo Im --- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c index b2bb47c14d35..5c7539dae713 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c

[RFC PATCH] mpt3sas: support target smid for [abort|query] task

2019-06-13 Thread Minwoo Im
andler. Signed-off-by: Minwoo Im --- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c index b2bb47c14d35..5c7539dae713 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c

[RFC PATCH] mpt3sas: support target smid for [abort|query] task

2019-06-13 Thread Minwoo Im
andler. Signed-off-by: Minwoo Im --- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c index b2bb47c14d35..5c7539dae713 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c

[tip:irq/core] genirq/affinity: Remove unused argument from [__]irq_build_affinity_masks()

2019-06-12 Thread tip-bot for Minwoo Im
Commit-ID: 0e51833042fccfe882ef3e85a346252550d26c22 Gitweb: https://git.kernel.org/tip/0e51833042fccfe882ef3e85a346252550d26c22 Author: Minwoo Im AuthorDate: Sun, 2 Jun 2019 20:21:17 +0900 Committer: Thomas Gleixner CommitDate: Wed, 12 Jun 2019 10:52:45 +0200 genirq/affinity: Remove

Re: [PATCH V3 0/5] nvme-trace: Add support for fabrics command

2019-05-17 Thread Minwoo Im
On 19-05-12 16:34:08, Minwoo Im wrote: > Hi, > > Here's a third patchset to support fabrics command tracing. The first > patch updated host/trace module to a outside of it to provide common > interfaces for host and target both. The second one adds support for > tracing fa

Re: [PATCH v3 5/7] nvme-pci: add device coredump infrastructure

2019-05-13 Thread Minwoo Im
> +static int nvme_get_telemetry_log_blocks(struct nvme_ctrl *ctrl, void *buf, > + size_t bytes, loff_t offset) > +{ > + loff_t pos = 0; > + u32 chunk_size; > + > + if (check_mul_overflow(ctrl->max_hw_sectors, 512u, _size)) > +

Re: [PATCH v3 6/7] nvme-pci: trigger device coredump on command timeout

2019-05-13 Thread Minwoo Im
> -static void __maybe_unused nvme_coredump_init(struct nvme_dev *dev); > -static void __maybe_unused nvme_coredump_logs(struct nvme_dev *dev); > -static void __maybe_unused nvme_coredump_complete(struct nvme_dev > *dev); > +static void nvme_coredump_init(struct nvme_dev *dev); > +static void

Re: [PATCH] nvme/pci: Use host managed power state for suspend

2019-05-12 Thread Minwoo Im
> > + union nvme_result res; > > + int ret; > > + > > + if (!result) > > + return -EINVAL; > > + > > + memset(, 0, sizeof(c)); > > + c.features.opcode = nvme_admin_get_features; > > + c.features.fid = cpu_to_le32(NVME_FEAT_POWER_MGMT); > > + > > + ret =

[PATCH V3 3/5] nvme: Introduce nvme_is_fabrics to check fabrics cmd

2019-05-12 Thread Minwoo Im
This patch introduce a nvme_is_fabrics() inline function to check whether or not the given command structure is for fabrics. Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: James Smart Signed-off-by: Minwoo Im --- drivers/nvme/host/fabrics.c | 2 +- drivers

[PATCH V3 5/5] nvme-trace: Add tracing for req_comp in target

2019-05-12 Thread Minwoo Im
host and target system. Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: James Smart Signed-off-by: Minwoo Im --- drivers/nvme/host/core.c | 2 +- drivers/nvme/target/core.c | 3 +++ drivers/nvme/trace.c | 1 + drivers/nvme/trace.h | 51

[PATCH V3 4/5] nvme-trace: Add tracing for req_init in trarget

2019-05-12 Thread Minwoo Im
00 00 00 00 00 00 00 00 00 00) Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: James Smart Signed-off-by: Minwoo Im --- drivers/nvme/host/core.c| 2 +- drivers/nvme/target/core.c | 3 +++ drivers/nvme/target/nvmet.h | 9 +++ drivers/nvme/trace.c

[PATCH V3 2/5] nvme-trace: Support tracing fabrics commands from host-side

2019-05-12 Thread Minwoo Im
fctype as an argument to support fabrics command which will be ignored in case of nvme common case. Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: James Smart Signed-off-by: Minwoo Im --- drivers/nvme/trace.c | 67 drivers

[PATCH V3 1/5] nvme: Make trace common for host and target both

2019-05-12 Thread Minwoo Im
: Sagi Grimberg Cc: James Smart Signed-off-by: Minwoo Im --- MAINTAINERS | 2 ++ drivers/nvme/Makefile | 3 +++ drivers/nvme/host/Makefile | 1 - drivers/nvme/host/core.c| 3 +-- drivers/nvme/host/pci.c | 2 +- drivers/nvme/{host => }/trace.c

[PATCH V3 0/5] nvme-trace: Add support for fabrics command

2019-05-12 Thread Minwoo Im
that it's a fabrics command. (Christoph) - do not make it within nvme admin commands (Chaitanya) Minwoo Im (5): nvme: Make trace common for host and target both nvme-trace: Support tracing fabrics commands from host-side nvme: Introduce nvme_is_fabrics to check fabrics cmd nvme-trace: Add

Re: [PATCH v2 6/7] nvme-pci: add device coredump support

2019-05-07 Thread Minwoo Im
> This is a bit of a mine field. The shutdown_lock is held when reclaiming > requests that didn't see a response. If you're holding it here and your > telemetry log page times out, we're going to deadlock. And since the > controller is probably in a buggered state when you try to retrieve one, > I

Re: [PATCH 3/4] nvme-pci: add device coredump support

2019-05-04 Thread Minwoo Im
On 5/4/19 11:38 PM, Minwoo Im wrote: On 5/4/19 11:26 PM, Akinobu Mita wrote: 2019年5月4日(土) 19:04 Minwoo Im : + { NVME_REG_INTMS,   "intms",    32 }, + { NVME_REG_INTMC,   "intmc",    32 }, + { NVME_REG_CC,  "cc",

Re: [PATCH 3/4] nvme-pci: add device coredump support

2019-05-04 Thread Minwoo Im
On 5/4/19 11:26 PM, Akinobu Mita wrote: 2019年5月4日(土) 19:04 Minwoo Im : Hi, Akinobu, Regardless to reply of the cover, few nits here. On 5/2/19 5:59 PM, Akinobu Mita wrote: + +static const struct nvme_reg nvme_regs[] = { + { NVME_REG_CAP, "cap", 64 }, + { N

Re: [PATCH 3/4] nvme-pci: add device coredump support

2019-05-04 Thread Minwoo Im
Hi, Akinobu, Regardless to reply of the cover, few nits here. On 5/2/19 5:59 PM, Akinobu Mita wrote: + +static const struct nvme_reg nvme_regs[] = { + { NVME_REG_CAP, "cap",64 }, + { NVME_REG_VS, "version",32 }, Why don't we just go with "vs"

Re: [PATCH 0/4] nvme-pci: support device coredump

2019-05-04 Thread Minwoo Im
Hi Akinobu, On 5/4/19 1:20 PM, Akinobu Mita wrote: 2019年5月3日(金) 21:20 Christoph Hellwig : On Fri, May 03, 2019 at 06:12:32AM -0600, Keith Busch wrote: Could you actually explain how the rest is useful? I personally have never encountered an issue where knowing these values would have helped:

RE: Re: [PATCH] nvmet: fix ptr_ret.cocci warnings

2019-04-29 Thread Minwoo Im
Sure, I will. Thanks, > -Original Message- > From: Linux-nvme [mailto:linux-nvme-boun...@lists.infradead.org] On > Behalf Of Chaitanya Kulkarni > Sent: Tuesday, April 30, 2019 7:14 AM > To: Minwoo Im > Cc: linux-kernel@vger.kernel.org; Christoph Hellwig; linux- > n..

RE: [PATCH 1/3] drivers: nvme: target: core: fix build break

2019-04-25 Thread Minwoo Im
This looks good to me. Reviewed-by: Minwoo Im > -Original Message- > From: Linux-nvme [mailto:linux-nvme-boun...@lists.infradead.org] On Behalf > Of Enrico Weigelt, metux IT consult > Sent: Wednesday, April 24, 2019 7:35 PM > To: linux-kernel@vger.kernel.org > C

Re: [PATCH] nvme: determine the number of IO queues

2019-04-18 Thread Minwoo Im
On 4/18/19 10:38 PM, Aaron Ma wrote: On 4/18/19 9:33 PM, Minwoo Im wrote: If the controller returns error for that command, how can we assure that the controller would support a single I/O queue ? Make sense, I will keep *count = 0 in V2. IMHO, If you would like to set *count to 0

Re: [PATCH] nvme: determine the number of IO queues

2019-04-18 Thread Minwoo Im
On 4/18/19 9:52 PM, Aaron Ma wrote: On 4/18/19 8:13 PM, Minwoo Im wrote: Yes the IO queues number is 0's based, but driver would return error and remove the nvme device as dead. IMHO, if a controller indicates an error with this set_feature command, then we need to figure out why

Re: [PATCH] nvme: determine the number of IO queues

2019-04-18 Thread Minwoo Im
or because as you mentioned above, NCQA, NSQA will be returned as 0-based. If an error is there, that could mean that controller may not able to provide even a single queue for I/O. Thanks, Minwoo Im So set it as 1 at least the NVME can be probed properly. Regards, Aaron I forgot to add th

Re: [PATCH v3 2/3] PCI: Samsung SM961/PM961 NVMe disable before FLR quirk

2018-07-24 Thread Minwoo Im
Hi Alex, On Tue, 2018-07-24 at 10:14 -0600, Alex Williamson wrote: > The Samsung SM961/PM961 (960 EVO) sometimes fails to return from FLR > with the PCI config space reading back as -1.  A reproducible instance > of this behavior is resolved by clearing the enable bit in the NVMe > configuration

Re: [PATCH v3 2/3] PCI: Samsung SM961/PM961 NVMe disable before FLR quirk

2018-07-24 Thread Minwoo Im
Hi Alex, On Tue, 2018-07-24 at 10:14 -0600, Alex Williamson wrote: > The Samsung SM961/PM961 (960 EVO) sometimes fails to return from FLR > with the PCI config space reading back as -1.  A reproducible instance > of this behavior is resolved by clearing the enable bit in the NVMe > configuration