]> git.baikalelectronics.ru Git - kernel.git/commit
dm io: deal with wandering queue limits when handling REQ_DISCARD and REQ_WRITE_SAME
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 27 Feb 2015 18:44:38 +0000 (10:44 -0800)
committerMike Snitzer <snitzer@redhat.com>
Fri, 27 Feb 2015 19:53:32 +0000 (14:53 -0500)
commitbe621c8aedb9385863ed95a1125e40811475a9ee
treef47c949fa4386f30b9b66e5f7d9acc42c9125b44
parente557b1b97b9b2b78d3a8e930cf13631c69ecde61
dm io: deal with wandering queue limits when handling REQ_DISCARD and REQ_WRITE_SAME

Since it's possible for the discard and write same queue limits to
change while the upper level command is being sliced and diced, fix up
both of them (a) to reject IO if the special command is unsupported at
the start of the function and (b) read the limits once and let the
commands error out on their own if the status happens to change.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
drivers/md/dm-io.c