Re: [RFC PATCH 2/7] RDMA/rxe: Convert the triple tasklets to workqueues

2022-09-11 Thread Bart Van Assche
's opinion about tasklets (https://lore.kernel.org/all/yvovfxmjqaubs...@linutronix.de/). Thanks, Bart.

Re: [PATCH v7 1/3] bio: limit bio max size

2021-04-19 Thread Bart Van Assche
igned int bio_max_size(struct bio *bio); >> >> You may want to define bio_max_size() as an inline function in bio.h >> such that no additional function calls are introduced in the hot path. > > I tried, but it is not easy. because request_queue structure of blkdev.h > should be referred in bio.h. I think it's not good to apply as a inline > function. Please don't worry about this. Inlining bio_max_size() is not a big concern to me. Thanks, Bart.

Re: [PATCH 1/2] workqueue: Have 'alloc_workqueue()' like macros accept a format specifier

2021-04-19 Thread Bart Van Assche
of the 2 patches. > > If Théo is "Tejun Heo" ( (maintainer:WORKQUEUE) ), he is already in > the To: line. Linus wants to see a "Cc: ${maintainer}" tag in patches that he receives from a maintainer and that modify another subsystem than the subsystem maintained by that maintainer. Thanks, Bart.

Re: [PATCH 1/2] workqueue: Have 'alloc_workqueue()' like macros accept a format specifier

2021-04-18 Thread Bart Van Assche
On 4/18/21 2:26 PM, Christophe JAILLET wrote: > Improve 'create_workqueue', 'create_freezable_workqueue' and > 'create_singlethread_workqueue' so that they accept a format > specifier and a variable number of arguments. > > This will put these macros more in line with 'alloc_ordered_workqueue' and

Re: [PATCH] net/mlx5: Use kasprintf instead of hand-writing it

2021-04-18 Thread Bart Van Assche
o out_err; > > - strcpy(name, "mlx5_health"); > - strcat(name, dev_name(dev->device)); > health->wq = create_singlethread_workqueue(name); > kfree(name); > if (!health->wq) Instead of modifying the mlx5 driver, please change the definition of the create_singlethread_workqueue() such that it accept a format specifier and a variable number of arguments. Thanks, Bart.

Re: [PATCH v7 1/3] bio: limit bio max size

2021-04-16 Thread Bart Van Assche
tacked drivers for which the bio size has to be limited than for which the bio size has not to be limited. Hence the proposal to set t->bio_max_bytes to UINT_MAX in blk_stack_limits() and to let the stacked driver (e.g. dm-crypt) decide whether or not to lower that value. Thanks, Bart.

Re: [PATCH v18 1/2] scsi: ufs: Enable power management for wlun

2021-04-15 Thread Bart Van Assche
- * to avoid deadlock between ufshcd_suspend > - * and exception event handler. > - */ > - pm_runtime_get_noresume(hba->dev); > - } > + ufshcd_is_exception_event(lrbp->ucd_rsp_ptr)) > + /* Flushed in suspend */ > + schedule_work(&hba->eeh_work); What makes it safe to leave out the above pm_runtime_get_noresume() call? Thanks, Bart.

Re: [PATCH v7 1/3] bio: limit bio max size

2021-04-15 Thread Bart Van Assche
d63da3af 100644 > --- a/include/linux/bio.h > +++ b/include/linux/bio.h > @@ -106,6 +106,8 @@ static inline void *bio_data(struct bio *bio) > return NULL; > } > > +extern unsigned int bio_max_size(struct bio *bio); You may want to define bio_max_size() as an inline function in bio.h such that no additional function calls are introduced in the hot path. Thanks, Bart.

Re: [PATCH] block: remove unused function

2021-04-15 Thread Bart Van Assche
ne_mask; > -} A similar patch is already in Jens' for-5.13/block branch. See also commit 540ad3f3da25 ("blk-zoned: Remove the definition of blk_zone_start()"). Bart.

Re: [PATCH v7 1/3] bio: limit bio max size

2021-04-13 Thread Bart Van Assche
o initialize the maximum bio size to UINT_MAX in blk_set_default_limits(). Thanks, Bart.

Re: [PATCH v7 2/3] ufs: set QUEUE_FLAG_LIMIT_BIO_SIZE

2021-04-13 Thread Bart Van Assche
As you may know blk_queue_max_hw_sectors() may be called by any block driver (stacking and non-stacking). * In blk_stack_limits(), set the maximum BIO size to UINT_MAX. Stacking block drivers must call blk_stack_limits(). Thanks, Bart.

Re: [PATCH -next] RDMA/srpt: Fix error return code in srpt_cm_req_recv()

2021-04-12 Thread Bart Van Assche
_name(&sdev->device->dev), port_num); > mutex_unlock(&sport->mutex); > + ret = -EINVAL; > goto reject; > } Reviewed-by: Bart Van Assche

Re: [PATCH -next] RDMA/srpt: Fix error return code in srpt_cm_req_recv()

2021-04-12 Thread Bart Van Assche
On 4/12/21 11:09 AM, Jason Gunthorpe wrote: > On Thu, Apr 08, 2021 at 09:50:30AM -0700, Bart Van Assche wrote: >> On 4/8/21 4:31 AM, Wang Wensheng wrote: >>> Fix to return a negative error code from the error handling >>> case instead of 0, as done elsewhere in t

Re: [PATCH] gdrom: fix compilation error

2021-04-11 Thread Bart Van Assche
^~ How about adding a Fixes: tag? Thanks, Bart.

Re: [PATCH] scsi: qla2xxx: Re-use existing error handling path

2021-04-11 Thread Bart Van Assche
ret = qla2xxx_get_ini_stats(fc_bsg_to_shost(bsg_job), > req_data->stat_type, Since the above looks good to me: Reviewed-by: Bart Van Assche

Re: [RESEND,v5,1/2] bio: limit bio max size

2021-04-09 Thread Bart Van Assche
hanks, Bart.

Re: [PATCH -next] RDMA/srpt: Fix error return code in srpt_cm_req_recv()

2021-04-08 Thread Bart Van Assche
_name(&sdev->device->dev), port_num); > mutex_unlock(&sport->mutex); > + ret = -EINVAL; > goto reject; > } Please fix the Hulk Robot. The following code occurs three lines above the modified code: ret = -EINVAL; Thanks, Bart.

Re: [PATCH v1 1/2] scsi: pm8001: clean up for white space

2021-04-07 Thread Bart Van Assche
On 4/5/21 11:39 PM, luojiaxing wrote: On 2021/4/3 0:01, Bart Van Assche wrote: On 4/2/21 2:08 AM, Luo Jiaxing wrote:   #define AAP1_MEMMAP(r, c) \ -    (*(u32 *)((u8*)pm8001_ha->memoryMap.region[AAP1].virt_ptr + (r) * 32 \ +    (*(u32 *)((u8 *)pm8001_ha->memoryMap.region[AAP1].virt_pt

Re: [RESEND PATCH v5 2/2] bio: add limit_bio_size sysfs

2021-04-06 Thread Bart Van Assche
r, > &queue_iostats_entry.attr, > &queue_stable_writes_entry.attr, > + &queue_limit_bio_size_entry.attr, > &queue_random_entry.attr, > &queue_poll_entry.attr, > &queue_wc_entry.attr, Has it been considered to introduce a function to set the BIO size limit instead of introducing a new sysfs attribute? See also blk_queue_max_hw_sectors(). Thanks, Bart.

Re: [PATCH 03/11] block: mtip32xx: mtip32xx: Mark debugging variable 'start' as __maybe_unused

2021-04-06 Thread Bart Van Assche
riable] Has it been verified that the compiler is wrong, or in other words that this patch does not suppress a useful warning? Thanks, Bart.

Re: [PATCH 02/11] block: drbd: drbd_interval: Demote some kernel-doc abuses and fix another header

2021-04-06 Thread Bart Van Assche
On 3/12/21 2:55 AM, Lee Jones wrote: > Fixes the following W=1 kernel build warning(s): > [ ... ] Reviewed-by: Bart Van Assche

Re: [PATCH 01/11] block: rsxx: core: Remove superfluous const qualifier

2021-04-06 Thread Bart Van Assche
Card Event Handler ---*/ > -static const char * const rsxx_card_state_to_str(unsigned int state) > +static const char *rsxx_card_state_to_str(unsigned int state) > { > static const char * const state_strings[] = { > "Unknown", "Shutdown", "Starting", "Formatting", Reviewed-by: Bart Van Assche

Re: [PATCH rdma-next 01/10] RDMA: Add access flags to ib_alloc_mr() and ib_mr_pool_init()

2021-04-05 Thread Bart Van Assche
ax_num_meta_sg, > + u32 access); > void ib_mr_pool_destroy(struct ib_qp *qp, struct list_head *list); > > #endif /* _RDMA_MR_POOL_H */ Does the new 'access' argument only control whether or not PCIe relaxed ordering is enabled? It seems wrong to me to make enabling of PCIe relaxed ordering configurable. I think this mechanism should be enabled unconditionally if the HCA supports it. Thanks, Bart.

Re: [PATCH v1 2/2] scsi: pm8001: clean up for open brace

2021-04-02 Thread Bart Van Assche
w image file",FAIL_OPEN_BIOS_FILE}, > {"image header mismatch", FLASH_UPDATE_HDR_ERR}, > {"image offset mismatch", FLASH_UPDATE_OFFSET_ERR}, Can 'flash_error_table' be declared const? Thanks, Bart.

Re: [PATCH v1 1/2] scsi: pm8001: clean up for white space

2021-04-02 Thread Bart Van Assche
please convert it into an inline function such that the type of the arguments can be verified by the compiler. Thanks, Bart.

Re: [PATCH v5 1/2] scsi: ufs: Fix task management request completion timeout

2021-04-01 Thread Bart Van Assche
, TMR always ends up with completion timeout. Fix it by > calling blk_mq_start_request() in __ufshcd_issue_tm_cmd(). Reviewed-by: Bart Van Assche

Re: [PATCH -next] IB/srpt: Fix passing zero to 'PTR_ERR'

2021-04-01 Thread Bart Van Assche
ULL. Changing IS_ERR_OR_NULL() into IS_ERR() and removing the WARN_ON_ONCE(ch->sess == NULL) may be a better solution. Thanks, Bart.

Re: [PATCH v4 1/2] scsi: ufs: Fix task management request completion timeout

2021-03-31 Thread Bart Van Assche
just set req->state to MQ_RQ_IN_FLIGHT > Without all other irrelevant initializations such as add timeout etc. Hmm ... I'm not sure that any of the actions performed by blk_mq_start_request() are irrelevant in this context. Additionally, no other block or SCSI driver sets MQ_RQ_IN_FLIGHT directly. Thanks, Bart.

Re: [PATCH v3 2/4] scsi: devinfo: add new flag BLIST_MEDIA_CHANGE

2021-03-28 Thread Bart Van Assche
GE unit attention after resuming from runtime suspend". Thanks, Bart.

Re: [PATCH v3 1/4] scsi: add expecting_media_change flag to error path

2021-03-28 Thread Bart Van Assche
an approach that does not require to introduce a new state variable, e.g. to send a REQUEST SENSE command after a resume? Thanks, Bart.

Re: [PATCH v3 3/4] scsi: sd: use expecting_media_change for BLIST_MEDIA_CHANGE devices

2021-03-28 Thread Bart Van Assche
in VPD page 0x83? Thanks, Bart.

Re: [PATCH v2 0/3] scsi: add runtime PM workaround for SD cardreaders

2021-03-27 Thread Bart Van Assche
bb ("scsi: devinfo: BLIST_RETRY_ASC_C1 for Fujitsu ETERNUS"). Thanks, Bart.

Re: [PATCH v2 8/8] block: add WARN() in bio_split() for sector alignment

2021-03-25 Thread Bart Van Assche
; Please change this WARN_ON() into WARN_ON_ONCE() to prevent a storm of call traces in the kernel log if this warning statement would be hit repeatedly. Thanks, Bart.

Re: [PATCH v2 0/8] ensure bios aren't split in middle of crypto data unit

2021-03-25 Thread Bart Van Assche
On 3/25/21 6:39 PM, Satya Tangirala wrote: > On Thu, Mar 25, 2021 at 02:51:31PM -0700, Bart Van Assche wrote: >> Are you sure that the block layer core splits bios at logical block >> boundaries? Commit 9cc5169cd478 ("block: Improve physical block >> alignment of split

Re: [PATCH v31 4/4] scsi: ufs: Add HPB 2.0 support

2021-03-25 Thread Bart Van Assche
nd the above reply. Thanks, Bart.

Re: [PATCH v2 0/8] ensure bios aren't split in middle of crypto data unit

2021-03-25 Thread Bart Van Assche
tch series, can the same effect be achieved by reporting the crypto data unit size as the physical block size? Thanks, Bart.

Re: __scsi_remove_device: fix comments minor error

2021-03-23 Thread Bart Van Assche
r with git send-email if you are not yet familiar with it. Thanks, Bart.

Re: [syzbot] KASAN: use-after-free Read in disk_part_iter_next (2)

2021-03-22 Thread Bart Van Assche
only freed if its reference count drops to zero. The function that frees the partition information, bdev_free_inode(), is invoked via call_rcu(). bdgrab() fails if the refcount of a partition is zero. Does that mean that it is not necessary to call synchronize_rcu() between xa_erase() and put_device()? Thanks, Bart.

Re: [syzbot] KASAN: use-after-free Read in disk_part_iter_next (2)

2021-03-21 Thread Bart Van Assche
On 3/21/21 7:35 PM, Ming Lei wrote: > On Mon, Mar 22, 2021 at 7:03 AM Bart Van Assche wrote: >> >> On 3/14/21 4:08 AM, syzbot wrote: >>> syzbot found the following issue on: >>> >>> HEAD commit:280d542f Merge tag 'drm-fixes-2021-03-05&#

Re: [syzbot] KASAN: use-after-free Read in disk_part_iter_next (2)

2021-03-21 Thread Bart Van Assche
On 3/14/21 4:08 AM, syzbot wrote: > syzbot found the following issue on: > > HEAD commit:280d542f Merge tag 'drm-fixes-2021-03-05' of git://anongit.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=15ade5aed0 > kernel config: https://syzkaller.appspo

Re: [PATCH v12 1/2] scsi: ufs: Enable power management for wlun

2021-03-19 Thread Bart Van Assche
/scm/linux/kernel/git/mkp/scsi.git. Thanks, Bart.

Re: [RFC PATCH v3 2/3] blk-mq: Freeze and quiesce all queues for tagset in elevator_exit()

2021-03-19 Thread Bart Van Assche
inux-block/20210319010009.10041-1-bvanass...@acm.org/)? Thanks, Bart.

Re: [PATCH v12 1/2] scsi: ufs: Enable power management for wlun

2021-03-18 Thread Bart Van Assche
* resume fails, irq and clocks can be OFF, and powers > * can be OFF or in LPM. >*/ Please make better use of the horizontal space in the above comment by making comment lines longer. Thanks, Bart.

Re: [PATCH v2] scsi: ufs: sysfs: Print string descriptors as raw data

2021-03-16 Thread Bart Van Assche
Hex data needs to be parsed before it can be used by any software. Has it been considered to make the "raw" attributes binary attributes instead of hex-encoded binary? See also sysfs_create_bin_file(). Thanks, Bart.

Re: [RFC PATCH v3 2/3] blk-mq: Freeze and quiesce all queues for tagset in elevator_exit()

2021-03-16 Thread Bart Van Assche
On 3/16/21 10:43 AM, John Garry wrote: > On 16/03/2021 17:00, Bart Van Assche wrote: >> I agree that Jens asked at the end of 2018 not to touch the fast path >> to fix this use-after-free (maybe that request has been repeated more >> recently). If Jens or anyone else fee

Re: [RFC PATCH v3 2/3] blk-mq: Freeze and quiesce all queues for tagset in elevator_exit()

2021-03-16 Thread Bart Van Assche
odern CPU pipelines store instructions so the performance impact of adding an additional store should be small. - Since the block layer has a tendency to reuse tags that have been freed recently, it is likely that hctx->tags->rqs[rq->tag] will be used for a next request and hence that it will have to be loaded into the CPU cache anyway. Bart.

Re: [RFC PATCH v3 2/3] blk-mq: Freeze and quiesce all queues for tagset in elevator_exit()

2021-03-12 Thread Bart Van Assche
are added to the block layer code. - No early return is inserted in blk_mq_tagset_busy_iter(). Thanks, Bart. >From a0e534012a766bd6e53cdd466eec0a811164c12a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 10 Mar 2021 19:11:47 -0800 Subject: [PATCH] blk-mq: Fix races between iteratin

Re: [RFC PATCH v3 3/3] blk-mq: Lockout tagset iterator when exiting elevator

2021-03-10 Thread Bart Van Assche
On 3/10/21 12:52 AM, John Garry wrote: On 09/03/2021 19:21, Bart Van Assche wrote: Regarding this patch series, I have shared the feedback I wanted to share so I would appreciate it if someone else could also take a look. So I can incorporate any changes and suggestions so far and send a non

Re: [RFC PATCH v3 2/3] blk-mq: Freeze and quiesce all queues for tagset in elevator_exit()

2021-03-10 Thread Bart Van Assche
{ + if (tmp == q) + continue; + blk_mq_unquiesce_queue(tmp); + blk_mq_unfreeze_queue(tmp); + } + mutex_unlock(&set->tag_list_lock); } Reviewed-by: Bart Van Assche

Re: [RFC PATCH v3 3/3] blk-mq: Lockout tagset iterator when exiting elevator

2021-03-09 Thread Bart Van Assche
() and blk_mq_alloc_request_hctx(). So I think all allocated tags are associated with a request queue. Regarding this patch series, I have shared the feedback I wanted to share so I would appreciate it if someone else could also take a look. Thanks, Bart.

Re: [RFC PATCH v3 3/3] blk-mq: Lockout tagset iterator when exiting elevator

2021-03-08 Thread Bart Van Assche
On 3/8/21 3:17 AM, John Garry wrote: On 06/03/2021 04:43, Bart Van Assche wrote: On 3/5/21 7:14 AM, John Garry wrote: diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c index 7ff1b20d58e7..5950fee490e8 100644 --- a/block/blk-mq-tag.c +++ b/block/blk-mq-tag.c @@ -358,11 +358,16 @@ void

Re: [RFC PATCH v3 2/3] blk-mq: Freeze and quiesce all queues for tagset in elevator_exit()

2021-03-08 Thread Bart Van Assche
On 3/8/21 2:50 AM, John Garry wrote: Please let me know further thoughts. Hi John, My guess is that it is safe to nest these two locks. I was asking because I had not found any information about the nesting in the patch description. Bart.

Re: [RFC PATCH v3 1/3] blk-mq: Clean up references to old requests when freeing rqs

2021-03-06 Thread Bart Van Assche
tags[...] before the cmpxcg() call and dereferencing it after blk_mq_free_rqs() has called __free_pages()? Thanks, Bart.

Re: [RFC PATCH v3 3/3] blk-mq: Lockout tagset iterator when exiting elevator

2021-03-05 Thread Bart Van Assche
chg(&set->iter_usage_counter, 1, 0) != 1); Isn't it recommended to call cpu_relax() inside busy-waiting loops? > blk_mq_sched_free_requests(q); > __elevator_exit(q, e); > > + atomic_set(&set->iter_usage_counter, 1); Can it happen that the above atomic_set() call happens while a blk_mq_tagset_busy_iter() call is in progress? Should that atomic_set() call perhaps be changed into an atomic_inc() call? Thanks, Bart.

Re: [RFC PATCH v3 2/3] blk-mq: Freeze and quiesce all queues for tagset in elevator_exit()

2021-03-05 Thread Bart Van Assche
amp;set->tag_list_lock); > } This patch introduces nesting of tag_list_lock inside sysfs_lock. The latter is per request queue while the former can be shared across multiple request queues. Has it been analyzed whether this is safe? Thanks, Bart.

Re: [PATCH 05/11] pragma once: convert drivers/scsi/qla2xxx/qla_target.h

2021-02-28 Thread Bart Van Assche
gt; -#ifndef __QLA_TARGET_H > -#define __QLA_TARGET_H > - > +#pragma once > #include "qla_def.h" > #include "qla_dsd.h" Please insert a blank line between #pragma once and the #include directives. Thanks, Bart.

Re: [RFC PATCH v3 1/1] scsi: ufs: Enable power management for wlun

2021-02-12 Thread Bart Van Assche
dev_err(&sdev->sdev_gendev, "%s failed: %d\n", __func__, ret); > + > + trace_ufshcd_wl_suspend(dev_name(dev), ret, > + ktime_to_us(ktime_sub(ktime_get(), start)), > + hba->curr_dev_pwr_mode, hba->uic_link_state); > + > + return ret; > + > +} Please remove the blank line after the return statement. Otherwise this patch looks good to me. Hence: Reviewed-by: Bart Van Assche

Re: [PATCH] scsi: ufs: sysfs: add is_ascii_output entry

2021-02-10 Thread Bart Van Assche
\ > kfree(desc_buf);\ Please do not introduce a mode variable but instead introduce a new attribute such that there is one attribute for the unicode output and one attribute for the ASCII output. Mode variables are troublesome when e.g. two scripts try to set the mode attribute concurrently. Thanks, Bart.

Re: [PATCH v3 3/3] scsi: ufs: Fix wrong Task Tag used in task management request UPIUs

2021-02-06 Thread Bart Van Assche
anagement Input Parameters > Field Description > Input Parameter 2 LSB: Task Tag of the task/command operated by the task > management function. Thanks for the clarification. Feel free to add the following to this patch: Reviewed-by: Bart Van Assche

Re: [RFC PATCH v1 1/2] block: bsg: resume scsi device before accessing

2021-02-06 Thread Bart Van Assche
On 1/26/21 8:00 PM, Asutosh Das wrote: > Resumes the scsi device before accessing it. > > Change-Id: I2929af60f2a92c89704a582fcdb285d35b429fde > Signed-off-by: Asutosh Das > Signed-off-by: Can Guo > Signed-off-by: Bao D. Nguyen No Change-Id tags in upstream patches please. Thanks, Bart.

Re: [PATCH v3 3/3] scsi: ufs: Fix wrong Task Tag used in task management request UPIUs

2021-01-31 Thread Bart Van Assche
On 1/28/21 9:57 PM, Can Guo wrote: > On 2021-01-29 11:15, Bart Van Assche wrote: >> On 1/27/21 8:16 PM, Can Guo wrote: >>> In __ufshcd_issue_tm_cmd(), it is not right to use hba->nutrs + >>> req->tag as >>> the Task Tag in one TMR UPIU. Directly use

Re: [PATCH v3 2/3] scsi: ufs: Fix a race condition btw task management request send and compl

2021-01-31 Thread Bart Van Assche
of host spin lock, ufshcd_compl_tm() shall not run > into the scenario where req->end_io_data is set but > REG_UTP_TASK_REQ_DOOR_BELL > has not been set. What do you think? That sounds reasonable to me. Thanks, Bart.

Re: [PATCH v3 1/3] scsi: ufs: Fix task management request completion timeout

2021-01-28 Thread Bart Van Assche
flight but also starts a timer. However, no timeout handler has been defined in ufshcd_tmf_ops. Should a timeout handler be defined in that data structure? Thanks, Bart.

Re: [PATCH v3 2/3] scsi: ufs: Fix a race condition btw task management request send and compl

2021-01-28 Thread Bart Van Assche
equest completion and timeout handling. Thanks, Bart.

Re: [PATCH v3 3/3] scsi: ufs: Fix wrong Task Tag used in task management request UPIUs

2021-01-28 Thread Bart Van Assche
hba); An explanation for this change is missing from the patch description. Thanks, Bart.

Re: [PATCH] Revert "block: simplify set_init_blocksize" to regain lost performance

2021-01-26 Thread Bart Van Assche
size_read(bdev->bd_inode); > + > + while (bsize < PAGE_SIZE) { > + if (size & bsize) > + break; > + bsize <<= 1; > + } > + bdev->bd_inode->i_blkbits = blksize_bits(bsize); > } > > int set_blocksize(struct block_device *bdev, int size) How can this patch affect write speed? I haven't found any calls of set_init_blocksize() in the I/O path. Did I perhaps overlook something? Bart.

Re: [PATCH v2] scsi: ufs: Fix some problems in task management request implementation

2021-01-26 Thread Bart Van Assche
blem: In __ufshcd_issue_tm_cmd(), it is not right to use hba->nutrs + > req->tag as the Task Tag in one TMR UPIU. > Fix: Directly use req->tag as Task Tag. Please split this patch into three separate patches - one patch per problem that has been described above. Thanks, Bart.

Re: [PATCH v2] scsi/qla4xxx: convert sysfs sprintf/snprintf family to sysfs_emit/sysfs_emit_at

2021-01-20 Thread Bart Van Assche
> ha->fw_info.fw_patch, ha->fw_info.fw_build); >From the sysfs_emit_at() source code: WARN(... || at >= PAGE_SIZE, "invalid sysfs_emit_at: buf:%p at:%d\n", buf, at) In other words, this patch is wrong. sysfs_emit() should have been used instead of sysfs_emit_at(). Bart.

Re: [PATCH 4.19 06/77] scsi: scsi_transport_spi: Set RQF_PM for domain validation commands

2021-01-13 Thread Bart Van Assche
On 1/13/21 3:47 AM, Pavel Machek wrote: >> From: Bart Van Assche >> >> [ Upstream commit cfefd9f8240a7b9fdd96fcd54cb029870b6d8d88 ] >> >> Disable runtime power management during domain validation. Since a later >> patch removes RQF_PREEMPT, set RQF_PM for dom

Re: [PATCH] target/file: don't zero iter before iov_iter_bvec

2021-01-10 Thread Bart Van Assche
On 1/9/21 7:53 AM, Pavel Begunkov wrote: > iov_iter_bvec() initialises iterators well, no need to pre-zero it > beforehand as done in fd_execute_rw_aio(). Compilers can't optimise it > out and generate extra code for that (confirmed with assembly). Reviewed-by: Bart Van Assche

Re: [PATCH] scsi: target/sbp: remove firewire SBP target driver

2021-01-04 Thread Bart Van Assche
On 1/4/21 2:50 PM, Finn Thain wrote: > On Mon, 4 Jan 2021, Bart Van Assche wrote: >> Additionally, there is a good alternative available for the sbp driver. >> Every system I know of that is equipped with a Firewire port also has an >> Ethernet port. So users who want t

Re: [PATCH] scsi: target/sbp: remove firewire SBP target driver

2021-01-04 Thread Bart Van Assche
On 6/16/20 7:07 PM, Finn Thain wrote: > On Tue, 16 Jun 2020, Bart Van Assche wrote: >> As far as I know the sbp driver only has had one user ever and that user >> is no longer user the sbp driver. > > So, you estimate the userbase at zero. Can you give a confidence level?

Re: [RFC PATCH v2 2/2] blk-mq: Lockout tagset iter when freeing rqs

2021-01-04 Thread Bart Van Assche
On 1/4/21 7:33 AM, John Garry wrote: > On 23/12/2020 15:47, Bart Van Assche wrote: >> I propose to change the order in which blk_mq_sched_free_requests(q) and >> blk_mq_debugfs_unregister(q) are called. Today blk_mq_sched_free_requests(q) >> is called by blk_cleanup_queue()

Re: [PATCH v2 1/2] scsi: ufs: Fix a possible NULL pointer issue

2021-01-01 Thread Bart Van Assche
p;hba->eh_sem); > + if (!hba) > return -EINVAL; > - } > > if (!hba->is_powered || pm_runtime_suspended(hba->dev)) > /* Hi Can, How can ufshcd_system_suspend() or ufshcd_system_resume() be called with a NULL argument? In ufshcd_pci_probe() I see that pci_set_drvdata() is called before pm_runtime_allow(). ufshcd_pci_remove() calls pm_runtime_forbid(). Thanks, Bart.

Re: [PATCH v1 0/5] dm: dm-user: New target that proxies BIOs to userspace

2020-12-23 Thread Bart Van Assche
ssages and data that is shared between kernel and user space (documented in Documentation/target/tcmu-design.rst). Is one system call per read and per write operation fast enough for all block-device-in-user-space implementations? Thanks, Bart.

Re: [RFC PATCH v2 2/2] blk-mq: Lockout tagset iter when freeing rqs

2020-12-23 Thread Bart Van Assche
debugfs attributes earlier is less risky. Although this will make it harder to debug lockups that happen while removing a request queue, kernel developers who are analyzing such an issue can undo this change in their development kernel tree. Thanks, Bart.

Re: [RFC PATCH v2 2/2] blk-mq: Lockout tagset iter when freeing rqs

2020-12-22 Thread Bart Van Assche
it is guaranteed that the tag set won't disappear, e.g. the call from inside sdk_mq_queue_rq(). How about using a mutex inside blk_mq_queue_tag_busy_iter() instead? As far as I can see all blk_mq_queue_tag_busy_iter() happen from a context where it is allowed to sleep. Thanks, Bart.

Re: [RFC PATCH v2 2/2] blk-mq: Lockout tagset iter when freeing rqs

2020-12-21 Thread Bart Van Assche
uggestion to serialize blk_mq_tagset_busy_iter() and blk_mq_free_rqs() looks interesting to me. Thanks, Bart.

Re: [RFC PATCH v2 2/2] blk-mq: Lockout tagset iter when freeing rqs

2020-12-21 Thread Bart Van Assche
On 12/21/20 4:06 AM, John Garry wrote: > On 18/12/2020 22:43, Bart Van Assche wrote: >> Does this mean that we do not yet have >> a full explanation about why the above call stack can be triggered? > > We understand it, and I'll describe my experiment in detail: >

Re: [RFC PATCH v2 2/2] blk-mq: Lockout tagset iter when freeing rqs

2020-12-18 Thread Bart Van Assche
rt with freezing the request queue. blk_mq_freeze_queue() starts with killing q->q_usage_counter and waits until that counter has dropped to zero. In other words, blk_mq_queue_tag_busy_iter() should not iterate over a tag set while a tag set is being freed or reallocated. Does this mean that we do not yet have a full explanation about why the above call stack can be triggered? Thanks, Bart.

Re: [PATCH v14 0/3] scsi: ufs: Add Host Performance Booster Support

2020-12-17 Thread Bart Van Assche
| 156.26 | > | 32 GB | 277.4 | 153.25 | > +--++-+ Hi Daejun, What are the units of the numbers in columns 2 and 3? Thanks, Bart.

Re: [RFC PATCH v2 2/2] blk-mq: Lockout tagset iter when freeing rqs

2020-12-17 Thread Bart Van Assche
more expensive than the corresponding RCU primitives. In other words, I would be much happier if this patch series would use RCU instead of atomics. Thanks, Bart.

Re: [dm-devel] [PATCH v1 0/5] dm: dm-user: New target that proxies BIOs to userspace

2020-12-09 Thread Bart Van Assche
y is > chomping at the bit.  I'm sending it out in this early state to try and > figure > out if it's interesting enough to keep going. Cc-ing Josef and Mike since their nbd contributions make me wonder whether this new driver could be useful to their use cases? Thanks, Bart.

Re: linux-next: build failure after merge of the scsi-mkp tree

2020-12-08 Thread Bart Van Assche
On 12/8/20 9:55 AM, Alan Stern wrote: Yes, that certainly is the proper fix. It's all to easy to miss these issues that depend on your kernel configuration. Bart, can you fold it into a new version of the patch? Sure, I will do that. Thanks, Bart.

Re: [PATCH v1 2/3] scsi: ufs: Distinguish between TM request UPIU and response UPIU in TM UPIU trace

2020-12-06 Thread Bart Van Assche
_upiu(dev_name(hba->dev), str, &descp->rsp_header, > + &descp->output_param1); > } Same comment here: please change the type of the 'str' argument in an enum such that the strcmp() call can be changed into an integer comparison. Thanks, Bart.

Re: [PATCH v1 1/3] scsi: ufs: Distinguish between query REQ and query RSP in query trace

2020-12-06 Thread Bart Van Assche
a->dev), str, &rq->header, &rq->qr); > + trace_ufshcd_upiu(dev_name(hba->dev), str, &rq_rsp->header, > + &rq_rsp->qr); > } Please change the 'str' argument into an enum and let ufshcd_add_query_upiu_trace() do the enum-to-string conversion. That will allow to convert the strcmp() call into an integer comparison. Thanks, Bart.

Re: [PATCH V1] block: Fix use-after-free while iterating over requests

2020-11-30 Thread Bart Van Assche
On 11/29/20 11:04 PM, Hannes Reinecke wrote: > On 11/26/20 5:49 PM, John Garry wrote: >> On 26/11/2020 16:27, Bart Van Assche wrote: >>> On 11/26/20 7:02 AM, Pradeep P V K wrote: >>>> Observes below crash while accessing (use-after-free) request queue

Re: [PATCH V1] block: Fix use-after-free while iterating over requests

2020-11-26 Thread Bart Van Assche
atic inline void __blk_mq_put_driver_tag(struct blk_mq_hw_ctx *hctx, > struct request *rq) > { > + hctx->tags->rqs[rq->tag] = NULL; > blk_mq_put_tag(hctx->tags, rq->mq_ctx, rq->tag); > rq->tag = BLK_MQ_NO_TAG; Is this perhaps a block driver bug instead of a block layer core bug? If this would be a block layer core bug, it would have been reported before. Bart.

Re: [PATCH RFC v2 1/1] scsi: pm: Leave runtime PM status alone during system resume/thaw/restore

2020-11-21 Thread Bart Van Assche
e into the power management core (drivers/base/power)? Thanks, Bart.

Re: [PATCH RFC v1 1/1] scsi: pm: Leave runtime resume along if block layer PM is enabled

2020-11-17 Thread Bart Van Assche
cessary. Maybe these calls are a leftover from a time when runtime suspended devices were not resumed automatically by the block layer? Anyway, I'm fine with removing these calls. Thanks, Bart.

Re: [block, scsi, ide] 3e3b42fee6: kmsg.sd#:#:#:#:[sdf]Asking_for_cache_data_failed

2020-11-17 Thread Bart Van Assche
Please fix the test bot. The DID_ERROR messages are reported during test block/001 and in the attached dmesg output I found the following: block/001 (stress device hotplugging)[passed] Bart.

Re: [PATCH RFC v1 1/1] scsi: pm: Leave runtime resume along if block layer PM is enabled

2020-11-14 Thread Bart Van Assche
ve won't compile if CONFIG_PM=n. How about adding a function in include/linux/blk-pm.h to check whether or not runtime PM has been enabled? Otherwise this patch looks good to me. Thanks, Bart.

Re: [PATCH] IB/srpt: Fix passing zero to 'PTR_ERR'

2020-11-12 Thread Bart Van Assche
On 11/12/20 9:20 AM, Jason Gunthorpe wrote: I think it should be like this, Bart? diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c index 6017d525084a0c..80f9673956ced2 100644 --- a/drivers/infiniband/ulp/srpt/ib_srpt.c +++ b/drivers/infiniband/ulp/srpt

Re: [PATCH v3 20/32] IB/srpt: docs: add a description for cq_size member

2020-10-28 Thread Bart Van Assche
On 10/27/20 2:51 AM, Mauro Carvalho Chehab wrote: > Add a description for it. It seems like my Reviewed-by tag is missing? See also https://lore.kernel.org/linux-rdma/cb5944e2-bdea-e320-d4d1-2f9bc9539...@acm.org/ Bart.

Re: [PATCH] scsi: ufs: make sure scan sequence for multiple hosts

2020-10-23 Thread Bart Van Assche
dditionally, since this functionality can be implemented easily in user space, I think it should be implemented in user space instead of in the kernel. Even when not using systemd or udev, it is easy to implement a loop that waits until a certain LUN or WWID appears. Bart.

Re: [PATCH] scsi: ufs: make sure scan sequence for multiple hosts

2020-10-21 Thread Bart Van Assche
N]) directly from kernel. Please use udev or systemd instead of adding code in the UFS driver that is not necessary when udev or systemd is used. Thanks, Bart.

Re: [PATCH v3 4/6] IB/srpt: docs: add a description for cq_size member

2020-10-21 Thread Bart Van Assche
Number of CQEs in @cq. > * @zw_cqe: Zero-length write CQE. > * @rcu: RCU head. > * @kref: kref for this channel. Reviewed-by: Bart Van Assche

Re: [PATCH] scsi: ufs: make sure scan sequence for multiple hosts

2020-10-20 Thread Bart Van Assche
y wrong to me. No code should depend on the order in which LUNs are scanned. Please use the soft links created by udev instead of serializing LUN scanning. Thanks, Bart.

Re: [PATCH v6 69/80] IB/srpt: docs: add a description for cq_size member

2020-10-14 Thread Bart Van Assche
Size of the @cq pool. > * @zw_cqe: Zero-length write CQE. > * @rcu: RCU head. > * @kref: kref for this channel. That doesn't seem correct to me. My understanding is that cq_size is the number of CQEs in @cq. @cq is a completion queue and not a CQ pool. Bart.

Re: WARNING in udf_truncate_extents

2020-10-12 Thread Bart Van Assche
/repro.syz?x=10ce0a8b90 > > The issue was bisected to: > > commit 2004bfdef945fe55196db6b9cdf321fbc75bb0de > Author: Bart Van Assche > Date: Tue Mar 10 04:26:21 2020 + > > null_blk: Fix the null_add_dev() error path #syz wrong-bisect

  1   2   3   4   5   6   7   8   9   10   >