/openbmc/linux/fs/jbd2/ |
H A D | journal.c | 3 * linux/fs/jbd2/journal.c 9 * Generic filesystem journal-writing code; part of the ext2fs 16 * We do not actually manage the physical storage of the journal in this 17 * file: that is left to a per-journal policy function, which allows us 18 * to store the journal within a filesystem-specified area for ext2 137 journal_t *journal = from_timer(journal, t, j_commit_timer); in commit_timeout() local 139 wake_up_process(journal->j_task); in commit_timeout() 144 * journal. 149 * filesystem to disk. The journal thread is responsible for writing 151 * journal thread waits until it's done and then continues from [all …]
|
H A D | checkpoint.c | 44 * __jbd2_log_wait_for_space: wait until there is space in the journal. 49 void __jbd2_log_wait_for_space(journal_t *journal) in __jbd2_log_wait_for_space() argument 50 __acquires(&journal->j_state_lock) in __jbd2_log_wait_for_space() 51 __releases(&journal->j_state_lock) in __jbd2_log_wait_for_space() 54 /* assert_spin_locked(&journal->j_state_lock); */ in __jbd2_log_wait_for_space() 56 nblocks = journal->j_max_transaction_buffers; in __jbd2_log_wait_for_space() 57 while (jbd2_log_space_left(journal) < nblocks) { in __jbd2_log_wait_for_space() 58 write_unlock(&journal->j_state_lock); in __jbd2_log_wait_for_space() 59 mutex_lock_io(&journal->j_checkpoint_mutex); in __jbd2_log_wait_for_space() 65 * journal space by calling cleanup_journal_tail(), and if in __jbd2_log_wait_for_space() [all …]
|
H A D | commit.c | 9 * Journal commit routines for the generic filesystem journaling code; 30 * IO end handler for temporary buffer_heads handling writes to the journal. 109 * mode we can now just skip the rest of the journal write 112 * Returns 1 if the journal needs to be aborted or 0 on success 114 static int journal_submit_commit_record(journal_t *journal, in journal_submit_commit_record() argument 126 if (is_journal_aborted(journal)) in journal_submit_commit_record() 139 if (jbd2_has_feature_checksum(journal)) { in journal_submit_commit_record() 144 jbd2_commit_block_csum_set(journal, bh); in journal_submit_commit_record() 152 if (journal->j_flags & JBD2_BARRIER && in journal_submit_commit_record() 153 !jbd2_has_feature_async_commit(journal)) in journal_submit_commit_record() 165 journal_wait_on_commit_record(journal_t * journal,struct buffer_head * bh) journal_wait_on_commit_record() argument 181 jbd2_submit_inode_data(journal_t * journal,struct jbd2_inode * jinode) jbd2_submit_inode_data() argument 192 jbd2_wait_inode_data(journal_t * journal,struct jbd2_inode * jinode) jbd2_wait_inode_data() argument 211 journal_submit_data_buffers(journal_t * journal,transaction_t * commit_transaction) journal_submit_data_buffers() argument 254 journal_finish_inode_data_buffers(journal_t * journal,transaction_t * commit_transaction) journal_finish_inode_data_buffers() argument 348 jbd2_journal_commit_transaction(journal_t * journal) jbd2_journal_commit_transaction() argument [all...] |
H A D | recovery.c | 9 * Journal recovery routines for the generic filesystem journaling code; 39 static int do_one_pass(journal_t *journal, 55 * When reading from the journal, we are going through the block device 67 static int do_readahead(journal_t *journal, unsigned int start) in do_readahead() argument 77 max = start + (128 * 1024 / journal->j_blocksize); in do_readahead() 78 if (max > journal->j_total_len) in do_readahead() 79 max = journal->j_total_len; in do_readahead() 87 err = jbd2_journal_bmap(journal, next, &blocknr); in do_readahead() 95 bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize); in do_readahead() 126 * Read a block from the journal [all …]
|
H A D | revoke.c | 9 * Journal revoke routines for the generic filesystem journaling code; 17 * transaction's revoked blocks to the journal 34 * need either to cancel the journal entry or to write the revoke 62 * running transaction (is pointed to by journal->j_revoke), the other one 99 journal replay, this involves recording the transaction ID of the 131 static inline int hash(journal_t *journal, unsigned long long block) in hash() argument 133 return hash_64(block, journal->j_revoke->hash_shift); in hash() 136 static int insert_revoke_hash(journal_t *journal, unsigned long long blocknr, in insert_revoke_hash() argument 151 hash_list = &journal->j_revoke->hash_table[hash(journal, blockn in insert_revoke_hash() 160 find_revoke_record(journal_t * journal,unsigned long long blocknr) find_revoke_record() argument 263 jbd2_journal_init_revoke(journal_t * journal,int hash_size) jbd2_journal_init_revoke() argument 290 jbd2_journal_destroy_revoke(journal_t * journal) jbd2_journal_destroy_revoke() argument 330 journal_t *journal; jbd2_journal_revoke() local 426 journal_t *journal = handle->h_transaction->t_journal; jbd2_journal_cancel_revoke() local 484 jbd2_clear_buffer_revoked_flags(journal_t * journal) jbd2_clear_buffer_revoked_flags() argument 513 jbd2_journal_switch_revoke_table(journal_t * journal) jbd2_journal_switch_revoke_table() argument 533 journal_t *journal = transaction->t_journal; jbd2_journal_write_revoke_records() local 577 journal_t *journal = transaction->t_journal; write_one_revoke_record() local 641 flush_descriptor(journal_t * journal,struct buffer_head * descriptor,int offset) flush_descriptor() argument 683 jbd2_journal_set_revoke(journal_t * journal,unsigned long long blocknr,tid_t sequence) jbd2_journal_set_revoke() argument 707 jbd2_journal_test_revoke(journal_t * journal,unsigned long long blocknr,tid_t sequence) jbd2_journal_test_revoke() argument 726 jbd2_journal_clear_revoke(journal_t * journal) jbd2_journal_clear_revoke() argument [all...] |
H A D | transaction.c | 69 * RUNNING state and add it to the current journal (which should not 74 * The journal MUST be locked. We don't perform atomic mallocs on the 76 * processes trying to touch the journal while it is in transition. 80 static void jbd2_get_transaction(journal_t *journal, in jbd2_get_transaction() argument 83 transaction->t_journal = journal; in jbd2_get_transaction() 86 transaction->t_tid = journal->j_transaction_sequence++; in jbd2_get_transaction() 87 transaction->t_expires = jiffies + journal->j_commit_interval; in jbd2_get_transaction() 90 journal->j_transaction_overhead_buffers + in jbd2_get_transaction() 91 atomic_read(&journal->j_reserved_credits)); in jbd2_get_transaction() 98 journal->j_commit_timer.expires = round_jiffies_up(transaction->t_expires); in jbd2_get_transaction() [all …]
|
/openbmc/linux/drivers/md/bcache/ |
H A D | journal.h | 6 * THE JOURNAL: 8 * The journal is treated as a circular buffer of buckets - a journal entry 10 * journal at runtime, and will be needed for bcache on raw flash support. 12 * Journal entries contain a list of keys, ordered by the time they were 13 * inserted; thus journal replay just has to reinsert the keys. 15 * We also keep some things in the journal header that are logically part of the 18 * journal) can't be moved or wear leveled, so it contains just enough 19 * information to find the main journal, and the superblock only has to be 20 * rewritten when we want to move/wear level the main journal. 22 * Currently, we don't journal BTREE_REPLACE operations - this will hopefully be [all …]
|
H A D | journal.c | 16 * Journal replay/recovery: 18 * This code is all driven from run_cache_set(); we first read the journal 19 * entries, do some other stuff, then we mark all the keys in the journal 22 * journal. 24 * We only journal keys that go in leaf nodes, which simplifies things quite a 38 struct journal_device *ja = &ca->journal; in journal_read_bucket() 42 struct jset *j, *data = ca->set->journal.w[0].data; in journal_read_bucket() 68 * journal entries that overlap bucket boundaries; this means in journal_read_bucket() 69 * the start of a bucket will always have a valid journal entry in journal_read_bucket() 70 * if it has any journal entries at all. in journal_read_bucket() [all …]
|
/openbmc/phosphor-power/phosphor-regulators/src/ |
H A D | error_logging.hpp | 19 #include "journal.hpp" 64 * @param journal system journal 67 Journal& journal) = 0; 75 * @param journal system journal 77 virtual void logDBusError(Entry::Level severity, Journal& journal) = 0; 83 * @param journal system journal 89 virtual void logI2CError(Entry::Level severity, Journal& journal, 97 * @param journal system journal 99 virtual void logInternalError(Entry::Level severity, Journal& journal) = 0; 107 * @param journal system journal [all …]
|
H A D | journal.hpp | 18 #include <systemd/sd-journal.h> 29 * @class Journal 31 * Abstract base class that provides a journal interface. 33 * The interface is used to write messages/log entries to the system journal. 35 class Journal class 39 Journal() = default; 40 Journal(const Journal&) = delete; 41 Journal(Journal&&) = delete; 42 Journal& operator=(const Journal&) = delete; 43 Journal& operator=(Journal&&) = delete; [all …]
|
H A D | journal.cpp | 17 #include "journal.hpp" 34 * Automatically closes the journal when the object goes out of scope. 46 explicit JournalCloser(sd_journal* journal) : journal{journal} {} in JournalCloser() argument 50 sd_journal_close(journal); in ~JournalCloser() 54 sd_journal* journal{nullptr}; member in phosphor::power::regulators::JournalCloser 60 // Sleep 100ms; otherwise recent journal entries sometimes not available in getMessages() 64 // Open the journal in getMessages() 65 sd_journal* journal; in getMessages() local 66 int rc = sd_journal_open(&journal, SD_JOURNAL_LOCAL_ONLY); in getMessages() 70 std::string{"Failed to open journal: "} + strerror(-rc)}; in getMessages() [all …]
|
H A D | error_logging.cpp | 37 Journal& journal) in logConfigFileError() argument 52 logError(message, severity, additionalData, journal); in logConfigFileError() 55 void DBusErrorLogging::logDBusError(Entry::Level severity, Journal& journal) in logDBusError() argument 59 journal); in logDBusError() 62 void DBusErrorLogging::logI2CError(Entry::Level severity, Journal& journal, in logI2CError() argument 79 journal); in logI2CError() 82 void DBusErrorLogging::logInternalError(Entry::Level severity, Journal& journal) in logInternalError() argument 86 additionalData, journal); in logInternalError() 90 Entry::Level severity, Journal& journal, PhaseFaultType type, in logPhaseFault() argument 99 logError(message, severity, additionalData, journal); in logPhaseFault() [all …]
|
/openbmc/linux/fs/reiserfs/ |
H A D | journal.c | 75 /* journal list state bits */ 94 struct reiserfs_journal *journal); 102 JBEGIN_REG = 0, /* regular journal begin */ 115 struct reiserfs_journal *journal = SB_JOURNAL(sb); in init_journal_hash() local 116 memset(journal->j_hash_table, 0, in init_journal_hash() 157 struct reiserfs_journal *journal = SB_JOURNAL(sb); in get_bitmap_node() local 159 struct list_head *entry = journal->j_bitmap_nodes.next; in get_bitmap_node() 161 journal->j_used_bitmap_nodes++; in get_bitmap_node() 164 if (entry != &journal->j_bitmap_nodes) { in get_bitmap_node() 168 journal->j_free_bitmap_nodes--; in get_bitmap_node() [all …]
|
/openbmc/phosphor-logging/extensions/openpower-pels/ |
H A D | journal.hpp | 3 #include <systemd/sd-journal.h> 13 * Abstract class to read messages from the journal. 26 * @brief Get messages from the journal 37 * @brief Call journalctl --sync to write unwritten journal data to disk 43 * @class Journal 45 * Reads from the journal. 47 class Journal : public JournalBase class 50 Journal() = default; 51 ~Journal() = default; 52 Journal(const Journal&) = default; [all …]
|
H A D | journal.cpp | 16 #include "journal.hpp" 32 * Closes the journal on destruction 43 explicit JournalCloser(sd_journal* journal) : journal{journal} {} in JournalCloser() argument 47 sd_journal_close(journal); in ~JournalCloser() 51 sd_journal* journal{nullptr}; member in openpower::pels::JournalCloser 54 void Journal::sync() const in sync() 66 lg2::info("Journal sync took {DURATION}ms", "DURATION", in sync() 72 Journal::getMessages(const std::string& syslogID, size_t maxMessages) const in getMessages() 78 "maxMessages value of zero passed into Journal::getMessages"); in getMessages() 82 sd_journal* journal; in getMessages() local [all …]
|
/openbmc/linux/Documentation/filesystems/ext4/ |
H A D | journal.rst | 3 Journal (jbd2) 6 Introduced in ext3, the ext4 filesystem employs a journal to protect the 8 to 10,240,000 file system blocks (see man mke2fs(8) for more details on journal 12 cache, a record of the data being committed is also written to the journal. At 13 some later point in time, the journal code writes the transactions to their 16 crash during the second slow write, the journal can be replayed all the 18 gets written through the journal to the disk. The effect of this is to 23 through the journal. This means that file data blocks are /not/ 26 option to control journal behavior. If ``data=journal``, all data and 27 metadata are written to disk through the journal. This is slower but [all …]
|
/openbmc/linux/fs/ocfs2/ |
H A D | journal.c | 3 * journal.c 31 #include "journal.h" 62 static void ocfs2_queue_recovery_completion(struct ocfs2_journal *journal, 155 ocfs2_queue_recovery_completion(osb->journal, i, NULL, in ocfs2_queue_replay_slots() 294 struct ocfs2_journal *journal = NULL; in ocfs2_commit_cache() local 296 journal = osb->journal; in ocfs2_commit_cache() 298 /* Flush all pending commits and checkpoint the journal. */ in ocfs2_commit_cache() 299 down_write(&journal->j_trans_barrier); in ocfs2_commit_cache() 301 flushed = atomic_read(&journal->j_num_trans); in ocfs2_commit_cache() 304 up_write(&journal->j_trans_barrier); in ocfs2_commit_cache() [all …]
|
/openbmc/linux/include/linux/ |
H A D | jbd2.h | 24 #include <linux/journal-head.h> 105 typedef struct journal_s journal_t; /* Journal control structure */ 156 * field is used to store crc32c(uuid+commit_block). Each journal metadata 180 * The block tag: used to describe a single buffer in the journal. 183 * journal_tag_bytes(journal) instead to compute this. 216 /* Definitions for the journal tag flags word: */ 224 * The journal superblock. All fields are in big-endian byte order. 232 /* Static information describing the journal */ 233 __be32 s_blocksize; /* journal device blocksize */ 234 __be32 s_maxlen; /* total blocks in journal file */ [all …]
|
/openbmc/bmcweb/redfish-core/lib/ |
H A D | manager_logservices_journal.hpp | 14 #include <systemd/sd-journal.h> 44 boost::urls::format("/redfish/v1/Managers/{}/LogServices/Journal", in handleManagersLogServiceJournalGet() 46 asyncResp->res.jsonValue["Name"] = "Open BMC Journal Log Service"; in handleManagersLogServiceJournalGet() 47 asyncResp->res.jsonValue["Description"] = "BMC Journal Log Service"; in handleManagersLogServiceJournalGet() 48 asyncResp->res.jsonValue["Id"] = "Journal"; in handleManagersLogServiceJournalGet() 58 "/redfish/v1/Managers/{}/LogServices/Journal/Entries", in handleManagersLogServiceJournalGet() 64 std::unique_ptr<sd_journal, decltype(&sd_journal_close)> journal; member 80 // The Journal APIs unfortunately do blocking calls to the filesystem, and in readJournalEntries() 82 // implementation of sd-journal, which would be difficult, the best thing we in readJournalEntries() 106 if (!fillBMCJournalLogEntryJson(readState.journal.get(), in readJournalEntries() [all …]
|
/openbmc/linux/Documentation/admin-guide/device-mapper/ |
H A D | dm-integrity.rst | 12 To guarantee write atomicity, the dm-integrity target uses journal, it 13 writes sector data and integrity tags into a journal, commits the journal 29 instead of a journal. If a bit in the bitmap is 1, the corresponding 32 is faster than the journal mode, because we don't have to write the data 75 D - direct writes (without journal) 82 journal and atomicity is guaranteed. In case of crash, 90 R - recovery mode - in this mode, journal is not replayed, 101 The size of journal, this argument is used only if formatting the 119 The journal watermark in percents. When the size of the journal 120 exceeds this watermark, the thread that flushes the journal will [all …]
|
/openbmc/openpower-hw-diags/util/ |
H A D | ffdc.cpp | 11 * Parse systemd journal message field 13 * Parse the journal looking for the specified field and return the journal 16 * @param journal - The journal to parse 20 std::string sdjGetFieldValue(sd_journal* journal, const char* field) in sdjGetFieldValue() argument 26 if (0 == sd_journal_get_data(journal, field, (const void**)&data, &length)) in sdjGetFieldValue() 54 * Gather messages from the journal 56 * Fetch journal entry data for all entries with the specified field equal to 62 * @return Vector of journal entry data 67 sd_journal* journal; in sdjGetMessages() local 70 if (0 == sd_journal_open(&journal, SD_JOURNAL_LOCAL_ONLY)) in sdjGetMessages() [all …]
|
/openbmc/linux/include/trace/events/ |
H A D | jbd2.h | 16 TP_PROTO(journal_t *journal, int result), 18 TP_ARGS(journal, result), 26 __entry->dev = journal->j_fs_dev->bd_dev; 36 TP_PROTO(journal_t *journal, transaction_t *commit_transaction), 38 TP_ARGS(journal, commit_transaction), 47 __entry->dev = journal->j_fs_dev->bd_dev; 59 TP_PROTO(journal_t *journal, transaction_t *commit_transaction), 61 TP_ARGS(journal, commit_transaction) 66 TP_PROTO(journal_t *journal, transaction_t *commit_transaction), 68 TP_ARGS(journal, commit_transaction) [all …]
|
/openbmc/phosphor-dbus-monitor/src/ |
H A D | journal.hpp | 18 * @brief Journal callback implementation. 20 * The journal callback logs the client message and 21 * journal metadata key value pairs as specified by the 74 /** @class Journal 75 * @brief C++ type specific logic for the journal callback. 81 class Journal : public JournalBase class 84 Journal() = delete; 85 Journal(const Journal&) = delete; 86 Journal(Journal&&) = default; 87 Journal& operator=(const Journal&) = delete; [all …]
|
/openbmc/phosphor-power/phosphor-regulators/test/ |
H A D | mock_error_logging.hpp | 43 (Entry::Level severity, Journal& journal), (override)); 45 MOCK_METHOD(void, logDBusError, (Entry::Level severity, Journal& journal), 49 (Entry::Level severity, Journal& journal, 54 (Entry::Level severity, Journal& journal), (override)); 57 (Entry::Level severity, Journal& journal, PhaseFaultType type, 63 (Entry::Level severity, Journal& journal, 68 (Entry::Level severity, Journal& journal,
|
/openbmc/bmcweb/redfish-core/include/utils/ |
H A D | journal_utils.hpp | 6 #include <systemd/sd-journal.h> 16 inline int getJournalMetadata(sd_journal* journal, const char* field, in getJournalMetadata() argument 22 // Get the metadata from the requested field of the journal entry in getJournalMetadata() 26 ret = sd_journal_get_data(journal, field, dataVoid, &length); in getJournalMetadata() 37 inline int getJournalMetadataInt(sd_journal* journal, const char* field, in getJournalMetadataInt() argument 41 // Get the metadata from the requested field of the journal entry in getJournalMetadataInt() 42 int ret = getJournalMetadata(journal, field, metadata); in getJournalMetadataInt() 56 inline bool getEntryTimestamp(sd_journal* journal, std::string& entryTimestamp) in getEntryTimestamp() argument 60 ret = sd_journal_get_realtime_usec(journal, ×tamp); in getEntryTimestamp() 71 sd_journal* journal, nlohmann::json::object_t& bmcJournalLogEntryJson) in fillBMCJournalLogEntryJson() argument [all …]
|