xfs_trans_ail.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. /*
  2. * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
  3. * All Rights Reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it would be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write the Free Software Foundation,
  16. * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #include "xfs.h"
  19. #include "xfs_fs.h"
  20. #include "xfs_types.h"
  21. #include "xfs_log.h"
  22. #include "xfs_inum.h"
  23. #include "xfs_trans.h"
  24. #include "xfs_sb.h"
  25. #include "xfs_ag.h"
  26. #include "xfs_dmapi.h"
  27. #include "xfs_mount.h"
  28. #include "xfs_trans_priv.h"
  29. #include "xfs_error.h"
  30. STATIC void xfs_ail_insert(xfs_ail_t *, xfs_log_item_t *);
  31. STATIC xfs_log_item_t * xfs_ail_delete(xfs_ail_t *, xfs_log_item_t *);
  32. STATIC xfs_log_item_t * xfs_ail_min(xfs_ail_t *);
  33. STATIC xfs_log_item_t * xfs_ail_next(xfs_ail_t *, xfs_log_item_t *);
  34. #ifdef DEBUG
  35. STATIC void xfs_ail_check(xfs_ail_t *, xfs_log_item_t *);
  36. #else
  37. #define xfs_ail_check(a,l)
  38. #endif /* DEBUG */
  39. /*
  40. * This is called by the log manager code to determine the LSN
  41. * of the tail of the log. This is exactly the LSN of the first
  42. * item in the AIL. If the AIL is empty, then this function
  43. * returns 0.
  44. *
  45. * We need the AIL lock in order to get a coherent read of the
  46. * lsn of the last item in the AIL.
  47. */
  48. xfs_lsn_t
  49. xfs_trans_tail_ail(
  50. xfs_mount_t *mp)
  51. {
  52. xfs_lsn_t lsn;
  53. xfs_log_item_t *lip;
  54. spin_lock(&mp->m_ail_lock);
  55. lip = xfs_ail_min(&mp->m_ail);
  56. if (lip == NULL) {
  57. lsn = (xfs_lsn_t)0;
  58. } else {
  59. lsn = lip->li_lsn;
  60. }
  61. spin_unlock(&mp->m_ail_lock);
  62. return lsn;
  63. }
  64. /*
  65. * xfs_trans_push_ail
  66. *
  67. * This routine is called to move the tail of the AIL forward. It does this by
  68. * trying to flush items in the AIL whose lsns are below the given
  69. * threshold_lsn.
  70. *
  71. * the push is run asynchronously in a separate thread, so we return the tail
  72. * of the log right now instead of the tail after the push. This means we will
  73. * either continue right away, or we will sleep waiting on the async thread to
  74. * do it's work.
  75. *
  76. * We do this unlocked - we only need to know whether there is anything in the
  77. * AIL at the time we are called. We don't need to access the contents of
  78. * any of the objects, so the lock is not needed.
  79. */
  80. void
  81. xfs_trans_push_ail(
  82. xfs_mount_t *mp,
  83. xfs_lsn_t threshold_lsn)
  84. {
  85. xfs_log_item_t *lip;
  86. lip = xfs_ail_min(&mp->m_ail);
  87. if (lip && !XFS_FORCED_SHUTDOWN(mp)) {
  88. if (XFS_LSN_CMP(threshold_lsn, mp->m_ail.xa_target) > 0)
  89. xfsaild_wakeup(mp, threshold_lsn);
  90. }
  91. }
  92. /*
  93. * Return the item in the AIL with the current lsn.
  94. * Return the current tree generation number for use
  95. * in calls to xfs_trans_next_ail().
  96. */
  97. STATIC xfs_log_item_t *
  98. xfs_trans_first_push_ail(
  99. xfs_mount_t *mp,
  100. int *gen,
  101. xfs_lsn_t lsn)
  102. {
  103. xfs_log_item_t *lip;
  104. lip = xfs_ail_min(&mp->m_ail);
  105. *gen = (int)mp->m_ail.xa_gen;
  106. if (lsn == 0)
  107. return lip;
  108. list_for_each_entry(lip, &mp->m_ail.xa_ail, li_ail) {
  109. if (XFS_LSN_CMP(lip->li_lsn, lsn) >= 0)
  110. return lip;
  111. }
  112. return NULL;
  113. }
  114. /*
  115. * Function that does the work of pushing on the AIL
  116. */
  117. long
  118. xfsaild_push(
  119. xfs_mount_t *mp,
  120. xfs_lsn_t *last_lsn)
  121. {
  122. long tout = 1000; /* milliseconds */
  123. xfs_lsn_t last_pushed_lsn = *last_lsn;
  124. xfs_lsn_t target = mp->m_ail.xa_target;
  125. xfs_lsn_t lsn;
  126. xfs_log_item_t *lip;
  127. int gen;
  128. int restarts;
  129. int flush_log, count, stuck;
  130. #define XFS_TRANS_PUSH_AIL_RESTARTS 10
  131. spin_lock(&mp->m_ail_lock);
  132. lip = xfs_trans_first_push_ail(mp, &gen, *last_lsn);
  133. if (!lip || XFS_FORCED_SHUTDOWN(mp)) {
  134. /*
  135. * AIL is empty or our push has reached the end.
  136. */
  137. spin_unlock(&mp->m_ail_lock);
  138. last_pushed_lsn = 0;
  139. goto out;
  140. }
  141. XFS_STATS_INC(xs_push_ail);
  142. /*
  143. * While the item we are looking at is below the given threshold
  144. * try to flush it out. We'd like not to stop until we've at least
  145. * tried to push on everything in the AIL with an LSN less than
  146. * the given threshold.
  147. *
  148. * However, we will stop after a certain number of pushes and wait
  149. * for a reduced timeout to fire before pushing further. This
  150. * prevents use from spinning when we can't do anything or there is
  151. * lots of contention on the AIL lists.
  152. */
  153. tout = 10;
  154. lsn = lip->li_lsn;
  155. flush_log = stuck = count = restarts = 0;
  156. while ((XFS_LSN_CMP(lip->li_lsn, target) < 0)) {
  157. int lock_result;
  158. /*
  159. * If we can lock the item without sleeping, unlock the AIL
  160. * lock and flush the item. Then re-grab the AIL lock so we
  161. * can look for the next item on the AIL. List changes are
  162. * handled by the AIL lookup functions internally
  163. *
  164. * If we can't lock the item, either its holder will flush it
  165. * or it is already being flushed or it is being relogged. In
  166. * any of these case it is being taken care of and we can just
  167. * skip to the next item in the list.
  168. */
  169. lock_result = IOP_TRYLOCK(lip);
  170. spin_unlock(&mp->m_ail_lock);
  171. switch (lock_result) {
  172. case XFS_ITEM_SUCCESS:
  173. XFS_STATS_INC(xs_push_ail_success);
  174. IOP_PUSH(lip);
  175. last_pushed_lsn = lsn;
  176. break;
  177. case XFS_ITEM_PUSHBUF:
  178. XFS_STATS_INC(xs_push_ail_pushbuf);
  179. IOP_PUSHBUF(lip);
  180. last_pushed_lsn = lsn;
  181. break;
  182. case XFS_ITEM_PINNED:
  183. XFS_STATS_INC(xs_push_ail_pinned);
  184. stuck++;
  185. flush_log = 1;
  186. break;
  187. case XFS_ITEM_LOCKED:
  188. XFS_STATS_INC(xs_push_ail_locked);
  189. last_pushed_lsn = lsn;
  190. stuck++;
  191. break;
  192. case XFS_ITEM_FLUSHING:
  193. XFS_STATS_INC(xs_push_ail_flushing);
  194. last_pushed_lsn = lsn;
  195. stuck++;
  196. break;
  197. default:
  198. ASSERT(0);
  199. break;
  200. }
  201. spin_lock(&mp->m_ail_lock);
  202. /* should we bother continuing? */
  203. if (XFS_FORCED_SHUTDOWN(mp))
  204. break;
  205. ASSERT(mp->m_log);
  206. count++;
  207. /*
  208. * Are there too many items we can't do anything with?
  209. * If we we are skipping too many items because we can't flush
  210. * them or they are already being flushed, we back off and
  211. * given them time to complete whatever operation is being
  212. * done. i.e. remove pressure from the AIL while we can't make
  213. * progress so traversals don't slow down further inserts and
  214. * removals to/from the AIL.
  215. *
  216. * The value of 100 is an arbitrary magic number based on
  217. * observation.
  218. */
  219. if (stuck > 100)
  220. break;
  221. lip = xfs_trans_next_ail(mp, lip, &gen, &restarts);
  222. if (lip == NULL)
  223. break;
  224. if (restarts > XFS_TRANS_PUSH_AIL_RESTARTS)
  225. break;
  226. lsn = lip->li_lsn;
  227. }
  228. spin_unlock(&mp->m_ail_lock);
  229. if (flush_log) {
  230. /*
  231. * If something we need to push out was pinned, then
  232. * push out the log so it will become unpinned and
  233. * move forward in the AIL.
  234. */
  235. XFS_STATS_INC(xs_push_ail_flush);
  236. xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE);
  237. }
  238. if (!count) {
  239. /* We're past our target or empty, so idle */
  240. tout = 1000;
  241. } else if (XFS_LSN_CMP(lsn, target) >= 0) {
  242. /*
  243. * We reached the target so wait a bit longer for I/O to
  244. * complete and remove pushed items from the AIL before we
  245. * start the next scan from the start of the AIL.
  246. */
  247. tout += 20;
  248. last_pushed_lsn = 0;
  249. } else if ((restarts > XFS_TRANS_PUSH_AIL_RESTARTS) ||
  250. ((stuck * 100) / count > 90)) {
  251. /*
  252. * Either there is a lot of contention on the AIL or we
  253. * are stuck due to operations in progress. "Stuck" in this
  254. * case is defined as >90% of the items we tried to push
  255. * were stuck.
  256. *
  257. * Backoff a bit more to allow some I/O to complete before
  258. * continuing from where we were.
  259. */
  260. tout += 10;
  261. }
  262. out:
  263. *last_lsn = last_pushed_lsn;
  264. return tout;
  265. } /* xfsaild_push */
  266. /*
  267. * This is to be called when an item is unlocked that may have
  268. * been in the AIL. It will wake up the first member of the AIL
  269. * wait list if this item's unlocking might allow it to progress.
  270. * If the item is in the AIL, then we need to get the AIL lock
  271. * while doing our checking so we don't race with someone going
  272. * to sleep waiting for this event in xfs_trans_push_ail().
  273. */
  274. void
  275. xfs_trans_unlocked_item(
  276. xfs_mount_t *mp,
  277. xfs_log_item_t *lip)
  278. {
  279. xfs_log_item_t *min_lip;
  280. /*
  281. * If we're forcibly shutting down, we may have
  282. * unlocked log items arbitrarily. The last thing
  283. * we want to do is to move the tail of the log
  284. * over some potentially valid data.
  285. */
  286. if (!(lip->li_flags & XFS_LI_IN_AIL) ||
  287. XFS_FORCED_SHUTDOWN(mp)) {
  288. return;
  289. }
  290. /*
  291. * This is the one case where we can call into xfs_ail_min()
  292. * without holding the AIL lock because we only care about the
  293. * case where we are at the tail of the AIL. If the object isn't
  294. * at the tail, it doesn't matter what result we get back. This
  295. * is slightly racy because since we were just unlocked, we could
  296. * go to sleep between the call to xfs_ail_min and the call to
  297. * xfs_log_move_tail, have someone else lock us, commit to us disk,
  298. * move us out of the tail of the AIL, and then we wake up. However,
  299. * the call to xfs_log_move_tail() doesn't do anything if there's
  300. * not enough free space to wake people up so we're safe calling it.
  301. */
  302. min_lip = xfs_ail_min(&mp->m_ail);
  303. if (min_lip == lip)
  304. xfs_log_move_tail(mp, 1);
  305. } /* xfs_trans_unlocked_item */
  306. /*
  307. * Update the position of the item in the AIL with the new
  308. * lsn. If it is not yet in the AIL, add it. Otherwise, move
  309. * it to its new position by removing it and re-adding it.
  310. *
  311. * Wakeup anyone with an lsn less than the item's lsn. If the item
  312. * we move in the AIL is the minimum one, update the tail lsn in the
  313. * log manager.
  314. *
  315. * Increment the AIL's generation count to indicate that the tree
  316. * has changed.
  317. *
  318. * This function must be called with the AIL lock held. The lock
  319. * is dropped before returning.
  320. */
  321. void
  322. xfs_trans_update_ail(
  323. xfs_mount_t *mp,
  324. xfs_log_item_t *lip,
  325. xfs_lsn_t lsn) __releases(mp->m_ail_lock)
  326. {
  327. xfs_log_item_t *dlip=NULL;
  328. xfs_log_item_t *mlip; /* ptr to minimum lip */
  329. mlip = xfs_ail_min(&mp->m_ail);
  330. if (lip->li_flags & XFS_LI_IN_AIL) {
  331. dlip = xfs_ail_delete(&mp->m_ail, lip);
  332. ASSERT(dlip == lip);
  333. } else {
  334. lip->li_flags |= XFS_LI_IN_AIL;
  335. }
  336. lip->li_lsn = lsn;
  337. xfs_ail_insert(&mp->m_ail, lip);
  338. mp->m_ail.xa_gen++;
  339. if (mlip == dlip) {
  340. mlip = xfs_ail_min(&mp->m_ail);
  341. spin_unlock(&mp->m_ail_lock);
  342. xfs_log_move_tail(mp, mlip->li_lsn);
  343. } else {
  344. spin_unlock(&mp->m_ail_lock);
  345. }
  346. } /* xfs_trans_update_ail */
  347. /*
  348. * Delete the given item from the AIL. It must already be in
  349. * the AIL.
  350. *
  351. * Wakeup anyone with an lsn less than item's lsn. If the item
  352. * we delete in the AIL is the minimum one, update the tail lsn in the
  353. * log manager.
  354. *
  355. * Clear the IN_AIL flag from the item, reset its lsn to 0, and
  356. * bump the AIL's generation count to indicate that the tree
  357. * has changed.
  358. *
  359. * This function must be called with the AIL lock held. The lock
  360. * is dropped before returning.
  361. */
  362. void
  363. xfs_trans_delete_ail(
  364. xfs_mount_t *mp,
  365. xfs_log_item_t *lip) __releases(mp->m_ail_lock)
  366. {
  367. xfs_log_item_t *dlip;
  368. xfs_log_item_t *mlip;
  369. if (lip->li_flags & XFS_LI_IN_AIL) {
  370. mlip = xfs_ail_min(&mp->m_ail);
  371. dlip = xfs_ail_delete(&mp->m_ail, lip);
  372. ASSERT(dlip == lip);
  373. lip->li_flags &= ~XFS_LI_IN_AIL;
  374. lip->li_lsn = 0;
  375. mp->m_ail.xa_gen++;
  376. if (mlip == dlip) {
  377. mlip = xfs_ail_min(&mp->m_ail);
  378. spin_unlock(&mp->m_ail_lock);
  379. xfs_log_move_tail(mp, (mlip ? mlip->li_lsn : 0));
  380. } else {
  381. spin_unlock(&mp->m_ail_lock);
  382. }
  383. }
  384. else {
  385. /*
  386. * If the file system is not being shutdown, we are in
  387. * serious trouble if we get to this stage.
  388. */
  389. if (XFS_FORCED_SHUTDOWN(mp))
  390. spin_unlock(&mp->m_ail_lock);
  391. else {
  392. xfs_cmn_err(XFS_PTAG_AILDELETE, CE_ALERT, mp,
  393. "%s: attempting to delete a log item that is not in the AIL",
  394. __func__);
  395. spin_unlock(&mp->m_ail_lock);
  396. xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
  397. }
  398. }
  399. }
  400. /*
  401. * Return the item in the AIL with the smallest lsn.
  402. * Return the current tree generation number for use
  403. * in calls to xfs_trans_next_ail().
  404. */
  405. xfs_log_item_t *
  406. xfs_trans_first_ail(
  407. xfs_mount_t *mp,
  408. int *gen)
  409. {
  410. xfs_log_item_t *lip;
  411. lip = xfs_ail_min(&mp->m_ail);
  412. *gen = (int)mp->m_ail.xa_gen;
  413. return lip;
  414. }
  415. /*
  416. * If the generation count of the tree has not changed since the
  417. * caller last took something from the AIL, then return the elmt
  418. * in the tree which follows the one given. If the count has changed,
  419. * then return the minimum elmt of the AIL and bump the restarts counter
  420. * if one is given.
  421. */
  422. xfs_log_item_t *
  423. xfs_trans_next_ail(
  424. xfs_mount_t *mp,
  425. xfs_log_item_t *lip,
  426. int *gen,
  427. int *restarts)
  428. {
  429. xfs_log_item_t *nlip;
  430. ASSERT(mp && lip && gen);
  431. if (mp->m_ail.xa_gen == *gen) {
  432. nlip = xfs_ail_next(&mp->m_ail, lip);
  433. } else {
  434. nlip = xfs_ail_min(&mp->m_ail);
  435. *gen = (int)mp->m_ail.xa_gen;
  436. if (restarts != NULL) {
  437. XFS_STATS_INC(xs_push_ail_restarts);
  438. (*restarts)++;
  439. }
  440. }
  441. return (nlip);
  442. }
  443. /*
  444. * The active item list (AIL) is a doubly linked list of log
  445. * items sorted by ascending lsn. The base of the list is
  446. * a forw/back pointer pair embedded in the xfs mount structure.
  447. * The base is initialized with both pointers pointing to the
  448. * base. This case always needs to be distinguished, because
  449. * the base has no lsn to look at. We almost always insert
  450. * at the end of the list, so on inserts we search from the
  451. * end of the list to find where the new item belongs.
  452. */
  453. /*
  454. * Initialize the doubly linked list to point only to itself.
  455. */
  456. int
  457. xfs_trans_ail_init(
  458. xfs_mount_t *mp)
  459. {
  460. INIT_LIST_HEAD(&mp->m_ail.xa_ail);
  461. return xfsaild_start(mp);
  462. }
  463. void
  464. xfs_trans_ail_destroy(
  465. xfs_mount_t *mp)
  466. {
  467. xfsaild_stop(mp);
  468. }
  469. /*
  470. * Insert the given log item into the AIL.
  471. * We almost always insert at the end of the list, so on inserts
  472. * we search from the end of the list to find where the
  473. * new item belongs.
  474. */
  475. STATIC void
  476. xfs_ail_insert(
  477. xfs_ail_t *ailp,
  478. xfs_log_item_t *lip)
  479. /* ARGSUSED */
  480. {
  481. xfs_log_item_t *next_lip;
  482. /*
  483. * If the list is empty, just insert the item.
  484. */
  485. if (list_empty(&ailp->xa_ail)) {
  486. list_add(&lip->li_ail, &ailp->xa_ail);
  487. return;
  488. }
  489. list_for_each_entry_reverse(next_lip, &ailp->xa_ail, li_ail) {
  490. if (XFS_LSN_CMP(next_lip->li_lsn, lip->li_lsn) <= 0)
  491. break;
  492. }
  493. ASSERT((&next_lip->li_ail == &ailp->xa_ail) ||
  494. (XFS_LSN_CMP(next_lip->li_lsn, lip->li_lsn) <= 0));
  495. list_add(&lip->li_ail, &next_lip->li_ail);
  496. xfs_ail_check(ailp, lip);
  497. return;
  498. }
  499. /*
  500. * Delete the given item from the AIL. Return a pointer to the item.
  501. */
  502. /*ARGSUSED*/
  503. STATIC xfs_log_item_t *
  504. xfs_ail_delete(
  505. xfs_ail_t *ailp,
  506. xfs_log_item_t *lip)
  507. /* ARGSUSED */
  508. {
  509. xfs_ail_check(ailp, lip);
  510. list_del(&lip->li_ail);
  511. return lip;
  512. }
  513. /*
  514. * Return a pointer to the first item in the AIL.
  515. * If the AIL is empty, then return NULL.
  516. */
  517. STATIC xfs_log_item_t *
  518. xfs_ail_min(
  519. xfs_ail_t *ailp)
  520. /* ARGSUSED */
  521. {
  522. if (list_empty(&ailp->xa_ail))
  523. return NULL;
  524. return list_first_entry(&ailp->xa_ail, xfs_log_item_t, li_ail);
  525. }
  526. /*
  527. * Return a pointer to the item which follows
  528. * the given item in the AIL. If the given item
  529. * is the last item in the list, then return NULL.
  530. */
  531. STATIC xfs_log_item_t *
  532. xfs_ail_next(
  533. xfs_ail_t *ailp,
  534. xfs_log_item_t *lip)
  535. /* ARGSUSED */
  536. {
  537. if (lip->li_ail.next == &ailp->xa_ail)
  538. return NULL;
  539. return list_first_entry(&lip->li_ail, xfs_log_item_t, li_ail);
  540. }
  541. #ifdef DEBUG
  542. /*
  543. * Check that the list is sorted as it should be.
  544. */
  545. STATIC void
  546. xfs_ail_check(
  547. xfs_ail_t *ailp,
  548. xfs_log_item_t *lip)
  549. {
  550. xfs_log_item_t *prev_lip;
  551. if (list_empty(&ailp->xa_ail))
  552. return;
  553. /*
  554. * Check the next and previous entries are valid.
  555. */
  556. ASSERT((lip->li_flags & XFS_LI_IN_AIL) != 0);
  557. prev_lip = list_entry(lip->li_ail.prev, xfs_log_item_t, li_ail);
  558. if (&prev_lip->li_ail != &ailp->xa_ail)
  559. ASSERT(XFS_LSN_CMP(prev_lip->li_lsn, lip->li_lsn) <= 0);
  560. prev_lip = list_entry(lip->li_ail.next, xfs_log_item_t, li_ail);
  561. if (&prev_lip->li_ail != &ailp->xa_ail)
  562. ASSERT(XFS_LSN_CMP(prev_lip->li_lsn, lip->li_lsn) >= 0);
  563. #ifdef XFS_TRANS_DEBUG
  564. /*
  565. * Walk the list checking lsn ordering, and that every entry has the
  566. * XFS_LI_IN_AIL flag set. This is really expensive, so only do it
  567. * when specifically debugging the transaction subsystem.
  568. */
  569. prev_lip = list_entry(&ailp->xa_ail, xfs_log_item_t, li_ail);
  570. list_for_each_entry(lip, &ailp->xa_ail, li_ail) {
  571. if (&prev_lip->li_ail != &ailp->xa_ail)
  572. ASSERT(XFS_LSN_CMP(prev_lip->li_lsn, lip->li_lsn) <= 0);
  573. ASSERT((lip->li_flags & XFS_LI_IN_AIL) != 0);
  574. prev_lip = lip;
  575. }
  576. #endif /* XFS_TRANS_DEBUG */
  577. }
  578. #endif /* DEBUG */