xfs
[Top] [All Lists]

Re: [PATCH] xfs_repair: fix max block offset test

To: Brian Foster <bfoster@xxxxxxxxxx>
Subject: Re: [PATCH] xfs_repair: fix max block offset test
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Thu, 18 Dec 2014 10:43:03 -0600
Cc: xfs-oss <xfs@xxxxxxxxxxx>, Eryu Guan <eguan@xxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20141218151835.GC13471@xxxxxxxxxxxxxx>
References: <5489DA3B.5050908@xxxxxxxxxx> <20141218151835.GC13471@xxxxxxxxxxxxxx>
On 12/18/14 9:18 AM, Brian Foster wrote:

> Thought this looked familiar:
> 
> http://oss.sgi.com/archives/xfs/2014-09/msg00524.html

oh, whoops.  let me go read that, sorry!

-Eric

> Either one is fine with me. If we use the fix below, I think we should
> update the error message since it technically refers to the extent
> offset and we slightly tweak the meaning of the failure.
> 
> Brian
> 
>>
>> diff --git a/repair/dinode.c b/repair/dinode.c
>> index 38a6562..ca57a61 100644
>> --- a/repair/dinode.c
>> +++ b/repair/dinode.c
>> @@ -667,7 +667,9 @@ _("inode %" PRIu64 " - bad extent overflows - start %" 
>> PRIu64 ", "
>>                                      irec.br_startoff);
>>                              goto done;
>>              }
>> -            if (irec.br_startoff >= fs_max_file_offset)  {
>> +            /* Ensure this extent does not extend beyond the max offset */
>> +            if (irec.br_startoff + irec.br_blockcount - 1 >
>> +                                                    fs_max_file_offset) {
>>                      do_warn(
>>  _("inode %" PRIu64 " - extent offset too large - start %" PRIu64 ", "
>>    "count %" PRIu64 ", offset %" PRIu64 "\n"),
>>
>> _______________________________________________
>> xfs mailing list
>> xfs@xxxxxxxxxxx
>> http://oss.sgi.com/mailman/listinfo/xfs

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