]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Thu, 9 Apr 2015 12:14:12 +0000 (14:14 +0200)
commit4d6657eb5a935217fa557fc7a346d24d38adf098
treec4294b4d6b361a4ef47da7fb7085c10bb9f2f864
parentc83510f1ec1eb63d944fbe4113d72f7c6f2b6fe5
dm io: deal with wandering queue limits when handling REQ_DISCARD and REQ_WRITE_SAME

commit e5db29806b99ce2b2640d2e4d4fcb983cea115c5 upstream.

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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/md/dm-io.c