diff options
author | Christoph Hellwig <hch@sgi.com> | 2006-01-10 23:34:50 -0500 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2006-01-10 23:34:50 -0500 |
commit | dd954c69d189cd91571b42d3f926e70351395dc3 (patch) | |
tree | 2268d30490b9ea288b73afe56afa2e6eae50db5e /fs/xfs/xfs_log_priv.h | |
parent | 24ee80882deb5777aeee6f75a05f178ab8fbfa69 (diff) |
[XFS] turn xlog helper macros into real functions
SGI-PV: 946205
SGI-Modid: xfs-linux-melb:xfs-kern:203360a
Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log_priv.h')
-rw-r--r-- | fs/xfs/xfs_log_priv.h | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h index 4f93988d7ac6..5862286552ce 100644 --- a/fs/xfs/xfs_log_priv.h +++ b/fs/xfs/xfs_log_priv.h | |||
@@ -494,63 +494,6 @@ typedef struct log { | |||
494 | 494 | ||
495 | #define XLOG_FORCED_SHUTDOWN(log) ((log)->l_flags & XLOG_IO_ERROR) | 495 | #define XLOG_FORCED_SHUTDOWN(log) ((log)->l_flags & XLOG_IO_ERROR) |
496 | 496 | ||
497 | #define XLOG_GRANT_SUB_SPACE(log,bytes,type) \ | ||
498 | { \ | ||
499 | if (type == 'w') { \ | ||
500 | (log)->l_grant_write_bytes -= (bytes); \ | ||
501 | if ((log)->l_grant_write_bytes < 0) { \ | ||
502 | (log)->l_grant_write_bytes += (log)->l_logsize; \ | ||
503 | (log)->l_grant_write_cycle--; \ | ||
504 | } \ | ||
505 | } else { \ | ||
506 | (log)->l_grant_reserve_bytes -= (bytes); \ | ||
507 | if ((log)->l_grant_reserve_bytes < 0) { \ | ||
508 | (log)->l_grant_reserve_bytes += (log)->l_logsize;\ | ||
509 | (log)->l_grant_reserve_cycle--; \ | ||
510 | } \ | ||
511 | } \ | ||
512 | } | ||
513 | #define XLOG_GRANT_ADD_SPACE(log,bytes,type) \ | ||
514 | { \ | ||
515 | if (type == 'w') { \ | ||
516 | (log)->l_grant_write_bytes += (bytes); \ | ||
517 | if ((log)->l_grant_write_bytes > (log)->l_logsize) { \ | ||
518 | (log)->l_grant_write_bytes -= (log)->l_logsize; \ | ||
519 | (log)->l_grant_write_cycle++; \ | ||
520 | } \ | ||
521 | } else { \ | ||
522 | (log)->l_grant_reserve_bytes += (bytes); \ | ||
523 | if ((log)->l_grant_reserve_bytes > (log)->l_logsize) { \ | ||
524 | (log)->l_grant_reserve_bytes -= (log)->l_logsize;\ | ||
525 | (log)->l_grant_reserve_cycle++; \ | ||
526 | } \ | ||
527 | } \ | ||
528 | } | ||
529 | #define XLOG_INS_TICKETQ(q, tic) \ | ||
530 | { \ | ||
531 | if (q) { \ | ||
532 | (tic)->t_next = (q); \ | ||
533 | (tic)->t_prev = (q)->t_prev; \ | ||
534 | (q)->t_prev->t_next = (tic); \ | ||
535 | (q)->t_prev = (tic); \ | ||
536 | } else { \ | ||
537 | (tic)->t_prev = (tic)->t_next = (tic); \ | ||
538 | (q) = (tic); \ | ||
539 | } \ | ||
540 | (tic)->t_flags |= XLOG_TIC_IN_Q; \ | ||
541 | } | ||
542 | #define XLOG_DEL_TICKETQ(q, tic) \ | ||
543 | { \ | ||
544 | if ((tic) == (tic)->t_next) { \ | ||
545 | (q) = NULL; \ | ||
546 | } else { \ | ||
547 | (q) = (tic)->t_next; \ | ||
548 | (tic)->t_next->t_prev = (tic)->t_prev; \ | ||
549 | (tic)->t_prev->t_next = (tic)->t_next; \ | ||
550 | } \ | ||
551 | (tic)->t_next = (tic)->t_prev = NULL; \ | ||
552 | (tic)->t_flags &= ~XLOG_TIC_IN_Q; \ | ||
553 | } | ||
554 | 497 | ||
555 | /* common routines */ | 498 | /* common routines */ |
556 | extern xfs_lsn_t xlog_assign_tail_lsn(struct xfs_mount *mp); | 499 | extern xfs_lsn_t xlog_assign_tail_lsn(struct xfs_mount *mp); |