shithub: lwext4

Download patch

ref: 825892fffbe28f07223e3f1dcadb887732591d49
parent: 526e3d9d13ec9e7f055407cda23c031e4200f278
author: ngkaho1234 <ngkaho1234@gmail.com>
date: Sat Jan 16 23:25:41 EST 2016

ext4_journal: remove pending transaction support. (useless)

--- a/lwext4/ext4_journal.c
+++ b/lwext4/ext4_journal.c
@@ -1374,9 +1374,6 @@
 	struct jbd_fs *jbd_fs = journal->jbd_fs;
 	uint32_t features_incompatible;
 
-	/* Commit all the transactions to the journal.*/
-	jbd_journal_commit_all(journal);
-
 	/* Make sure that journalled content have reached
 	 * the disk.*/
 	jbd_journal_purge_cp_trans(journal, true);
@@ -2024,18 +2021,6 @@
 	return rc;
 }
 
-/**@brief  Submit the transaction to transaction queue.
- * @param  journal current journal session
- * @param  trans transaction*/
-void
-jbd_journal_submit_trans(struct jbd_journal *journal,
-			 struct jbd_trans *trans)
-{
-	TAILQ_INSERT_TAIL(&journal->trans_queue,
-			  trans,
-			  trans_node);
-}
-
 /**@brief  Put references of block descriptors in a transaction.
  * @param  journal current journal session
  * @param  trans transaction*/
@@ -2166,29 +2151,6 @@
 		jbd_journal_free_trans(journal, trans, true);
 	}
 	return rc;
-}
-
-/**@brief  Commit one transaction on transaction queue
- *         to the journal.
- * @param  journal current journal session.*/
-void jbd_journal_commit_one(struct jbd_journal *journal)
-{
-	struct jbd_trans *trans;
-
-	if ((trans = TAILQ_FIRST(&journal->trans_queue))) {
-		TAILQ_REMOVE(&journal->trans_queue, trans, trans_node);
-		jbd_journal_commit_trans(journal, trans);
-	}
-}
-
-/**@brief  Commit all the transactions on transaction queue
- *         to the journal.
- * @param  journal current journal session.*/
-void jbd_journal_commit_all(struct jbd_journal *journal)
-{
-	while (!TAILQ_EMPTY(&journal->trans_queue)) {
-		jbd_journal_commit_one(journal);
-	}
 }
 
 /**
--- a/lwext4/ext4_journal.h
+++ b/lwext4/ext4_journal.h
@@ -69,10 +69,6 @@
 			    bool abort);
 int jbd_journal_commit_trans(struct jbd_journal *journal,
 			     struct jbd_trans *trans);
-void jbd_journal_submit_trans(struct jbd_journal *journal,
-			      struct jbd_trans *trans);
-void jbd_journal_commit_one(struct jbd_journal *journal);
-void jbd_journal_commit_all(struct jbd_journal *journal);
 
 #ifdef __cplusplus
 }