Re: [PATCH 4/5] nvme: Fail dead namespace's entered requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2019-03-08 at 11:19 -0700, Keith Busch wrote:
+AD4 On Fri, Mar 08, 2019 at 10:15:27AM -0800, Bart Van Assche wrote:
+AD4 +AD4 On Fri, 2019-03-08 at 10:40 -0700, Keith Busch wrote:
+AD4 +AD4 +AD4 End the entered requests on a quieced queue directly rather than flush
+AD4 +AD4 +AD4 them through the low level driver's queue+AF8-rq().
+AD4 +AD4 +AD4 
+AD4 +AD4 +AD4 Signed-off-by: Keith Busch +ADw-keith.busch+AEA-intel.com+AD4
+AD4 +AD4 +AD4 ---
+AD4 +AD4 +AD4  drivers/nvme/host/core.c +AHw 10 +-+-+-+-+-+-+-+---
+AD4 +AD4 +AD4  1 file changed, 8 insertions(+-), 2 deletions(-)
+AD4 +AD4 +AD4 
+AD4 +AD4 +AD4 diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
+AD4 +AD4 +AD4 index cc5d9a83d5af..7095406bb293 100644
+AD4 +AD4 +AD4 --- a/drivers/nvme/host/core.c
+AD4 +AD4 +AD4 +-+-+- b/drivers/nvme/host/core.c
+AD4 +AD4 +AD4 +AEAAQA -94,6 +-94,13 +AEAAQA static void nvme+AF8-put+AF8-subsystem(struct nvme+AF8-subsystem +ACo-subsys)+ADs
+AD4 +AD4 +AD4  static void nvme+AF8-remove+AF8-invalid+AF8-namespaces(struct nvme+AF8-ctrl +ACo-ctrl,
+AD4 +AD4 +AD4  					   unsigned nsid)+ADs
+AD4 +AD4 +AD4  
+AD4 +AD4 +AD4 +-static bool nvme+AF8-fail+AF8-request(struct blk+AF8-mq+AF8-hw+AF8-ctx +ACo-hctx, struct request +ACo-req,
+AD4 +AD4 +AD4 +-			      void +ACo-data, bool reserved)
+AD4 +AD4 +AD4 +-+AHs
+AD4 +AD4 +AD4 +-	blk+AF8-mq+AF8-end+AF8-request(req, BLK+AF8-STS+AF8-IOERR)+ADs
+AD4 +AD4 +AD4 +-	return true+ADs
+AD4 +AD4 +AD4 +-+AH0
+AD4 +AD4 
+AD4 +AD4 Calling blk+AF8-mq+AF8-end+AF8-request() from outside the .queue+AF8-rq() or .complete()
+AD4 +AD4 callback functions is wrong. Did you perhaps want to call
+AD4 +AD4 blk+AF8-mq+AF8-complete+AF8-request()?
+AD4 
+AD4 This callback can only see requests in MQ+AF8-RQ+AF8-IDLE state, and
+AD4 bkl+AF8-mq+AF8-end+AF8-request() is the correct way to end those that never entered
+AD4 a driver's queue+AF8-rq().

Hi Keith,

What guarantees that nvme+AF8-fail+AF8-request() only sees requests in the idle state?
>From block/blk-mq-tag.c:

/+ACoAKg
 +ACo blk+AF8-mq+AF8-queue+AF8-tag+AF8-busy+AF8-iter - iterate over all requests with a driver tag
 +ACo +AFs ... +AF0
 +ACo-/

Thanks,

Bart.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux