libata: add command iterator helpers
authorJens Axboe <axboe@kernel.dk>
Tue, 19 Jun 2018 16:12:48 +0000 (10:12 -0600)
committerTejun Heo <tj@kernel.org>
Tue, 19 Jun 2018 16:30:27 +0000 (09:30 -0700)
commit6362f0a290023bafd7f991089e81dd9278f154b8
tree428cf7f50aa99f374ad4eedf1e326dbd1fc118f4
parent95ffcf471d05ec7c91993c91dea912f99dccfc26
libata: add command iterator helpers

Now that we have the internal tag as a special (higher) value tag,
it gets a bit tricky to iterate the internal commands as some loops
will exceed ATA_MAX_QUEUE. Add explicit helpers for iterating pending
commands, both inflight and internal.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/libata.h