xfs
[Top] [All Lists]

Re: [REVIEW #3] bad_features2 support in user-space

To: Barry Naujok <bnaujok@xxxxxxx>
Subject: Re: [REVIEW #3] bad_features2 support in user-space
From: Nathan Scott <nscott@xxxxxxxxxx>
Date: Fri, 29 Feb 2008 16:33:58 +1100
Cc: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
In-reply-to: <op.t69rt3bp3jf8g2@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Organization: Aconex
References: <op.t69rt3bp3jf8g2@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: nscott@xxxxxxxxxx
Sender: xfs-bounce@xxxxxxxxxxx
On Fri, 2008-02-29 at 15:52 +1100, Barry Naujok wrote:
> Ok, xfs_repair will leave bad_features2 in place just in case it is
> being run with an older kernel that expects features2 in the bad
> location. But, it will make sure the correct and bad features2 are
> consistent if bad_features2 in non-zero.
> 
> If bad_features2 is zero, it is left alone (eg. new mkfs or new
> kernel with fixes it during mount time).
> 
> This seems to be the best solution to the problem.
> 

*nod* - looks good to me...

> +     if (sb->sb_bad_features2 != 0 &&
> +                     sb->sb_bad_features2 != sb->sb_features2) {
> +             sb->sb_features2 |= sb->sb_bad_features2;
> +             sb->sb_bad_features2 = sb->sb_features2;
> +             primary_sb_modified = 1;

No endian issues here are there?  It looks OK, but you tested it right?
(looked at what a little endian system writes ondisk?)

cheers.

-- 
Nathan


<Prev in Thread] Current Thread [Next in Thread>