Commit 551c81e2d32c5867fb592091365d8c37e1509dce
1 parent
e0144ca553
Exists in
master
and in
7 other branches
[XFS] Resolve the xlog_grant_log_space hang, revert inline to macro.
SGI-PV: 946205 SGI-Modid: xfs-linux-melb:xfs-kern:24567a Signed-off-by: Nathan Scott <nathans@sgi.com>
Showing 1 changed file with 12 additions and 24 deletions Side-by-side Diff
fs/xfs/xfs_log_priv.h
... | ... | @@ -494,10 +494,8 @@ |
494 | 494 | |
495 | 495 | #define XLOG_FORCED_SHUTDOWN(log) ((log)->l_flags & XLOG_IO_ERROR) |
496 | 496 | |
497 | -#define XLOG_GRANT_SUB_SPACE(log,bytes,type) \ | |
498 | - xlog_grant_sub_space(log,bytes,type) | |
499 | -static inline void xlog_grant_sub_space(struct log *log, int bytes, int type) | |
500 | -{ | |
497 | +#define XLOG_GRANT_SUB_SPACE(log,bytes,type) \ | |
498 | + { \ | |
501 | 499 | if (type == 'w') { \ |
502 | 500 | (log)->l_grant_write_bytes -= (bytes); \ |
503 | 501 | if ((log)->l_grant_write_bytes < 0) { \ |
... | ... | @@ -511,13 +509,9 @@ |
511 | 509 | (log)->l_grant_reserve_cycle--; \ |
512 | 510 | } \ |
513 | 511 | } \ |
514 | -} | |
515 | - | |
516 | -#define XLOG_GRANT_ADD_SPACE(log,bytes,type) \ | |
517 | - xlog_grant_add_space(log,bytes,type) | |
518 | -static inline void | |
519 | -xlog_grant_add_space(struct log *log, int bytes, int type) | |
520 | -{ | |
512 | + } | |
513 | +#define XLOG_GRANT_ADD_SPACE(log,bytes,type) \ | |
514 | + { \ | |
521 | 515 | if (type == 'w') { \ |
522 | 516 | (log)->l_grant_write_bytes += (bytes); \ |
523 | 517 | if ((log)->l_grant_write_bytes > (log)->l_logsize) { \ |
... | ... | @@ -531,12 +525,9 @@ |
531 | 525 | (log)->l_grant_reserve_cycle++; \ |
532 | 526 | } \ |
533 | 527 | } \ |
534 | -} | |
535 | - | |
536 | -#define XLOG_INS_TICKETQ(q, tic) xlog_ins_ticketq(q, tic) | |
537 | -static inline void | |
538 | -xlog_ins_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic) | |
539 | -{ \ | |
528 | + } | |
529 | +#define XLOG_INS_TICKETQ(q, tic) \ | |
530 | + { \ | |
540 | 531 | if (q) { \ |
541 | 532 | (tic)->t_next = (q); \ |
542 | 533 | (tic)->t_prev = (q)->t_prev; \ |
... | ... | @@ -547,12 +538,9 @@ |
547 | 538 | (q) = (tic); \ |
548 | 539 | } \ |
549 | 540 | (tic)->t_flags |= XLOG_TIC_IN_Q; \ |
550 | -} | |
551 | - | |
552 | -#define XLOG_DEL_TICKETQ(q, tic) xlog_del_ticketq(q, tic) | |
553 | -static inline void | |
554 | -xlog_del_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic) | |
555 | -{ \ | |
541 | + } | |
542 | +#define XLOG_DEL_TICKETQ(q, tic) \ | |
543 | + { \ | |
556 | 544 | if ((tic) == (tic)->t_next) { \ |
557 | 545 | (q) = NULL; \ |
558 | 546 | } else { \ |
... | ... | @@ -562,7 +550,7 @@ |
562 | 550 | } \ |
563 | 551 | (tic)->t_next = (tic)->t_prev = NULL; \ |
564 | 552 | (tic)->t_flags &= ~XLOG_TIC_IN_Q; \ |
565 | -} | |
553 | + } | |
566 | 554 | |
567 | 555 | /* common routines */ |
568 | 556 | extern xfs_lsn_t xlog_assign_tail_lsn(struct xfs_mount *mp); |