Skip to contentSkip to conversation

Does Reiser3 really support data=journal mode?

DISCUSSION Jan Kara 2 participants 5 messages Apr 22, 2008 – Apr 23, 2008

lore
Share & tools
lore

Jan Kara

author
#0 lore raw

Hello,

I've just looked into the Reiserfs code in 2.6.25 kernel and from the code
it seems as data=journal mode isn't really handled any specially from data=writeback mode. So does Reiserfs really support journaling of data? If no, then we should remove the mount option. If yes, then I really wonder where is the distinction from data=writeback mode... Thanks for an answer in advance.

Honza

PS: I'm looking into this because I'm fixing some problems with quota when journaling data so I'd like to fix Reiserfs as well in case it's affected.

--
Jan Kara <[email protected]>
SUSE Labs, CR

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 8 lines · Jan Kara

Hello,

I've just looked into the Reiserfs code in 2.6.25 kernel and from the code
it seems as data=journal mode isn't really handled any specially from data=writeback mode. So does Reiserfs really support journaling of data? If no, then we should remove the mount option. If yes, then I really wonder where is the distinction from data=writeback mode... Thanks for an answer in advance.

Check out reiserfs_commit_page() for the code where it is attached to a transaction. Then it's handled identically to dirty metadata when the transaction is committed.

- -Jeff

- --
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFIDi8qLPWxlyuTD7IRAgd3AJ4h6aJRexiVTVC5ykRsqnRIwjdT9QCfcgRV oOXg9E+0h01zCQ5XjZQWJ24=
=wHK4
-----END PGP SIGNATURE-----

author
#2 lore raw
Quoted 13 lines · Jeff Mahoney

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 8 lines · Jan Kara

Hello,

I've just looked into the Reiserfs code in 2.6.25 kernel and from the code
it seems as data=journal mode isn't really handled any specially from data=writeback mode. So does Reiserfs really support journaling of data? If no, then we should remove the mount option. If yes, then I really wonder where is the distinction from data=writeback mode... Thanks for an answer in advance.

Quoted 3 lines

Check out reiserfs_commit_page() for the code where it is attached to a transaction. Then it's handled identically to dirty metadata when the transaction is committed.

Ah, I see, thanks. I was grepping for "reiserfs_data_log" but there is
"reiserfs_file_data_log" which I completely missed.
Maybe you can help me with my original problem :) - I have a file (quota
file) and I need to make sure that all the dirty data and metadata of that file is on disk in its final locations (i.e., not only in journal). Will just starting an auxiliary transaction and then doing
do_journal_end(th, sb, 1, FLUSH_ALL)

do the work as I think? Thanks.

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#3 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 24 lines · Jan Kara
Quoted 12 lines · Jeff Mahoney

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 8 lines · Jan Kara

Hello,

I've just looked into the Reiserfs code in 2.6.25 kernel and from the code
it seems as data=journal mode isn't really handled any specially from data=writeback mode. So does Reiserfs really support journaling of data? If no, then we should remove the mount option. If yes, then I really wonder where is the distinction from data=writeback mode... Thanks for an answer in advance.

Quoted 3 lines

Check out reiserfs_commit_page() for the code where it is attached to a transaction. Then it's handled identically to dirty metadata when the transaction is committed.

Ah, I see, thanks. I was grepping for "reiserfs_data_log" but there is
"reiserfs_file_data_log" which I completely missed.
Maybe you can help me with my original problem :) - I have a file (quota
file) and I need to make sure that all the dirty data and metadata of that file is on disk in its final locations (i.e., not only in journal). Will just starting an auxiliary transaction and then doing
do_journal_end(th, sb, 1, FLUSH_ALL)

Quoted 1 line

do the work as I think? Thanks.

Are you sure that's what you want? That will essentially make quota operations sync events. If it's in the journal and the system crashes, then it will be flushed out to the file system on journal replay anyway.

- -Jeff

- --
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFIDzafLPWxlyuTD7IRAmp8AJ9qgewSiH/dHiCSfIkf1npHH9NkWwCgnE/2 iJEBJijZXnMwKesZ5TP+ckE=
=TLOA
-----END PGP SIGNATURE-----

author
#4 lore raw
Quoted 28 lines · Jeff Mahoney

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 24 lines · Jan Kara
Quoted 12 lines · Jeff Mahoney

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 8 lines · Jan Kara

Hello,

I've just looked into the Reiserfs code in 2.6.25 kernel and from the code
it seems as data=journal mode isn't really handled any specially from data=writeback mode. So does Reiserfs really support journaling of data? If no, then we should remove the mount option. If yes, then I really wonder where is the distinction from data=writeback mode... Thanks for an answer in advance.

Quoted 3 lines

Check out reiserfs_commit_page() for the code where it is attached to a transaction. Then it's handled identically to dirty metadata when the transaction is committed.

Ah, I see, thanks. I was grepping for "reiserfs_data_log" but there is
"reiserfs_file_data_log" which I completely missed.
Maybe you can help me with my original problem :) - I have a file (quota
file) and I need to make sure that all the dirty data and metadata of that file is on disk in its final locations (i.e., not only in journal). Will just starting an auxiliary transaction and then doing
do_journal_end(th, sb, 1, FLUSH_ALL)

Quoted 5 lines
Quoted 1 line

do the work as I think? Thanks.

Are you sure that's what you want? That will essentially make quota operations sync events. If it's in the journal and the system crashes, then it will be flushed out to the file system on journal replay anyway.

I need this only during quotaon and that is one-time event so performance
doesn't really matter. The problem is that userspace could have modified quota files and we need to see all the changes. And we bypass page-cache when reading quota files (we use block device's buffer cache directly) so at the time of quotaon, we need to get all the data to their final location on disk...

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR