On 07.06.2012 15:54, Jean-Pierre André wrote:
> Hi,
> 
> Bogdan wrote:
>> On 06.06.2012 16:40, Jean-Pierre André wrote:
>>   
>>> Hi,
>>>
>>> I suspect problems while running ntfswipe with the new
>>> options :
>>>
>>> With option -s, I got no output after four minutes, with
>>> the cpu used at 100%. Is it normal, should I wait longer ?
>>>
>>> With option -t, I got internal errors on compressed files.
>>> (details on an x86_64 attached).
>>>
>>> The same test on big-endian computers hangs on inode
>>> 131 without outputting the error.
>>>
>>> Can you check what is going on ?
>>>      
>>   First problem fixed. Patterns are now de-selected when all have been
>> used.
>>    
> 
> Still running a long time.
> 
> There is something wrong with unallocated clusters :
> 
> When starting the following loop in destroy_record :
> 
> for (j = rl[i].lcn; (j < rl[i].lcn + rl[i].length) && (ret_wfs == 0);
> j++)
> 
> I get  j -1 lcn 0xffffffffffffffff length 1953125000000
> 
> This is bound to take a long time, and lcn == -1 means
> unallocated.
> 
>>   About the second problem: apply the attached patch over the previous
>> one and check if the internal errors have the "Extents:" comment in
>> front. If no, then this is not a problem of my patch. If yes, then
>> it's hard to say. I'm doing everything the same way as above
>>    
> 
> Yes : all internal errors have the Extents marker.
> 
>> (non-extents), but perhaps I don't know something that you know
>> (perhaps extents should be treated in a different way?). Does the
>> erroneous function (ntfs_attr_map_whole_runlist) work on extents in
>> compressed files in other places?
>>    
> 
> Apparently you open partial attributes, so you cannot map
> the whole runlist. This can only be used for the initial extent,
> and it gets all the extents.
> 
>>   How can I create a compressed file to check this on my system?
>>    
> 
> See
> http://www.tuxera.com/community/ntfs-3g-advanced/data-compression/
> and
> http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/#ntfsattributes

 Can't replicate this. I'm creating the filesystem as follows:

dd if=/dev/zero of=../../dysk_ntfs bs=1M count=20
chown bogdan:bogdan ../../dysk_ntfs
/sbin/mkfs.ntfs -F ../../dysk_ntfs
[ ! -d /home/bogdan/siemens/ ] && mkdir /home/bogdan/siemens/


mount -o loop,compression ../../dysk_ntfs -t ntfs-fuse
/home/bogdan/siemens/                                           && \
cp ../../test-* /home/bogdan/siemens/                   && \
mkdir /home/bogdan/siemens/dir1                         && \
setfattr -h -v 0x00080000 -n system.ntfs_attrib
/home/bogdan/siemens/dir1                                               && \
cp ../../test-* /home/bogdan/siemens/dir1               && \
md5sum /home/bogdan/siemens/t*
rm -f /home/bogdan/siemens/test-D
rm -f /home/bogdan/siemens/dir1/test-D
umount /home/bogdan/siemens/


(line breaks in the interesting part should be only after "&& \").
 There are 5 test-* files of different length. All are put in the root
directory and in the "dir1" subdirectory, which should be compressed.
After that, test-D is removed from both directories (for testing of
wiping he undelete data), the rest of the files remain untouched.

 I'm getting the MD5 sums on the terminal, so all commands before it
have succeeded. I'm running
        ntfswipe -v -s dysk_ntfs
        ntfswipe -v -t dysk_ntfs
        ntfswipe -v -b 1 -s dysk_ntfs
        ntfswipe -v -b 1 -t dysk_ntfs

 Nothing hangs, no internal errors. Does it work if you put

        if ( rl[i].lcn == -1 )
        {
                continue;
        }

 right after the "for" loop start and

        if ( ext_ino_num == 0 )
        {
                if (ntfs_attr_map_whole_runlist(na)) {
                        ntfs_log_verbose("Extents: Internal error\n");
                        ntfs_log_error("Extents: Can't map      
                                ntfs_runlist (inode %lld)\n",
                                ni->extent_nis[ext_ino_num]);
                        goto close_attr2;
                }
        }

 around the "if" with ntfs_attr_map_whole_runlist()?

 Did I understand you correctly that the first call of
ntfs_attr_map_whole_runlist() gets everything, so there is no need to
call it for each extent in the loop? Or shouldn't this be called at
all in the loop, because the extents have already been attached before?

-- 
Pozdrawiam/Regards - Bogdan                     (GNU/Linux & FreeDOS)
Kurs asemblera x86 (DOS, GNU/Linux):http://rudy.mif.pg.gda.pl/~bogdro
Grupy dyskusyjne o asm:  pl.comp.lang.asm alt.pl.asm alt.pl.asm.win32
www.Xiph.org   www.TorProject.org   Soft (EN): miniurl.pl/bogdro-soft



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to