This fix for this bug is currently in test and will be pushed shortly.

-Mark

Pawel Jakub Dawidek wrote:
> On Tue, Jul 22, 2008 at 08:56:31AM -0600, Mark Shellenbaum wrote:
>> Pawel Jakub Dawidek wrote:
>>> On Tue, Jul 22, 2008 at 04:28:45PM +0200, Pawel Jakub Dawidek wrote:
>>>> Hi.
>>>>
>>>> I just reproduced a problem I was chasing on FreeBSD also on
>>>> OpenSolaris from around 2008.01.
>>>>
>>>> Simply doing something like this:
>>>>
>>>>    write 9k of random data into 'foo' file
>>>>    truncate 'foo' file to 7k
>>>>    truncate 'foo' file to 11k
>>>>    read data between 7k-9k
>>>>
>>>> There should be all zeros between 7k-9k, but there is previous data.
>>>> It worked fine on an older ZFS versions (I'm sure it works on version 6).
>>>>
>>>> Simple test program:
>>> [...]
>>>
>> Thanks for reporting this.
>>
>> I've opened bug:
>>
>> 6728399 ftruncate(2) broken on ZFS
> 
> I went a bit further trying to find out what's going on. This is the
> change responsible for the problem: 20c04e18c58cfb135a135c0126c7d69f6078e1b5.
> 
> In the dnode_free_range() function you can find this condition:
> 
>       [...]
>       } else if (off > blkid) {
>               /* Freeing past end-of-data */
>               goto out;
>       [...]
> 
> Unfortunately blkid is uninitialized at this point, so it can't be
> right. I tried to change it to 'blksz', but it panics further.
> 
> I hope this helps. This is one of the last issues that holds back
> integration of the most recent ZFS into FreeBSD tree, so we would be
> very grateful if you guys could look into this.
> 
> Thanks in advance!
> 

Reply via email to