On 08.06.2012 15:07, Jean-Pierre André wrote: > Hi, > > Bogdan wrote: >> 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 >> > > How can you check the wiping, if you clear the partition > initially ? Should you not use if=/dev/random ?
I'm using specified bytes (not zero) for wiping and search the
filesystem for my patterns using a hex editor or grep.
[...]
> Maybe you retry with a bigger text file which can be compressed
> and requires several extents (several MB).
> Also make sure the compression is effective by comparing the
> results of :
>
> du /home/bogdan/siemens/t*
> and
> du --apparent-size /home/bogdan/siemens/t*
du -hs /home/bogdan/siemens/dir1/*
512 /home/bogdan/siemens/dir1/test-A
512 /home/bogdan/siemens/dir1/test-B
512 /home/bogdan/siemens/dir1/test-C
512 /home/bogdan/siemens/dir1/test-E
124K /home/bogdan/siemens/dir1/test-F
du -hs --apparent-size /home/bogdan/siemens/dir1/*
59 /home/bogdan/siemens/dir1/test-A
99 /home/bogdan/siemens/dir1/test-B
237 /home/bogdan/siemens/dir1/test-C
30 /home/bogdan/siemens/dir1/test-E
2,0M /home/bogdan/siemens/dir1/test-F
Still works for me.
I'm on a x86-32, perhaps I missed a call to xx_to_cpu() somewhere,
but I don't see where.
> Also, did you check the behavior on sparse files ?
Just did. Nothing hangs, no internal errors.
>> Does it work if you put
>>
>> if ( rl[i].lcn == -1 )
>> {
>> continue;
>> }
>>
>> right after the "for" loop start and
>>
>
> With this, I can get to the end (but I have not checked
> whether the expected wiping is fully done).
OK.
>> 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()?
>>
>
> Not fully, I still get an error :
>
> Extents: Can't map ntfs_runlist (inode 22865232)
>
> (and of course, there are fewer than 22865232 nodes
> on this partition).
The displayed value was a pointer, fixed now. Apply over previous
patches.
>> Did I understand you correctly that the first call of
>> ntfs_attr_map_whole_runlist() gets everything, so there is no need to
>>
>
> Yes, you should get the full runlist.
>
>> 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?
>>
>
> I cannot answer that, I have not analyzed the purpose of
> your loop. Also note that extents may have a smaller number
> than the initial inode.
The loop should take (and wipe) the data attribute of each extent.
My question was: is it enough to call
ntfs_inode_attach_all_extents(ni)? Should I call
ntfs_attr_map_whole_runlist(na) just on the first data attribute?
Should I call ntfs_attr_map_whole_runlist(na) for each attribute?
The second and third solutions cause the internal errors to happen.
--
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
ntfs-fix-ntfswipe-v4.diff.gz
Description: GNU Zip compressed data
------------------------------------------------------------------------------ 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
