hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/jbd2.h
....@@ -1,13 +1,10 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * linux/include/linux/jbd2.h
34 *
45 * Written by Stephen C. Tweedie <sct@redhat.com>
56 *
67 * Copyright 1998-2000 Red Hat, Inc --- All Rights Reserved
7
- *
8
- * This file is part of the Linux kernel and is made available under
9
- * the terms of the GNU General Public License, version 2, or at your
10
- * option, any later version, incorporated herein by reference.
118 *
129 * Definitions for transaction data structures for the buffer cache
1310 * filesystem journaling support.
....@@ -30,6 +27,7 @@
3027 #include <linux/timer.h>
3128 #include <linux/slab.h>
3229 #include <linux/bit_spinlock.h>
30
+#include <linux/blkdev.h>
3331 #include <crypto/hash.h>
3432 #endif
3533
....@@ -70,6 +68,7 @@
7068 extern void jbd2_free(void *ptr, size_t size);
7169
7270 #define JBD2_MIN_JOURNAL_BLOCKS 1024
71
+#define JBD2_MIN_FC_BLOCKS 256
7372
7473 #ifdef __KERNEL__
7574
....@@ -265,7 +264,10 @@
265264 /* 0x0050 */
266265 __u8 s_checksum_type; /* checksum type */
267266 __u8 s_padding2[3];
268
- __u32 s_padding[42];
267
+/* 0x0054 */
268
+ __be32 s_num_fc_blks; /* Number of fast commit blocks */
269
+/* 0x0058 */
270
+ __u32 s_padding[41];
269271 __be32 s_checksum; /* crc32c(superblock) */
270272
271273 /* 0x0100 */
....@@ -291,6 +293,7 @@
291293 #define JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT 0x00000004
292294 #define JBD2_FEATURE_INCOMPAT_CSUM_V2 0x00000008
293295 #define JBD2_FEATURE_INCOMPAT_CSUM_V3 0x00000010
296
+#define JBD2_FEATURE_INCOMPAT_FAST_COMMIT 0x00000020
294297
295298 /* See "journal feature predicate functions" below */
296299
....@@ -301,7 +304,8 @@
301304 JBD2_FEATURE_INCOMPAT_64BIT | \
302305 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT | \
303306 JBD2_FEATURE_INCOMPAT_CSUM_V2 | \
304
- JBD2_FEATURE_INCOMPAT_CSUM_V3)
307
+ JBD2_FEATURE_INCOMPAT_CSUM_V3 | \
308
+ JBD2_FEATURE_INCOMPAT_FAST_COMMIT)
305309
306310 #ifdef __KERNEL__
307311
....@@ -316,7 +320,6 @@
316320 BH_Revoked, /* Has been revoked from the log */
317321 BH_RevokeValid, /* Revoked flag is valid */
318322 BH_JBDDirty, /* Is dirty but journaled */
319
- BH_State, /* Pins most journal_head state */
320323 BH_JournalHead, /* Pins bh->b_private and jh->b_bh */
321324 BH_Shadow, /* IO on shadow buffer is running */
322325 BH_Verified, /* Metadata block has been verified ok */
....@@ -343,26 +346,6 @@
343346 static inline struct journal_head *bh2jh(struct buffer_head *bh)
344347 {
345348 return bh->b_private;
346
-}
347
-
348
-static inline void jbd_lock_bh_state(struct buffer_head *bh)
349
-{
350
- bit_spin_lock(BH_State, &bh->b_state);
351
-}
352
-
353
-static inline int jbd_trylock_bh_state(struct buffer_head *bh)
354
-{
355
- return bit_spin_trylock(BH_State, &bh->b_state);
356
-}
357
-
358
-static inline int jbd_is_locked_bh_state(struct buffer_head *bh)
359
-{
360
- return bit_spin_is_locked(BH_State, &bh->b_state);
361
-}
362
-
363
-static inline void jbd_unlock_bh_state(struct buffer_head *bh)
364
-{
365
- bit_spin_unlock(BH_State, &bh->b_state);
366349 }
367350
368351 static inline void jbd_lock_bh_journal_head(struct buffer_head *bh)
....@@ -418,7 +401,7 @@
418401 #define JI_WAIT_DATA (1 << __JI_WAIT_DATA)
419402
420403 /**
421
- * struct jbd_inode - The jbd_inode type is the structure linking inodes in
404
+ * struct jbd2_inode - The jbd_inode type is the structure linking inodes in
422405 * ordered mode present in a transaction so that we can sync them during commit.
423406 */
424407 struct jbd2_inode {
....@@ -475,12 +458,14 @@
475458 struct jbd2_revoke_table_s;
476459
477460 /**
478
- * struct handle_s - The handle_s type is the concrete type associated with
479
- * handle_t.
461
+ * struct jbd2_journal_handle - The jbd2_journal_handle type is the concrete
462
+ * type associated with handle_t.
480463 * @h_transaction: Which compound transaction is this update a part of?
481464 * @h_journal: Which journal handle belongs to - used iff h_reserved set.
482465 * @h_rsv_handle: Handle reserved for finishing the logical operation.
483
- * @h_buffer_credits: Number of remaining buffers we are allowed to dirty.
466
+ * @h_total_credits: Number of remaining buffers we are allowed to add to
467
+ * journal. These are dirty buffers and revoke descriptor blocks.
468
+ * @h_revoke_credits: Number of remaining revoke records available for handle
484469 * @h_ref: Reference count on this handle.
485470 * @h_err: Field for caller's use to track errors through large fs operations.
486471 * @h_sync: Flag for sync-on-close.
....@@ -490,7 +475,8 @@
490475 * @h_type: For handle statistics.
491476 * @h_line_no: For handle statistics.
492477 * @h_start_jiffies: Handle Start time.
493
- * @h_requested_credits: Holds @h_buffer_credits after handle is started.
478
+ * @h_requested_credits: Holds @h_total_credits after handle is started.
479
+ * @h_revoke_credits_requested: Holds @h_revoke_credits after handle is started.
494480 * @saved_alloc_context: Saved context while transaction is open.
495481 **/
496482
....@@ -507,7 +493,9 @@
507493 };
508494
509495 handle_t *h_rsv_handle;
510
- int h_buffer_credits;
496
+ int h_total_credits;
497
+ int h_revoke_credits;
498
+ int h_revoke_credits_requested;
511499 int h_ref;
512500 int h_err;
513501
....@@ -559,9 +547,9 @@
559547 * ->jbd_lock_bh_journal_head() (This is "innermost")
560548 *
561549 * j_state_lock
562
- * ->jbd_lock_bh_state()
550
+ * ->b_state_lock
563551 *
564
- * jbd_lock_bh_state()
552
+ * b_state_lock
565553 * ->j_list_lock
566554 *
567555 * j_state_lock
....@@ -591,6 +579,7 @@
591579 enum {
592580 T_RUNNING,
593581 T_LOCKED,
582
+ T_SWITCH,
594583 T_FLUSH,
595584 T_COMMIT,
596585 T_COMMIT_DFLUSH,
....@@ -646,7 +635,9 @@
646635 struct journal_head *t_shadow_list;
647636
648637 /*
649
- * List of inodes whose data we've modified in data=ordered mode.
638
+ * List of inodes associated with the transaction; e.g., ext4 uses
639
+ * this to track inodes in data=ordered and data=journal mode that
640
+ * need special handling on transaction commit; also used by ocfs2.
650641 * [j_list_lock]
651642 */
652643 struct list_head t_inode_list;
....@@ -678,15 +669,28 @@
678669
679670 /*
680671 * Number of outstanding updates running on this transaction
681
- * [t_handle_lock]
672
+ * [none]
682673 */
683674 atomic_t t_updates;
684675
685676 /*
686
- * Number of buffers reserved for use by all handles in this transaction
687
- * handle but not yet modified. [t_handle_lock]
677
+ * Number of blocks reserved for this transaction in the journal.
678
+ * This is including all credits reserved when starting transaction
679
+ * handles as well as all journal descriptor blocks needed for this
680
+ * transaction. [none]
688681 */
689682 atomic_t t_outstanding_credits;
683
+
684
+ /*
685
+ * Number of revoke records for this transaction added by already
686
+ * stopped handles. [none]
687
+ */
688
+ atomic_t t_outstanding_revokes;
689
+
690
+ /*
691
+ * How many handles used this transaction? [none]
692
+ */
693
+ atomic_t t_handle_count;
690694
691695 /*
692696 * Forward and backward links for the circular list of all transactions
....@@ -704,11 +708,6 @@
704708 * When this transaction started, in nanoseconds [no locking]
705709 */
706710 ktime_t t_start_time;
707
-
708
- /*
709
- * How many handles used this transaction? [t_handle_lock]
710
- */
711
- atomic_t t_handle_count;
712711
713712 /*
714713 * This transaction is being forced and some process is
....@@ -756,6 +755,11 @@
756755
757756 #define JBD2_NR_BATCH 64
758757
758
+enum passtype {PASS_SCAN, PASS_REVOKE, PASS_REPLAY};
759
+
760
+#define JBD2_FC_REPLAY_STOP 0
761
+#define JBD2_FC_REPLAY_CONTINUE 1
762
+
759763 /**
760764 * struct journal_s - The journal_s type is the concrete type associated with
761765 * journal_t.
....@@ -774,6 +778,11 @@
774778 * abort)? [j_state_lock]
775779 */
776780 int j_errno;
781
+
782
+ /**
783
+ * @j_abort_mutex: Lock the whole aborting procedure.
784
+ */
785
+ struct mutex j_abort_mutex;
777786
778787 /**
779788 * @j_sb_buffer: The first part of the superblock buffer.
....@@ -862,6 +871,13 @@
862871 wait_queue_head_t j_wait_reserved;
863872
864873 /**
874
+ * @j_fc_wait:
875
+ *
876
+ * Wait queue to wait for completion of async fast commits.
877
+ */
878
+ wait_queue_head_t j_fc_wait;
879
+
880
+ /**
865881 * @j_checkpoint_mutex:
866882 *
867883 * Semaphore for locking against concurrent checkpoints.
....@@ -919,6 +935,31 @@
919935 unsigned long j_last;
920936
921937 /**
938
+ * @j_fc_first:
939
+ *
940
+ * The block number of the first fast commit block in the journal
941
+ * [j_state_lock].
942
+ */
943
+ unsigned long j_fc_first;
944
+
945
+ /**
946
+ * @j_fc_off:
947
+ *
948
+ * Number of fast commit blocks currently allocated. Accessed only
949
+ * during fast commit. Currently only process can do fast commit, so
950
+ * this field is not protected by any lock.
951
+ */
952
+ unsigned long j_fc_off;
953
+
954
+ /**
955
+ * @j_fc_last:
956
+ *
957
+ * The block number one beyond the last fast commit block in the journal
958
+ * [j_state_lock].
959
+ */
960
+ unsigned long j_fc_last;
961
+
962
+ /**
922963 * @j_dev: Device where we store the journal.
923964 */
924965 struct block_device *j_dev;
....@@ -949,9 +990,9 @@
949990 struct block_device *j_fs_dev;
950991
951992 /**
952
- * @j_maxlen: Total maximum capacity of the journal region on disk.
993
+ * @j_total_len: Total maximum capacity of the journal region on disk.
953994 */
954
- unsigned int j_maxlen;
995
+ unsigned int j_total_len;
955996
956997 /**
957998 * @j_reserved_credits:
....@@ -1027,6 +1068,13 @@
10271068 int j_max_transaction_buffers;
10281069
10291070 /**
1071
+ * @j_revoke_records_per_block:
1072
+ *
1073
+ * Number of revoke records that fit in one descriptor block.
1074
+ */
1075
+ int j_revoke_records_per_block;
1076
+
1077
+ /**
10301078 * @j_commit_interval:
10311079 *
10321080 * What is the maximum transaction lifetime before we begin a commit?
....@@ -1062,11 +1110,25 @@
10621110 struct buffer_head **j_wbuf;
10631111
10641112 /**
1113
+ * @j_fc_wbuf: Array of fast commit bhs for fast commit. Accessed only
1114
+ * during a fast commit. Currently only process can do fast commit, so
1115
+ * this field is not protected by any lock.
1116
+ */
1117
+ struct buffer_head **j_fc_wbuf;
1118
+
1119
+ /**
10651120 * @j_wbufsize:
10661121 *
10671122 * Size of @j_wbuf array.
10681123 */
10691124 int j_wbufsize;
1125
+
1126
+ /**
1127
+ * @j_fc_wbufsize:
1128
+ *
1129
+ * Size of @j_fc_wbuf array.
1130
+ */
1131
+ int j_fc_wbufsize;
10701132
10711133 /**
10721134 * @j_last_sync_writer:
....@@ -1107,6 +1169,27 @@
11071169 */
11081170 void (*j_commit_callback)(journal_t *,
11091171 transaction_t *);
1172
+
1173
+ /**
1174
+ * @j_submit_inode_data_buffers:
1175
+ *
1176
+ * This function is called for all inodes associated with the
1177
+ * committing transaction marked with JI_WRITE_DATA flag
1178
+ * before we start to write out the transaction to the journal.
1179
+ */
1180
+ int (*j_submit_inode_data_buffers)
1181
+ (struct jbd2_inode *);
1182
+
1183
+ /**
1184
+ * @j_finish_inode_data_buffers:
1185
+ *
1186
+ * This function is called for all inodes associated with the
1187
+ * committing transaction marked with JI_WAIT_DATA flag
1188
+ * after we have written the transaction to the journal
1189
+ * but before we write out the commit block.
1190
+ */
1191
+ int (*j_finish_inode_data_buffers)
1192
+ (struct jbd2_inode *);
11101193
11111194 /*
11121195 * Journal statistics
....@@ -1167,12 +1250,36 @@
11671250 */
11681251 struct lockdep_map j_trans_commit_map;
11691252 #endif
1253
+
1254
+ /**
1255
+ * @j_fc_cleanup_callback:
1256
+ *
1257
+ * Clean-up after fast commit or full commit. JBD2 calls this function
1258
+ * after every commit operation.
1259
+ */
1260
+ void (*j_fc_cleanup_callback)(struct journal_s *journal, int);
1261
+
1262
+ /**
1263
+ * @j_fc_replay_callback:
1264
+ *
1265
+ * File-system specific function that performs replay of a fast
1266
+ * commit. JBD2 calls this function for each fast commit block found in
1267
+ * the journal. This function should return JBD2_FC_REPLAY_CONTINUE
1268
+ * to indicate that the block was processed correctly and more fast
1269
+ * commit replay should continue. Return value of JBD2_FC_REPLAY_STOP
1270
+ * indicates the end of replay (no more blocks remaining). A negative
1271
+ * return value indicates error.
1272
+ */
1273
+ int (*j_fc_replay_callback)(struct journal_s *journal,
1274
+ struct buffer_head *bh,
1275
+ enum passtype pass, int off,
1276
+ tid_t expected_commit_id);
11701277 };
11711278
11721279 #define jbd2_might_wait_for_commit(j) \
11731280 do { \
11741281 rwsem_acquire(&j->j_trans_commit_map, 0, 0, _THIS_IP_); \
1175
- rwsem_release(&j->j_trans_commit_map, 1, _THIS_IP_); \
1282
+ rwsem_release(&j->j_trans_commit_map, _THIS_IP_); \
11761283 } while (0)
11771284
11781285 /* journal feature predicate functions */
....@@ -1237,6 +1344,7 @@
12371344 JBD2_FEATURE_INCOMPAT_FUNCS(async_commit, ASYNC_COMMIT)
12381345 JBD2_FEATURE_INCOMPAT_FUNCS(csum2, CSUM_V2)
12391346 JBD2_FEATURE_INCOMPAT_FUNCS(csum3, CSUM_V3)
1347
+JBD2_FEATURE_INCOMPAT_FUNCS(fast_commit, FAST_COMMIT)
12401348
12411349 /*
12421350 * Journal flag definitions
....@@ -1250,7 +1358,8 @@
12501358 #define JBD2_ABORT_ON_SYNCDATA_ERR 0x040 /* Abort the journal on file
12511359 * data write error in ordered
12521360 * mode */
1253
-#define JBD2_REC_ERR 0x080 /* The errno in the sb has been recorded */
1361
+#define JBD2_FAST_COMMIT_ONGOING 0x100 /* Fast commit is ongoing */
1362
+#define JBD2_FULL_COMMIT_ONGOING 0x200 /* Full commit is ongoing */
12541363
12551364 /*
12561365 * Function declarations for the journaling transaction and buffer
....@@ -1259,7 +1368,7 @@
12591368
12601369 /* Filing buffers */
12611370 extern void jbd2_journal_unfile_buffer(journal_t *, struct journal_head *);
1262
-extern void __jbd2_journal_refile_buffer(struct journal_head *);
1371
+extern bool __jbd2_journal_refile_buffer(struct journal_head *);
12631372 extern void jbd2_journal_refile_buffer(journal_t *, struct journal_head *);
12641373 extern void __jbd2_journal_file_buffer(struct journal_head *, transaction_t *, int);
12651374 extern void __journal_free_buffer(struct journal_head *bh);
....@@ -1360,14 +1469,16 @@
13601469
13611470 extern handle_t *jbd2_journal_start(journal_t *, int nblocks);
13621471 extern handle_t *jbd2__journal_start(journal_t *, int blocks, int rsv_blocks,
1363
- gfp_t gfp_mask, unsigned int type,
1364
- unsigned int line_no);
1472
+ int revoke_records, gfp_t gfp_mask,
1473
+ unsigned int type, unsigned int line_no);
13651474 extern int jbd2_journal_restart(handle_t *, int nblocks);
1366
-extern int jbd2__journal_restart(handle_t *, int nblocks, gfp_t gfp_mask);
1475
+extern int jbd2__journal_restart(handle_t *, int nblocks,
1476
+ int revoke_records, gfp_t gfp_mask);
13671477 extern int jbd2_journal_start_reserved(handle_t *handle,
13681478 unsigned int type, unsigned int line_no);
13691479 extern void jbd2_journal_free_reserved(handle_t *handle);
1370
-extern int jbd2_journal_extend (handle_t *, int nblocks);
1480
+extern int jbd2_journal_extend(handle_t *handle, int nblocks,
1481
+ int revoke_records);
13711482 extern int jbd2_journal_get_write_access(handle_t *, struct buffer_head *);
13721483 extern int jbd2_journal_get_create_access (handle_t *, struct buffer_head *);
13731484 extern int jbd2_journal_get_undo_access(handle_t *, struct buffer_head *);
....@@ -1375,10 +1486,9 @@
13751486 struct jbd2_buffer_trigger_type *type);
13761487 extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *);
13771488 extern int jbd2_journal_forget (handle_t *, struct buffer_head *);
1378
-extern void journal_sync_buffer (struct buffer_head *);
13791489 extern int jbd2_journal_invalidatepage(journal_t *,
13801490 struct page *, unsigned int, unsigned int);
1381
-extern int jbd2_journal_try_to_free_buffers(journal_t *, struct page *, gfp_t);
1491
+extern int jbd2_journal_try_to_free_buffers(journal_t *journal, struct page *page);
13821492 extern int jbd2_journal_stop(handle_t *);
13831493 extern int jbd2_journal_flush (journal_t *);
13841494 extern void jbd2_journal_lock_updates (journal_t *);
....@@ -1405,7 +1515,6 @@
14051515 extern void jbd2_journal_update_sb_errno(journal_t *);
14061516 extern int jbd2_journal_update_sb_log_tail (journal_t *, tid_t,
14071517 unsigned long, int);
1408
-extern void __jbd2_journal_abort_hard (journal_t *);
14091518 extern void jbd2_journal_abort (journal_t *, int);
14101519 extern int jbd2_journal_errno (journal_t *);
14111520 extern void jbd2_journal_ack_err (journal_t *);
....@@ -1413,14 +1522,16 @@
14131522 extern int jbd2_journal_bmap(journal_t *, unsigned long, unsigned long long *);
14141523 extern int jbd2_journal_force_commit(journal_t *);
14151524 extern int jbd2_journal_force_commit_nested(journal_t *);
1416
-extern int jbd2_journal_inode_add_write(handle_t *handle, struct jbd2_inode *inode);
1417
-extern int jbd2_journal_inode_add_wait(handle_t *handle, struct jbd2_inode *inode);
14181525 extern int jbd2_journal_inode_ranged_write(handle_t *handle,
14191526 struct jbd2_inode *inode, loff_t start_byte,
14201527 loff_t length);
14211528 extern int jbd2_journal_inode_ranged_wait(handle_t *handle,
14221529 struct jbd2_inode *inode, loff_t start_byte,
14231530 loff_t length);
1531
+extern int jbd2_journal_submit_inode_data_buffers(
1532
+ struct jbd2_inode *jinode);
1533
+extern int jbd2_journal_finish_inode_data_buffers(
1534
+ struct jbd2_inode *jinode);
14241535 extern int jbd2_journal_begin_ordered_truncate(journal_t *journal,
14251536 struct jbd2_inode *inode, loff_t new_size);
14261537 extern void jbd2_journal_init_jbd_inode(struct jbd2_inode *jinode, struct inode *inode);
....@@ -1505,6 +1616,21 @@
15051616 extern void __jbd2_journal_drop_transaction(journal_t *, transaction_t *);
15061617 extern int jbd2_cleanup_journal_tail(journal_t *);
15071618
1619
+/* Fast commit related APIs */
1620
+int jbd2_fc_begin_commit(journal_t *journal, tid_t tid);
1621
+int jbd2_fc_end_commit(journal_t *journal);
1622
+int jbd2_fc_end_commit_fallback(journal_t *journal);
1623
+int jbd2_fc_get_buf(journal_t *journal, struct buffer_head **bh_out);
1624
+int jbd2_submit_inode_data(struct jbd2_inode *jinode);
1625
+int jbd2_wait_inode_data(journal_t *journal, struct jbd2_inode *jinode);
1626
+int jbd2_fc_wait_bufs(journal_t *journal, int num_blks);
1627
+int jbd2_fc_release_bufs(journal_t *journal);
1628
+
1629
+static inline int jbd2_journal_get_max_txn_bufs(journal_t *journal)
1630
+{
1631
+ return (journal->j_total_len - journal->j_fc_wbufsize) / 4;
1632
+}
1633
+
15081634 /*
15091635 * is_journal_abort
15101636 *
....@@ -1566,22 +1692,6 @@
15661692 }
15671693
15681694 /*
1569
- * We reserve t_outstanding_credits >> JBD2_CONTROL_BLOCKS_SHIFT for
1570
- * transaction control blocks.
1571
- */
1572
-#define JBD2_CONTROL_BLOCKS_SHIFT 5
1573
-
1574
-/*
1575
- * Return the minimum number of blocks which must be free in the journal
1576
- * before a new transaction may be started. Must be called under j_state_lock.
1577
- */
1578
-static inline int jbd2_space_needed(journal_t *journal)
1579
-{
1580
- int nblocks = journal->j_max_transaction_buffers;
1581
- return nblocks + (nblocks >> JBD2_CONTROL_BLOCKS_SHIFT);
1582
-}
1583
-
1584
-/*
15851695 * Return number of free blocks in the log. Must be called under j_state_lock.
15861696 */
15871697 static inline unsigned long jbd2_log_space_left(journal_t *journal)
....@@ -1590,11 +1700,8 @@
15901700 long free = journal->j_free - 32;
15911701
15921702 if (journal->j_committing_transaction) {
1593
- unsigned long committing = atomic_read(&journal->
1594
- j_committing_transaction->t_outstanding_credits);
1595
-
1596
- /* Transaction + control blocks */
1597
- free -= committing + (committing >> JBD2_CONTROL_BLOCKS_SHIFT);
1703
+ free -= atomic_read(&journal->
1704
+ j_committing_transaction->t_outstanding_credits);
15981705 }
15991706 return max_t(long, free, 0);
16001707 }
....@@ -1629,7 +1736,6 @@
16291736 JBD_MAX_CHECKSUM_SIZE);
16301737
16311738 desc.shash.tfm = journal->j_chksum_driver;
1632
- desc.shash.flags = 0;
16331739 *(u32 *)desc.ctx = crc;
16341740
16351741 err = crypto_shash_update(&desc.shash, address, length);
....@@ -1651,6 +1757,20 @@
16511757 return tid;
16521758 }
16531759
1760
+static inline int jbd2_handle_buffer_credits(handle_t *handle)
1761
+{
1762
+ journal_t *journal;
1763
+
1764
+ if (!handle->h_reserved)
1765
+ journal = handle->h_transaction->t_journal;
1766
+ else
1767
+ journal = handle->h_journal;
1768
+
1769
+ return handle->h_total_credits -
1770
+ DIV_ROUND_UP(handle->h_revoke_credits_requested,
1771
+ journal->j_revoke_records_per_block);
1772
+}
1773
+
16541774 #ifdef __KERNEL__
16551775
16561776 #define buffer_trace_init(bh) do {} while (0)