All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Damien Le Moal <damien.lemoal@wdc.com>
Cc: linux-scsi@vger.kernel.org,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Bart Van Assche <Bart.VanAssche@wdc.com>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH V2] sd_zbc: Write unlock zone from sd_uninit_cmnd()
Date: Thu, 10 Aug 2017 20:36:55 -0400	[thread overview]
Message-ID: <yq1zib70wk8.fsf@oracle.com> (raw)
In-Reply-To: <20170809030022.7862-1-damien.lemoal@wdc.com> (Damien Le Moal's message of "Wed, 9 Aug 2017 12:00:22 +0900")


Damien,

> Releasing a zone write lock only when the write commnand that acquired
> the lock completes can cause deadlocks due to potential command
> reordering if the lock owning request is requeued and not
> executed. This problem exists only with the scsi-mq path as, unlike
> the legacy path, requests are moved out of the dispatch queue before
> being prepared and so before locking a zone for a write command.
>
> Since sd_uninit_cmnd() is now always called when a request is
> requeued, call sd_zbc_write_unlock_zone() from that function for write
> requests that acquired a zone lock instead of from
> sd_done(). Acquisition of a zone lock by a write command is indicated
> using the new command flag SCMD_ZONE_WRITE_LOCK.

Applied to 4.13/scsi-fixes. Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

      reply	other threads:[~2017-08-11  0:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-09  3:00 [PATCH V2] sd_zbc: Write unlock zone from sd_uninit_cmnd() Damien Le Moal
2017-08-11  0:36 ` Martin K. Petersen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yq1zib70wk8.fsf@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=Bart.VanAssche@wdc.com \
    --cc=damien.lemoal@wdc.com \
    --cc=hch@lst.de \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.