From: "Vladimir V. Saveliev" <vs@namesys.com>
To: Linux Tard <linuxtard@yahoo.com>
Cc: reiserfs-list@namesys.com, Chris Mason <mason@suse.com>,
Jeff Mahoney <jeffm@suse.com>
Subject: Re: Trying to mount ReiserFS file system read only results in change
Date: Tue, 20 Dec 2005 15:05:52 +0300 [thread overview]
Message-ID: <43A7F3A0.6010004@namesys.com> (raw)
In-Reply-To: <20051219193157.70430.qmail@web34610.mail.mud.yahoo.com>
[-- Attachment #1: Type: text/plain, Size: 2283 bytes --]
Hello
Linux Tard wrote:
> Hi Vladimir,
>
> Thank you again for replies.
>
>
>
> --- "Vladimir V. Saveliev" <vs@namesys.com> wrote:
>>reiserfs has to replay journal before it can access
>>any data. Even if it is
>>mounting readonly. Journal replay code does not
>>distinguish whether filesystem
>>is being mounted read-only or not. So, it just
>>replays journal and updates few
>>counters. If filesystem was umounted clean - no
>>transactions are replayed, but
>>counters still get updated.
>
> Thank you for informational reply here. This makes
> sense, and we will note the reply, but in some
> industry mounting read-only means truly read only with
> nothing changed. Computer forensics, one example. If
> we want to preview the file system before we acquire
> we must mount read-only. But journal increment
> changes data, minimal as it is, the authentication no
> longer matches and opposing counsel swoop in like
> vultures.
>
Yes, this is known problem, I remember that it was discussed some time ago, but
I do not rememeber that there was found any reasonable solution. There was an
idea to keep journal replay changes in memory when mounting readonly, but I do
not think that it has even been implemented.
>
>>>and ultimately C) is there something
>>>else besides changing source code to stop this?
>>>
>>Please send your patch so that we could see first
>>what you have done already.
>>
>
> What we have done is change two lines in kernel
> source, fs/reiserfs/journal.c from;
>
> SB_JOURNAL(p_s_sb)->j_mount_id =
> le32_to_cpu(jh->j_mount_id) + 1;
> } else {
> SB_JOURNAL(p_s_sb)->j_mount_id = newest_mount_id + 1
> ;
>
>
> to;
>
> SB_JOURNAL(p_s_sb)->j_mount_id =
> le32_to_cpu(jh->j_mount_id) + 0;
> } else {
> SB_JOURNAL(p_s_sb)->j_mount_id = newest_mount_id + 0
> ;
>
I do not think that this is a good way.
>
> This has work for us - when we mount using this kernel
> ReiserFS file systems do not change - the
> authentication pre and post are equivalent.
>
> We would never mount a ReiserFS file system we wish to
> write to with this kernel, only those we preview.
>
> It would be nice to have a mount option that would not
> increment journal count instead of going this kernel
> route.
>
I would propose the following patch.
[-- Attachment #2: reiserfs-dont-update-journla-header-mounting-readonly.patch --]
[-- Type: text/plain, Size: 867 bytes --]
This patch makes reiserfs to avoid journal header update when filesystem is being mounted readonly.
fs/reiserfs/journal.c | 1 +
1 files changed, 1 insertion(+)
diff -puN fs/reiserfs/journal.c~reiserfs-dont-update-journla-header-mounting-readonly fs/reiserfs/journal.c
--- linux-2.6.15-rc5-mm3/fs/reiserfs/journal.c~reiserfs-dont-update-journla-header-mounting-readonly 2005-12-20 13:09:28.000000000 +0300
+++ linux-2.6.15-rc5-mm3-vs/fs/reiserfs/journal.c 2005-12-20 13:10:51.000000000 +0300
@@ -2458,6 +2458,7 @@ static int journal_read(struct super_blo
replay_count, get_seconds() - start);
}
if (!bdev_read_only(p_s_sb->s_bdev) &&
+ !(p_s_sb->s_flags & MS_RDONLY) &&
_update_journal_header_block(p_s_sb, journal->j_start,
journal->j_last_flush_trans_id)) {
/* replay failed, caller must call free_journal_ram and abort
_
next prev parent reply other threads:[~2005-12-20 12:05 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-14 15:21 Reiserfsck can't fix FS Thomas Raschbacher
2005-10-14 16:08 ` Vitaly Fertman
2005-10-16 17:40 ` Thomas Raschbacher
2005-10-16 23:37 ` evilninja
2005-10-17 19:34 ` michael chang
2005-10-19 11:27 ` Thomas Raschbacher
2005-10-19 20:17 ` evilninja
[not found] ` <b14e81f00510201255x3ee436afveb8222f43f69f8a@mail.gmail.com>
2005-12-11 7:21 ` Thomas Raschbacher
2005-12-12 18:22 ` Bedros Hanounik
2005-12-12 22:15 ` michael chang
[not found] ` <f18a8d980512121454q5170cc19i31c9aa3d653226fe@mail.gmail.com>
2005-12-15 12:09 ` Reiserfsck can't fix FS - part 2 Thomas Raschbacher
2005-12-15 12:21 ` Raymond A. Meijer
2005-12-15 13:34 ` Vladimir V. Saveliev
2005-12-15 20:24 ` Thomas Raschbacher
2005-12-16 7:43 ` Vladimir V. Saveliev
2005-12-16 15:14 ` Thomas Raschbacher
2005-12-19 9:33 ` Vladimir V. Saveliev
2005-12-20 7:24 ` Thomas Raschbacher
2005-12-20 8:14 ` Vladimir V. Saveliev
2005-12-22 13:55 ` Thomas Raschbacher
2005-12-22 14:38 ` Vladimir V. Saveliev
2005-12-23 14:29 ` Thomas Raschbacher
2005-12-28 0:48 ` Thomas Raschbacher
2005-12-19 0:37 ` Trying to mount ReiserFS file system read only results in change Linux Tard
2005-12-19 8:08 ` Vladimir V. Saveliev
2005-12-19 14:24 ` Linux Tard
2005-12-19 15:57 ` Vladimir V. Saveliev
2005-12-19 19:31 ` Linux Tard
2005-12-20 12:05 ` Vladimir V. Saveliev [this message]
2005-12-22 20:43 ` Linux Tard
2005-12-23 15:03 ` Vladimir V. Saveliev
2005-12-24 16:55 ` Linux Tard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43A7F3A0.6010004@namesys.com \
--to=vs@namesys.com \
--cc=jeffm@suse.com \
--cc=linuxtard@yahoo.com \
--cc=mason@suse.com \
--cc=reiserfs-list@namesys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.