Hi,
Bogdan wrote:
> On 08.06.2012 15:07, Jean-Pierre André wrote:
>
>> Hi,
>>
>> Bogdan wrote:
>>
More on this :
I found a lot of time is spent in ntfs_rl_pread() and
ntfs_rl_pwrite() because you feed them with the beginning
of the runlist, and they have to search the relevant entry.
You can avoid this by feeding them with the run which
immediately follows the last hole encountered :
Before entering the loop :
runlist_element *restart = na->rl;
At the end of loop (before rlc++) :
if (rlc->lcn == LCN_HOLE) restart = rlc;
replace
ret = ntfs_rl_pread(vol, na->rl, offset,...
by
ret = ntfs_rl_pread(vol, restart,
offset - (restart->vcn << vol->cluster_size_bits),...
replace
ret = ntfs_rl_pwrite(vol, na->rl, 0, ...
by
ret = ntfs_rl_pwrite(vol, restart,
restart->vcn << vol->cluster_size_bits, ...
Also describe rlc and rlt as runlist_element*, they point at
a run, not at the full runlist.
In the same function, I see you are checking the tail
in the loop (hence wiped multiple times)
size = na->allocated_size - na->data_size;
etc.
There is a single tail, this should not be in a loop.
In the main wipe_tail function, you only process the
unnamed data attribute :
na = ntfs_attr_open(ni, AT_DATA, AT_UNNAMED, 0);
But there can also be named data attributes, you should
do a "while (!ntfs_attr_lookup(AT_DATA, ... ))"
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