All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: Jeff Mahoney <jeffm@suse.com>
Cc: ReiserFS Mailing List <reiserfs-devel@vger.kernel.org>
Subject: Re: [PATCH] reiserfs: implement basic reiserfs 3.7
Date: Tue, 30 Nov 2010 01:31:54 +0100	[thread overview]
Message-ID: <4CF445FA.7090101@gmail.com> (raw)
In-Reply-To: <4CF408BF.8080309@suse.com>

Jeff Mahoney wrote:
> On 11/26/2010 10:34 PM, Edward Shishkin wrote:
> > Jeff Mahoney wrote:
> >>  This patch contains the basic implementation for reiserfs 3.7.
>
> >> +int has_nonstandard_journal(struct reiserfs_super_block *rs)
> >> +{
> >> +    return is_reiserfs_jr(rs) ||
> >> +           (is_reiserfs_3_7(rs) && rs->s_v1.s_journal.jp_journal_dev);
> >>  }
> >>  
> >>   
> > Actually the function above is brain damaged.
> > Journal is non-standard _iff_ it is "relocated" or has length (excluding
> > journal
> > header) different from 8192. So it can happen that a partition is
> "jr" (with
> > REISER2FS_JR_SUPER_MAGIC_STRING), but has _standard_ journal.
>
> Ok. I was under the impression that reiserfs_jr implied a nonstandard
> journal. I guess that's mistaken.

IMHO the trick is that there are "super-magics" and "super-formats"
(it is not the same).
JR_SUPER_MAGIC_STRING indicates some super-format 3.X (X = 5, 6,...)
with "possibly non-standard journal".

By default mkfs installs 3_X_SUPER_MAGIC_STRING (X = 5, 6,...).
In particular, such magic string indicates that your journal is
"untouched" (valid).
JR_SUPER_MAGIC_STRING is set by mkfs when specifying non-standard
journal parameters, or by reiserfstune when changing journal
parameters. If JR_SUPER_MAGIC_STRING is set, then actual super-format
(3.X) is located at special field sb_version.
Once JR_SUPER_MAGIC_STRING is installed, you must check journal magic
in mount time, as your journal can be invalid (replaying invalid
journal is disaster).

So I guess we need two things:
1) REISERFS_3_7_SUPER_MAGIC_STRING
2) REISERFS_FORMAT_3_7.
Next version of reiserfsprogs (3.6.22, I guess) will install
REISERFS_3_7_SUPER_MAGIC_STRING by default. Also we need to make sure
that correct super-format is installed to sb_version when updating to
JR_SUPER_MAGIC_STRING.

> It seems to me that the only thing
> wrong with the patch is the dev check and the name of the function.

I think, we don't need to change things with "jr" at all: the property to be
"jr" is common for all 3.x

> Perhaps it should be may_have_nonstandard_journal().

is_reiserfs_jr() means exactly "may have non-standard journal"
for all 3.x

> The idea wasn't to
> identify nonstandard journals but to extend the existing jr checks to
> include 3.7 checks as well.
>
> -Jeff
>


  reply	other threads:[~2010-11-30  0:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-20 16:06 [PATCH] reiserfs: implement basic reiserfs 3.7 Jeff Mahoney
2010-11-27  3:34 ` Edward Shishkin
2010-11-29 20:10   ` Jeff Mahoney
2010-11-30  0:31     ` Edward Shishkin [this message]
2010-11-30  2:11   ` Edward Shishkin
2010-12-08 13:13 ` doiggl
2010-12-09 15:57   ` Jeff Mahoney

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=4CF445FA.7090101@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=jeffm@suse.com \
    --cc=reiserfs-devel@vger.kernel.org \
    /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.