This is a note to let you know that I've just added the patch titled
scsi: qla2xxx: Fix gpnid error processing
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
scsi-qla2xxx-fix-gpnid-error-processing.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From 22e786ea47f8795c561e1a01b6a66bb2cae2fc20 Mon Sep 17 00:00:00 2001
From: Quinn Tran <quinn.tran(a)cavium.com>
Date: Mon, 4 Dec 2017 14:44:57 -0800
Subject: scsi: qla2xxx: Fix gpnid error processing
From: Quinn Tran <quinn.tran(a)cavium.com>
commit 22e786ea47f8795c561e1a01b6a66bb2cae2fc20 upstream.
Stop GPNID command from advancing if command has failed.
Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery")
Cc: <stable(a)vger.kernel.org> # 4.10+
Signed-off-by: Quinn Tran <quinn.tran(a)cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani(a)cavium.com>
Reviewed-by: Hannes Reinecke <hare(a)suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/scsi/qla2xxx/qla_gs.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -3211,6 +3211,11 @@ static void qla2x00_async_gpnid_sp_done(
sp->name, res, ct_req->req.port_id.port_id,
ct_rsp->rsp.gpn_id.port_name);
+ if (res) {
+ sp->free(sp);
+ return;
+ }
+
memset(&ea, 0, sizeof(ea));
memcpy(ea.port_name, ct_rsp->rsp.gpn_id.port_name, WWN_SIZE);
ea.sp = sp;
Patches currently in stable-queue which might be from quinn.tran(a)cavium.com are
queue-4.15/scsi-qla2xxx-retry-switch-command-on-time-out.patch
queue-4.15/scsi-qla2xxx-relogin-to-target-port-on-a-cable-swap.patch
queue-4.15/scsi-qla2xxx-fix-abort-command-deadlock-due-to-spinlock.patch
queue-4.15/scsi-qla2xxx-fix-re-login-for-nport-handle-in-use.patch
queue-4.15/scsi-qla2xxx-fix-login-state-machine-stuck-at-gpdb.patch
queue-4.15/scsi-qla2xxx-fix-system-crash-for-notify-ack-timeout-handling.patch
queue-4.15/scsi-qla2xxx-replace-fcport-alloc-with-qla2x00_alloc_fcport.patch
queue-4.15/scsi-qla2xxx-clear-loop-id-after-delete.patch
queue-4.15/scsi-qla2xxx-fix-relogin-being-triggered-too-fast.patch
queue-4.15/scsi-qla2xxx-skip-irq-affinity-for-target-qpairs.patch
queue-4.15/scsi-qla2xxx-fix-scan-state-field-for-fcport.patch
queue-4.15/scsi-qla2xxx-fix-prli-state-check.patch
queue-4.15/scsi-qla2xxx-fix-system-crash-in-qlt_plogi_ack_unref.patch
queue-4.15/scsi-qla2xxx-serialize-gpnid-for-multiple-rscn.patch
queue-4.15/scsi-qla2xxx-fix-gpnid-error-processing.patch
queue-4.15/scsi-qla2xxx-move-session-delete-to-driver-work-queue.patch
This is a note to let you know that I've just added the patch titled
scsi: qla2xxx: Clear loop id after delete
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
scsi-qla2xxx-clear-loop-id-after-delete.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From ba743f9148e951abe1c94f89c174ec8e44fb145b Mon Sep 17 00:00:00 2001
From: Quinn Tran <quinn.tran(a)cavium.com>
Date: Mon, 4 Dec 2017 14:45:12 -0800
Subject: scsi: qla2xxx: Clear loop id after delete
From: Quinn Tran <quinn.tran(a)cavium.com>
commit ba743f9148e951abe1c94f89c174ec8e44fb145b upstream.
Clear loop id after delete to prevent session invalidation of stale
session.
Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery")
Cc: <stable(a)vger.kernel.org> # 4.10+
Signed-off-by: Quinn Tran <quinn.tran(a)cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani(a)cavium.com>
Reviewed-by: Hannes Reinecke <hare(a)suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/scsi/qla2xxx/qla_target.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -985,7 +985,7 @@ static void qlt_free_session_done(struct
qlt_send_first_logo(vha, &logo);
}
- if (sess->logout_on_delete) {
+ if (sess->logout_on_delete && sess->loop_id != FC_NO_LOOP_ID) {
int rc;
rc = qla2x00_post_async_logout_work(vha, sess, NULL);
@@ -1044,8 +1044,7 @@ static void qlt_free_session_done(struct
sess->login_succ = 0;
}
- if (sess->chip_reset != ha->base_qpair->chip_reset)
- qla2x00_clear_loop_id(sess);
+ qla2x00_clear_loop_id(sess);
if (sess->conflict) {
sess->conflict->login_pause = 0;
@@ -4599,9 +4598,9 @@ qlt_find_sess_invalidate_other(scsi_qla_
"Invalidating sess %p loop_id %d wwn %llx.\n",
other_sess, other_sess->loop_id, other_wwn);
-
other_sess->keep_nport_handle = 1;
- *conflict_sess = other_sess;
+ if (other_sess->disc_state != DSC_DELETED)
+ *conflict_sess = other_sess;
qlt_schedule_sess_for_deletion(other_sess,
true);
}
Patches currently in stable-queue which might be from quinn.tran(a)cavium.com are
queue-4.15/scsi-qla2xxx-retry-switch-command-on-time-out.patch
queue-4.15/scsi-qla2xxx-relogin-to-target-port-on-a-cable-swap.patch
queue-4.15/scsi-qla2xxx-fix-abort-command-deadlock-due-to-spinlock.patch
queue-4.15/scsi-qla2xxx-fix-re-login-for-nport-handle-in-use.patch
queue-4.15/scsi-qla2xxx-fix-login-state-machine-stuck-at-gpdb.patch
queue-4.15/scsi-qla2xxx-fix-system-crash-for-notify-ack-timeout-handling.patch
queue-4.15/scsi-qla2xxx-replace-fcport-alloc-with-qla2x00_alloc_fcport.patch
queue-4.15/scsi-qla2xxx-clear-loop-id-after-delete.patch
queue-4.15/scsi-qla2xxx-fix-relogin-being-triggered-too-fast.patch
queue-4.15/scsi-qla2xxx-skip-irq-affinity-for-target-qpairs.patch
queue-4.15/scsi-qla2xxx-fix-scan-state-field-for-fcport.patch
queue-4.15/scsi-qla2xxx-fix-prli-state-check.patch
queue-4.15/scsi-qla2xxx-fix-system-crash-in-qlt_plogi_ack_unref.patch
queue-4.15/scsi-qla2xxx-serialize-gpnid-for-multiple-rscn.patch
queue-4.15/scsi-qla2xxx-fix-gpnid-error-processing.patch
queue-4.15/scsi-qla2xxx-move-session-delete-to-driver-work-queue.patch
This is a note to let you know that I've just added the patch titled
scsi: qla2xxx: Fix abort command deadlock due to spinlock
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
scsi-qla2xxx-fix-abort-command-deadlock-due-to-spinlock.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From b0dcce746b32ac573343ad39cb3dc485030de95e Mon Sep 17 00:00:00 2001
From: Quinn Tran <quinn.tran(a)cavium.com>
Date: Mon, 4 Dec 2017 14:45:09 -0800
Subject: scsi: qla2xxx: Fix abort command deadlock due to spinlock
From: Quinn Tran <quinn.tran(a)cavium.com>
commit b0dcce746b32ac573343ad39cb3dc485030de95e upstream.
Original code acquires hardware_lock to add Abort IOCB onto driver
request queue for processing. However, abort_command() will also acquire
hardware lock to look up sp pointer before issuing abort IOCB command
resulting into a deadlock. This patch safely removes the possible
deadlock scenario by removing extra spinlock.
Fixes: 6eb54715b54bb ("qla2xxx: Added interface to send explicit LOGO.")
Cc: <stable(a)vger.kernel.org> # 4.10+
Signed-off-by: Quinn Tran <quinn.tran(a)cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani(a)cavium.com>
Reviewed-by: Hannes Reinecke <hare(a)suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/scsi/qla2xxx/qla_iocb.c | 3 ---
1 file changed, 3 deletions(-)
--- a/drivers/scsi/qla2xxx/qla_iocb.c
+++ b/drivers/scsi/qla2xxx/qla_iocb.c
@@ -2394,7 +2394,6 @@ qla2x00_els_dcmd_iocb_timeout(void *data
struct scsi_qla_host *vha = sp->vha;
struct qla_hw_data *ha = vha->hw;
struct srb_iocb *lio = &sp->u.iocb_cmd;
- unsigned long flags = 0;
ql_dbg(ql_dbg_io, vha, 0x3069,
"%s Timeout, hdl=%x, portid=%02x%02x%02x\n",
@@ -2402,7 +2401,6 @@ qla2x00_els_dcmd_iocb_timeout(void *data
fcport->d_id.b.al_pa);
/* Abort the exchange */
- spin_lock_irqsave(&ha->hardware_lock, flags);
if (ha->isp_ops->abort_command(sp)) {
ql_dbg(ql_dbg_io, vha, 0x3070,
"mbx abort_command failed.\n");
@@ -2410,7 +2408,6 @@ qla2x00_els_dcmd_iocb_timeout(void *data
ql_dbg(ql_dbg_io, vha, 0x3071,
"mbx abort_command success.\n");
}
- spin_unlock_irqrestore(&ha->hardware_lock, flags);
complete(&lio->u.els_logo.comp);
}
Patches currently in stable-queue which might be from quinn.tran(a)cavium.com are
queue-4.15/scsi-qla2xxx-retry-switch-command-on-time-out.patch
queue-4.15/scsi-qla2xxx-relogin-to-target-port-on-a-cable-swap.patch
queue-4.15/scsi-qla2xxx-fix-abort-command-deadlock-due-to-spinlock.patch
queue-4.15/scsi-qla2xxx-fix-re-login-for-nport-handle-in-use.patch
queue-4.15/scsi-qla2xxx-fix-login-state-machine-stuck-at-gpdb.patch
queue-4.15/scsi-qla2xxx-fix-system-crash-for-notify-ack-timeout-handling.patch
queue-4.15/scsi-qla2xxx-replace-fcport-alloc-with-qla2x00_alloc_fcport.patch
queue-4.15/scsi-qla2xxx-clear-loop-id-after-delete.patch
queue-4.15/scsi-qla2xxx-fix-relogin-being-triggered-too-fast.patch
queue-4.15/scsi-qla2xxx-skip-irq-affinity-for-target-qpairs.patch
queue-4.15/scsi-qla2xxx-fix-scan-state-field-for-fcport.patch
queue-4.15/scsi-qla2xxx-fix-prli-state-check.patch
queue-4.15/scsi-qla2xxx-fix-system-crash-in-qlt_plogi_ack_unref.patch
queue-4.15/scsi-qla2xxx-serialize-gpnid-for-multiple-rscn.patch
queue-4.15/scsi-qla2xxx-fix-gpnid-error-processing.patch
queue-4.15/scsi-qla2xxx-move-session-delete-to-driver-work-queue.patch
This is a note to let you know that I've just added the patch titled
scsi: qla2xxx: Defer processing of GS IOCB calls
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
scsi-qla2xxx-defer-processing-of-gs-iocb-calls.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From 5d3300a9b8b122b4743aed5a178bf12c87e2b8c9 Mon Sep 17 00:00:00 2001
From: Giridhar Malavali <giridhar.malavali(a)cavium.com>
Date: Mon, 4 Dec 2017 14:45:13 -0800
Subject: scsi: qla2xxx: Defer processing of GS IOCB calls
From: Giridhar Malavali <giridhar.malavali(a)cavium.com>
commit 5d3300a9b8b122b4743aed5a178bf12c87e2b8c9 upstream.
This patch defers processing of GS IOCB calls from interrupt context to
avoid hardware spinlock recursion.
Following stack trace is seen
? mod_timer+0x193/0x330
? ql_dbg+0xa7/0xf0 [qla2xxx]
_raw_spin_lock_irqsave+0x31/0x40
qla2x00_start_sp+0x3b/0x250 [qla2xxx]
qla24xx_async_gnl+0x1d3/0x240 [qla2xxx]
qla24xx_fcport_handle_login+0x285/0x290 [qla2xxx]
? vprintk_func+0x20/0x50
Fixes: 726b85487067d ("qla2xxx: Add framework for async fabric discovery")
Cc: <stable(a)vger.kernel.org> # 4.10+
Signed-off-by: Giridhar Malavali <giridhar.malavali(a)cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani(a)cavium.com>
Reviewed-by: Hannes Reinecke <hare(a)suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/scsi/qla2xxx/qla_init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -975,7 +975,7 @@ int qla24xx_fcport_handle_login(struct s
ql_dbg(ql_dbg_disc, vha, 0x20bd,
"%s %d %8phC post gnl\n",
__func__, __LINE__, fcport->port_name);
- qla24xx_async_gnl(vha, fcport);
+ qla24xx_post_gnl_work(vha, fcport);
} else {
ql_dbg(ql_dbg_disc, vha, 0x20bf,
"%s %d %8phC post login\n",
@@ -1143,7 +1143,7 @@ void qla24xx_handle_relogin_event(scsi_q
ql_dbg(ql_dbg_disc, vha, 0x20e9, "%s %d %8phC post gidpn\n",
__func__, __LINE__, fcport->port_name);
- qla24xx_async_gidpn(vha, fcport);
+ qla24xx_post_gidpn_work(vha, fcport);
return;
}
Patches currently in stable-queue which might be from giridhar.malavali(a)cavium.com are
queue-4.15/scsi-qla2xxx-defer-processing-of-gs-iocb-calls.patch
queue-4.15/scsi-qla2xxx-remove-aborting-els-iocb-call-issued-as-part-of-timeout.patch
queue-4.15/scsi-qla2xxx-fix-system-crash-in-qlt_plogi_ack_unref.patch
This is a note to let you know that I've just added the patch titled
NFS: Fix unstable write completion
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
nfs-fix-unstable-write-completion.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From c4f24df942a181699c5bab01b8e5e82b925f77f3 Mon Sep 17 00:00:00 2001
From: Trond Myklebust <trond.myklebust(a)primarydata.com>
Date: Wed, 7 Mar 2018 15:22:31 -0500
Subject: NFS: Fix unstable write completion
From: Trond Myklebust <trond.myklebust(a)primarydata.com>
commit c4f24df942a181699c5bab01b8e5e82b925f77f3 upstream.
We do want to respect the FLUSH_SYNC argument to nfs_commit_inode() to
ensure that all outstanding COMMIT requests to the inode in question are
complete. Currently we may exit early from both nfs_commit_inode() and
nfs_write_inode() even if there are COMMIT requests in flight, or unstable
writes on the commit list.
In order to get the right semantics w.r.t. sync_inode(), we don't need
to have nfs_commit_inode() reset the inode dirty flags when called from
nfs_wb_page() and/or nfs_wb_all(). We just need to ensure that
nfs_write_inode() leaves them in the right state if there are outstanding
commits, or stable pages.
Reported-by: Scott Mayhew <smayhew(a)redhat.com>
Fixes: dc4fd9ab01ab ("nfs: don't wait on commit in nfs_commit_inode()...")
Cc: stable(a)vger.kernel.org # v4.14+
Signed-off-by: Trond Myklebust <trond.myklebust(a)primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
fs/nfs/write.c | 83 +++++++++++++++++++++++++++++----------------------------
1 file changed, 43 insertions(+), 40 deletions(-)
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1878,40 +1878,43 @@ int nfs_generic_commit_list(struct inode
return status;
}
-int nfs_commit_inode(struct inode *inode, int how)
+static int __nfs_commit_inode(struct inode *inode, int how,
+ struct writeback_control *wbc)
{
LIST_HEAD(head);
struct nfs_commit_info cinfo;
int may_wait = how & FLUSH_SYNC;
- int error = 0;
- int res;
+ int ret, nscan;
nfs_init_cinfo_from_inode(&cinfo, inode);
nfs_commit_begin(cinfo.mds);
- res = nfs_scan_commit(inode, &head, &cinfo);
- if (res)
- error = nfs_generic_commit_list(inode, &head, how, &cinfo);
+ for (;;) {
+ ret = nscan = nfs_scan_commit(inode, &head, &cinfo);
+ if (ret <= 0)
+ break;
+ ret = nfs_generic_commit_list(inode, &head, how, &cinfo);
+ if (ret < 0)
+ break;
+ ret = 0;
+ if (wbc && wbc->sync_mode == WB_SYNC_NONE) {
+ if (nscan < wbc->nr_to_write)
+ wbc->nr_to_write -= nscan;
+ else
+ wbc->nr_to_write = 0;
+ }
+ if (nscan < INT_MAX)
+ break;
+ cond_resched();
+ }
nfs_commit_end(cinfo.mds);
- if (res == 0)
- return res;
- if (error < 0)
- goto out_error;
- if (!may_wait)
- goto out_mark_dirty;
- error = wait_on_commit(cinfo.mds);
- if (error < 0)
- return error;
- return res;
-out_error:
- res = error;
- /* Note: If we exit without ensuring that the commit is complete,
- * we must mark the inode as dirty. Otherwise, future calls to
- * sync_inode() with the WB_SYNC_ALL flag set will fail to ensure
- * that the data is on the disk.
- */
-out_mark_dirty:
- __mark_inode_dirty(inode, I_DIRTY_DATASYNC);
- return res;
+ if (ret || !may_wait)
+ return ret;
+ return wait_on_commit(cinfo.mds);
+}
+
+int nfs_commit_inode(struct inode *inode, int how)
+{
+ return __nfs_commit_inode(inode, how, NULL);
}
EXPORT_SYMBOL_GPL(nfs_commit_inode);
@@ -1921,11 +1924,11 @@ int nfs_write_inode(struct inode *inode,
int flags = FLUSH_SYNC;
int ret = 0;
- /* no commits means nothing needs to be done */
- if (!atomic_long_read(&nfsi->commit_info.ncommit))
- return ret;
-
if (wbc->sync_mode == WB_SYNC_NONE) {
+ /* no commits means nothing needs to be done */
+ if (!atomic_long_read(&nfsi->commit_info.ncommit))
+ goto check_requests_outstanding;
+
/* Don't commit yet if this is a non-blocking flush and there
* are a lot of outstanding writes for this mapping.
*/
@@ -1936,16 +1939,16 @@ int nfs_write_inode(struct inode *inode,
flags = 0;
}
- ret = nfs_commit_inode(inode, flags);
- if (ret >= 0) {
- if (wbc->sync_mode == WB_SYNC_NONE) {
- if (ret < wbc->nr_to_write)
- wbc->nr_to_write -= ret;
- else
- wbc->nr_to_write = 0;
- }
- return 0;
- }
+ ret = __nfs_commit_inode(inode, flags, wbc);
+ if (!ret) {
+ if (flags & FLUSH_SYNC)
+ return 0;
+ } else if (atomic_long_read(&nfsi->commit_info.ncommit))
+ goto out_mark_dirty;
+
+check_requests_outstanding:
+ if (!atomic_read(&nfsi->commit_info.rpcs_out))
+ return ret;
out_mark_dirty:
__mark_inode_dirty(inode, I_DIRTY_DATASYNC);
return ret;
Patches currently in stable-queue which might be from trond.myklebust(a)primarydata.com are
queue-4.15/nfs-fix-unstable-write-completion.patch
queue-4.15/nfs-fix-an-incorrect-type-in-struct-nfs_direct_req.patch
queue-4.15/pnfs-prevent-the-layout-header-refcount-going-to-zero-in-pnfs_roc.patch
This is a note to let you know that I've just added the patch titled
pNFS: Prevent the layout header refcount going to zero in pnfs_roc()
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
pnfs-prevent-the-layout-header-refcount-going-to-zero-in-pnfs_roc.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From 9c6376ebddad585da4238532dd6d90ae23ffee67 Mon Sep 17 00:00:00 2001
From: Trond Myklebust <trond.myklebust(a)primarydata.com>
Date: Wed, 7 Mar 2018 14:49:06 -0500
Subject: pNFS: Prevent the layout header refcount going to zero in pnfs_roc()
From: Trond Myklebust <trond.myklebust(a)primarydata.com>
commit 9c6376ebddad585da4238532dd6d90ae23ffee67 upstream.
Ensure that we hold a reference to the layout header when processing
the pNFS return-on-close so that the refcount value does not inadvertently
go to zero.
Reported-by: Tigran Mkrtchyan <tigran.mkrtchyan(a)desy.de>
Signed-off-by: Trond Myklebust <trond.myklebust(a)primarydata.com>
Cc: stable(a)vger.kernel.org # v4.10+
Tested-by: Tigran Mkrtchyan <tigran.mkrtchyan(a)desy.de>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
fs/nfs/pnfs.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -292,8 +292,11 @@ pnfs_detach_layout_hdr(struct pnfs_layou
void
pnfs_put_layout_hdr(struct pnfs_layout_hdr *lo)
{
- struct inode *inode = lo->plh_inode;
+ struct inode *inode;
+ if (!lo)
+ return;
+ inode = lo->plh_inode;
pnfs_layoutreturn_before_put_layout_hdr(lo);
if (refcount_dec_and_lock(&lo->plh_refcount, &inode->i_lock)) {
@@ -1241,10 +1244,12 @@ retry:
spin_lock(&ino->i_lock);
lo = nfsi->layout;
if (!lo || !pnfs_layout_is_valid(lo) ||
- test_bit(NFS_LAYOUT_BULK_RECALL, &lo->plh_flags))
+ test_bit(NFS_LAYOUT_BULK_RECALL, &lo->plh_flags)) {
+ lo = NULL;
goto out_noroc;
+ }
+ pnfs_get_layout_hdr(lo);
if (test_bit(NFS_LAYOUT_RETURN_LOCK, &lo->plh_flags)) {
- pnfs_get_layout_hdr(lo);
spin_unlock(&ino->i_lock);
wait_on_bit(&lo->plh_flags, NFS_LAYOUT_RETURN,
TASK_UNINTERRUPTIBLE);
@@ -1312,10 +1317,12 @@ out_noroc:
struct pnfs_layoutdriver_type *ld = NFS_SERVER(ino)->pnfs_curr_ld;
if (ld->prepare_layoutreturn)
ld->prepare_layoutreturn(args);
+ pnfs_put_layout_hdr(lo);
return true;
}
if (layoutreturn)
pnfs_send_layoutreturn(lo, &stateid, iomode, true);
+ pnfs_put_layout_hdr(lo);
return false;
}
Patches currently in stable-queue which might be from trond.myklebust(a)primarydata.com are
queue-4.15/nfs-fix-unstable-write-completion.patch
queue-4.15/nfs-fix-an-incorrect-type-in-struct-nfs_direct_req.patch
queue-4.15/pnfs-prevent-the-layout-header-refcount-going-to-zero-in-pnfs_roc.patch
This is a note to let you know that I've just added the patch titled
NFS: Fix an incorrect type in struct nfs_direct_req
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
nfs-fix-an-incorrect-type-in-struct-nfs_direct_req.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From d9ee65539d3eabd9ade46cca1780e3309ad0f907 Mon Sep 17 00:00:00 2001
From: Trond Myklebust <trond.myklebust(a)primarydata.com>
Date: Tue, 6 Mar 2018 12:47:08 -0500
Subject: NFS: Fix an incorrect type in struct nfs_direct_req
From: Trond Myklebust <trond.myklebust(a)primarydata.com>
commit d9ee65539d3eabd9ade46cca1780e3309ad0f907 upstream.
The start offset needs to be of type loff_t.
Fixed: 5fadeb47dcc5c ("nfs: count DIO good bytes correctly with mirroring")
Cc: stable(a)vger.kernel.org # v4.0+
Signed-off-by: Trond Myklebust <trond.myklebust(a)primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
fs/nfs/direct.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -86,10 +86,10 @@ struct nfs_direct_req {
struct nfs_direct_mirror mirrors[NFS_PAGEIO_DESCRIPTOR_MIRROR_MAX];
int mirror_count;
+ loff_t io_start; /* Start offset for I/O */
ssize_t count, /* bytes actually processed */
max_count, /* max expected count */
bytes_left, /* bytes left to be sent */
- io_start, /* start of IO */
error; /* any reported error */
struct completion completion; /* wait for i/o completion */
Patches currently in stable-queue which might be from trond.myklebust(a)primarydata.com are
queue-4.15/nfs-fix-unstable-write-completion.patch
queue-4.15/nfs-fix-an-incorrect-type-in-struct-nfs_direct_req.patch
queue-4.15/pnfs-prevent-the-layout-header-refcount-going-to-zero-in-pnfs_roc.patch
This is a note to let you know that I've just added the patch titled
scsi: qla2xxx: Skip IRQ affinity for Target QPairs
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=sum…
The filename of the patch is:
scsi-qla2xxx-skip-irq-affinity-for-target-qpairs.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable(a)vger.kernel.org> know about it.
>From d68b850e1bfb9afb24b888a946165a186a710195 Mon Sep 17 00:00:00 2001
From: Quinn Tran <quinn.tran(a)cavium.com>
Date: Mon, 4 Dec 2017 14:44:59 -0800
Subject: scsi: qla2xxx: Skip IRQ affinity for Target QPairs
From: Quinn Tran <quinn.tran(a)cavium.com>
commit d68b850e1bfb9afb24b888a946165a186a710195 upstream.
Fix co-existence between Block MQ and Target Mode. Block MQ and
initiator mode requires midlayer queue mapping to check for IRQ to be
affinitized. For target mode, it's not the case.
Fixes: 09620eeb62c41 ("scsi: qla2xxx: Add debug knob for user control workload")
Cc: <stable(a)vger.kernel.org> # 4.12+
Signed-off-by: Quinn Tran <quinn.tran(a)cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani(a)cavium.com>
Reviewed-by: Hannes Reinecke <hare(a)suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen(a)oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
drivers/scsi/qla2xxx/qla_os.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -6592,9 +6592,14 @@ qla83xx_disable_laser(scsi_qla_host_t *v
static int qla2xxx_map_queues(struct Scsi_Host *shost)
{
+ int rc;
scsi_qla_host_t *vha = (scsi_qla_host_t *)shost->hostdata;
- return blk_mq_pci_map_queues(&shost->tag_set, vha->hw->pdev);
+ if (USER_CTRL_IRQ(vha->hw))
+ rc = blk_mq_map_queues(&shost->tag_set);
+ else
+ rc = blk_mq_pci_map_queues(&shost->tag_set, vha->hw->pdev);
+ return rc;
}
static const struct pci_error_handlers qla2xxx_err_handler = {
Patches currently in stable-queue which might be from quinn.tran(a)cavium.com are
queue-4.14/scsi-qla2xxx-retry-switch-command-on-time-out.patch
queue-4.14/scsi-qla2xxx-fix-abort-command-deadlock-due-to-spinlock.patch
queue-4.14/scsi-qla2xxx-fix-re-login-for-nport-handle-in-use.patch
queue-4.14/scsi-qla2xxx-fix-login-state-machine-stuck-at-gpdb.patch
queue-4.14/scsi-qla2xxx-fix-system-crash-for-notify-ack-timeout-handling.patch
queue-4.14/scsi-qla2xxx-replace-fcport-alloc-with-qla2x00_alloc_fcport.patch
queue-4.14/scsi-qla2xxx-clear-loop-id-after-delete.patch
queue-4.14/scsi-qla2xxx-fix-relogin-being-triggered-too-fast.patch
queue-4.14/scsi-qla2xxx-skip-irq-affinity-for-target-qpairs.patch
queue-4.14/scsi-qla2xxx-fix-scan-state-field-for-fcport.patch
queue-4.14/scsi-qla2xxx-fix-prli-state-check.patch
queue-4.14/scsi-qla2xxx-fix-system-crash-in-qlt_plogi_ack_unref.patch
queue-4.14/scsi-qla2xxx-serialize-gpnid-for-multiple-rscn.patch
queue-4.14/scsi-qla2xxx-fix-gpnid-error-processing.patch
queue-4.14/scsi-qla2xxx-move-session-delete-to-driver-work-queue.patch