Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ec07c5c1
Commit
ec07c5c1
authored
Feb 10, 2003
by
Andrew Morton
Committed by
Linus Torvalds
Feb 10, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] ext3 commenting cleanup
Redo the (strange) layout of some of Roger's comments.
parent
b9df0268
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
22 deletions
+18
-22
fs/jbd/recovery.c
fs/jbd/recovery.c
+6
-10
fs/jbd/transaction.c
fs/jbd/transaction.c
+12
-12
No files found.
fs/jbd/recovery.c
View file @
ec07c5c1
...
@@ -212,16 +212,14 @@ do { \
...
@@ -212,16 +212,14 @@ do { \
*
*
* The primary function for recovering the log contents when mounting a
* The primary function for recovering the log contents when mounting a
* journaled device.
* journaled device.
*/
*
int
journal_recover
(
journal_t
*
journal
)
{
/*
* Recovery is done in three passes. In the first pass, we look for the
* Recovery is done in three passes. In the first pass, we look for the
* end of the log. In the second, we assemble the list of revoke
* end of the log. In the second, we assemble the list of revoke
* blocks. In the third and final pass, we replay any un-revoked blocks
* blocks. In the third and final pass, we replay any un-revoked blocks
* in the log.
* in the log.
*/
*/
int
journal_recover
(
journal_t
*
journal
)
{
int
err
;
int
err
;
journal_superblock_t
*
sb
;
journal_superblock_t
*
sb
;
...
@@ -273,15 +271,13 @@ int journal_recover(journal_t *journal)
...
@@ -273,15 +271,13 @@ int journal_recover(journal_t *journal)
* journal structures in memory to ignore it (presumably because the
* journal structures in memory to ignore it (presumably because the
* caller has evidence that it is out of date).
* caller has evidence that it is out of date).
* This function does'nt appear to be exorted..
* This function does'nt appear to be exorted..
*/
*
int
journal_skip_recovery
(
journal_t
*
journal
)
{
/*
* We perform one pass over the journal to allow us to tell the user how
* We perform one pass over the journal to allow us to tell the user how
* much recovery information is being erased, and to let us initialise
* much recovery information is being erased, and to let us initialise
* the journal transaction sequence numbers to the next unused ID.
* the journal transaction sequence numbers to the next unused ID.
*/
*/
int
journal_skip_recovery
(
journal_t
*
journal
)
{
int
err
;
int
err
;
journal_superblock_t
*
sb
;
journal_superblock_t
*
sb
;
...
...
fs/jbd/transaction.c
View file @
ec07c5c1
...
@@ -862,22 +862,23 @@ int journal_get_undo_access (handle_t *handle, struct buffer_head *bh)
...
@@ -862,22 +862,23 @@ int journal_get_undo_access (handle_t *handle, struct buffer_head *bh)
}
}
/**
/**
* int journal_dirty_data() - mark a buffer as containing dirty data which needs to be flushed before we can commit the current transaction.
* int journal_dirty_data() - mark a buffer as containing dirty data which
* needs to be flushed before we can commit the
* current transaction.
* @handle: transaction
* @handle: transaction
* @bh: bufferhead to mark
* @bh: bufferhead to mark
*
*
* The buffer is placed on the transaction's data list and is marked as
* The buffer is placed on the transaction's data list and is marked as
* belonging to the transaction.
* belonging to the transaction.
*
*
* Returns error number or 0 on success.
* Returns error number or 0 on success.
*/
*
int
journal_dirty_data
(
handle_t
*
handle
,
struct
buffer_head
*
bh
)
{
/*
* journal_dirty_data() can be called via page_launder->ext3_writepage
* journal_dirty_data() can be called via page_launder->ext3_writepage
* by kswapd. So it cannot block. Happily, there's nothing here
* by kswapd. So it cannot block. Happily, there's nothing here
* which needs lock_journal if `async' is set.
* which needs lock_journal if `async' is set.
*/
*/
int
journal_dirty_data
(
handle_t
*
handle
,
struct
buffer_head
*
bh
)
{
journal_t
*
journal
=
handle
->
h_transaction
->
t_journal
;
journal_t
*
journal
=
handle
->
h_transaction
->
t_journal
;
int
need_brelse
=
0
;
int
need_brelse
=
0
;
struct
journal_head
*
jh
;
struct
journal_head
*
jh
;
...
@@ -1022,23 +1023,22 @@ int journal_dirty_data (handle_t *handle, struct buffer_head *bh)
...
@@ -1022,23 +1023,22 @@ int journal_dirty_data (handle_t *handle, struct buffer_head *bh)
* @handle: transaction to add buffer to.
* @handle: transaction to add buffer to.
* @bh: buffer to mark
* @bh: buffer to mark
*
*
* mark dirty metadata which needs to be journaled as part of the current transaction.
* mark dirty metadata which needs to be journaled as part of the current
* transaction.
*
*
* The buffer is placed on the transaction's metadata list and is marked
* The buffer is placed on the transaction's metadata list and is marked
* as belonging to the transaction.
* as belonging to the transaction.
*
*
* Returns error number or 0 on success.
* Returns error number or 0 on success.
*/
*
int
journal_dirty_metadata
(
handle_t
*
handle
,
struct
buffer_head
*
bh
)
{
/*
* Special care needs to be taken if the buffer already belongs to the
* Special care needs to be taken if the buffer already belongs to the
* current committing transaction (in which case we should have frozen
* current committing transaction (in which case we should have frozen
* data present for that commit). In that case, we don't relink the
* data present for that commit). In that case, we don't relink the
* buffer: that only gets done when the old transaction finally
* buffer: that only gets done when the old transaction finally
* completes its commit.
* completes its commit.
*
*/
*/
int
journal_dirty_metadata
(
handle_t
*
handle
,
struct
buffer_head
*
bh
)
{
transaction_t
*
transaction
=
handle
->
h_transaction
;
transaction_t
*
transaction
=
handle
->
h_transaction
;
journal_t
*
journal
=
transaction
->
t_journal
;
journal_t
*
journal
=
transaction
->
t_journal
;
struct
journal_head
*
jh
=
bh2jh
(
bh
);
struct
journal_head
*
jh
=
bh2jh
(
bh
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment