|
@@ -86,6 +86,18 @@ void xfs_trans_ail_update_bulk(struct xfs_ail *ailp,
|
|
|
struct xfs_ail_cursor *cur,
|
|
|
struct xfs_log_item **log_items, int nr_items,
|
|
|
xfs_lsn_t lsn) __releases(ailp->xa_lock);
|
|
|
+/*
|
|
|
+ * Return a pointer to the first item in the AIL. If the AIL is empty, then
|
|
|
+ * return NULL.
|
|
|
+ */
|
|
|
+static inline struct xfs_log_item *
|
|
|
+xfs_ail_min(
|
|
|
+ struct xfs_ail *ailp)
|
|
|
+{
|
|
|
+ return list_first_entry_or_null(&ailp->xa_ail, struct xfs_log_item,
|
|
|
+ li_ail);
|
|
|
+}
|
|
|
+
|
|
|
static inline void
|
|
|
xfs_trans_ail_update(
|
|
|
struct xfs_ail *ailp,
|