From: NeilBrown <mr@neil.brown.name>
To: "Étienne Buira" <etienne.buira@gmail.com>, linux-raid@vger.kernel.org
Subject: Re: Probable bug in md with rdev->new_data_offset
Date: Fri, 01 Apr 2016 16:31:28 +1100 [thread overview]
Message-ID: <877fghrj2n.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <20160329110750.GA2529@rcKGHUlyQfVFW>
[-- Attachment #1: Type: text/plain, Size: 1635 bytes --]
On Tue, Mar 29 2016, Étienne Buira wrote:
> Sorry, forgot to reply to list as well, resending for completeness.
>
> On Mon, Mar 28, 2016 at 08:19:12AM -0400, Phil Turmel wrote:
>> On 03/28/2016 06:31 AM, Étienne Buira wrote:
>
> ../..
>
>> > After printking the values for rdev->new_data_offset and
>> > rdev->data_offset in the
>> > if (rdev->new_data_offset != rdev->data_offset) { ...
>> > block of super_1_sync, i found that new_data_offset (252928 in my case)
>> > where smaller than data_offset (258048), thus, the substraction to
>> > compute sb->new_data_offset yielded an insanely high value.
>>
>> Modern mdadm and kernels avoid the use of backup files by adjusting the
>> data offset. The lowered offset you see is normal.
>>
>> I suspect the grsecurity kernels haven't kept up with this. If you can
>> reproduce a problem with a vanilla kernel, please report back here.
>> Otherwise you'll have to report to your kernel provider.
>>
>> Phil
>
> Hi,
>
> Thank you for the answer.
>
> I tried to reproduce the case with vanilla 4.4.6, but couldn't enter the
> above said 'if', so i'm giving up on this topic.
>
> However, i'm still surprised that sb->new_offset gets assigned a
> 'negative' (well, high, because it is computed unsigned) value.
>
I guess sb->new_offset should be called sb->delta_offset. If you look
in md_p.h you will see:
__le32 new_offset; /* signed number to add to data_offset in new
* layout. 0 == no-change. This can be
* different on each device in the array.
*/
which goes some way to explaining the situation.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
next prev parent reply other threads:[~2016-04-01 5:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-28 10:31 Probable bug in md with rdev->new_data_offset Étienne Buira
2016-03-28 12:19 ` Phil Turmel
2016-03-29 11:07 ` Étienne Buira
2016-04-01 5:31 ` NeilBrown [this message]
2016-04-01 6:15 ` Étienne Buira
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=877fghrj2n.fsf@notabene.neil.brown.name \
--to=mr@neil.brown.name \
--cc=etienne.buira@gmail.com \
--cc=linux-raid@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).