libata: add command iterator helpers
authorJens Axboe <axboe@kernel.dk>
Tue, 19 Jun 2018 15:51:12 +0000 (09:51 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 19 Jun 2018 16:05:14 +0000 (10:05 -0600)
commita582206c071802060c39b5afec0ef3e42fb526df
treee8d3641365fe1d74d716ff527ab0eabe187b65ab
parentba4dbdedd3edc2798659bcd8b1a184ea8bdd04dc
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>
include/linux/libata.h