xfs: Replace AIL list with a context list
From: Carlos Maiolino <cem@kernel.org>
This extends the life of a checkpoint context to beyond the CIL.
Before:
Once all items are moved to the AIL, the current active contex
is freed.
Now:
Once the log vectors are freed, instead of moving the items to the AIL,
the items are re-added to the context itself (ail_items), and the
context is then added to the AIL.
Essentially transforming the AIL in a list of checkpoint contexts. Once
all items are done, and the context is empty and not in the committing
list anymore, it can be freed.
This is mostly an intermediate patch to make bite-sized chunks. This
patch has no intention on changing the locking logic but still leverage
the ail_lock to synchronize everything.
Once it is working, improving the lock granularity will (I hope) be
simpler to improve and to review.
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
6 files changed