Hi again,
Bogdan wrote:
> On 09.06.2012 19:22, Jean-Pierre André wrote:
>
>> To be precise, a big-endian computer chokes before
>> reaching that point, but while processing the same
>> inode (131, which 197 is a part of).
>>
> That's bad. Even if I'm doing something very wrong, the library
> should manage to at least return an error.
>
Actually it does, it was a matter of configuring the
log levels.
[...]
> From all this, I'm beginning to think that my change is not needed.
> The first call to ntfs_attr_map_whole_runlist() (before "close_attr:")
> should read the whole attribute, no matter how many extents it is in,
> right? If so, the first calls to wipe_compressed_attribute() or
> wipe_attribute() will wipe the tail before reaching the "close_attr:"
> point, so searching for and wiping the extents is not needed. Is this
> correct? Seems to work even for the "big" file (I can see my marker
> bytes after the content).
>
Most likely, the wiping is fully done while examining the
base inode.
There are (at least) two errors in may previous email :
- at the end of the loop you should do
if (rlc->lcn == LCN_HOLE) restart = rlc + 1;
- though in a loop, the tail wiping is only done once,
so it is ok.
And this is the profiling diff when the suggested modification
is applied :
1931c1931
< Time used by program : 2868.637ms on a virtual 1GHz CPU
---
> Time used by program : 35.976ms on a virtual 1GHz CPU
1934,1953c1934,1953
< Function ntfs_rl_pread lasted 2124.656ms (74%) aggreg 2127ms for 7796
calls.
< Function ntfs_rl_pwrite lasted 714.004ms (24%) aggreg 715ms for 2676
calls.
---
> Function ntfs_rl_pread lasted 4.152ms (11%) aggreg 6ms for 7796 calls.
[...]
> Function ntfs_rl_pwrite lasted 1.435ms (3%) aggreg 2ms for 2676 calls.
I will not be able to work on this next week. Please check
further. Some effort to make it conformant to the usual layout
of ntfs-3g code would be appreciated (spaces around
parentheses, indentation of {}, restricting to 80 chars per
line, etc.), otherwise I will have to do it.
Later, I will check whether a full wiping does not break a
Windows system partition.
Regards
Jean-Pierre
------------------------------------------------------------------------------
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