Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
June 19, 2013, 12:06:26 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: 1 2 [3]
  Print  
Author Topic: SetBeginOfZone Absolute PERCENTAGE  (Read 6118 times)
TeDDy
JkDefrag Hero
*****
Posts: 158


View Profile WWW
« Reply #30 on: April 30, 2009, 09:52:32 am »

 The biggest chance to get free/GPL sources being able to work with fat/ntfs files/folders at cluster level is the data recovery near linux community.
 I found some C sources, but being novice in C, don't know hou usefull they are.
 Looked into sources and functions have big potential.
 Usables or not, I will continue searching. Perhaps I get more narrowed sources to use.
« Last Edit: May 01, 2009, 09:18:10 pm by TeDDy » Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7156



View Profile WWW
« Reply #31 on: April 30, 2009, 03:56:46 pm »

Thanks for all your efforts, I appreciate it. A solution based on direct disk manipulation is a possibility, but in my view it's a last resort. It is unlikely that I will implement such a solution in MyDefrag, because it is simply too dangerous. And I do not need example code, I already know how to do it.
Logged
TeDDy
JkDefrag Hero
*****
Posts: 158


View Profile WWW
« Reply #32 on: May 01, 2009, 11:36:20 am »

 Direct disk manipulation, not for all drive types, not for all items.
 Just for folders on fat32 drives.
 Can be implemented as a switch : movefat32folders(yes/no).
 The default is "no".
 Switching to "yes" can prompt the user to warn him about the danger when fat32 drive is processed.

 What is so dangerous ? Really can't figure. Please, can you tell me ?

 I think, before move the folder, MyDefrag can check if the folder or files in it are open.
 Also, before move it, acces to this folder and contents can be denied/delayed until the move is done.
 Moving one cluster to the already vacated destination should take very small time. Much smaller than usual applications access error timeout.
 The time needed decreases if cluster content is moved and renamed after.
 The time in wich something bad can happen is the time to rename the clusters. Not timed that but should be less 1msec.
 No application will crash if it tries to acess a folder and not able to do it for 1-5msec.

 If you really can do it, I can spend all my available time to discover flaws or possible dangerous situations
« Last Edit: May 01, 2009, 01:19:27 pm by TeDDy » Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7156



View Profile WWW
« Reply #33 on: May 01, 2009, 02:11:40 pm »

What is so dangerous ?
It is dangerous because I do not have enough knowledge about the internal workings of Windows and the FAT filesystem driver. Perhaps in the future I will build a direct-disk manipulation FAT directory movement something that will only work if the FAT disk is offline, but that solution has a very low priority because it will take a lot of effort and there are many other things on the wishlist that I can do that will cost less effort and produce more results. If you can find a solution that uses the Microsoft defragmentation API then I can implement it sooner, because it will likely be much easier to implement.
Logged
TeDDy
JkDefrag Hero
*****
Posts: 158


View Profile WWW
« Reply #34 on: May 01, 2009, 09:13:20 pm »

 Another dead end as I see.

 Finding a solution to unlock the API needs decompilations to all dependencies of the involved functions in the kernel and fat driver and step by step debugging them in assembler.
 When mentioned this, long posts about breaking eula arrived against, to stay cool.
 I "agree" with this and try to avoid it.
 Not speaking about the huge work I have to do versus the very small chance I have to be still alive when you really implement it some day.

 I will try to find someone wich owns legally the needed sources + documentations from MS, and wish to help me.
 Veery unlikely !!!
 Even so, I don't know if you can use the sources, because, legally, the owner is the guy wich has the paper and gived the money.
 Maybe I am wrong with this ?!?
 Even if I buy it, or at least the relevant pieces involved (supposing MS sell it by pieces) won't give you the right to use.
 I other scenario, I buy the stuff with your name and adress, the rights and package is delivered directly and ONLY to you.
 Weird, isn' it ? You can decide to never implement it, fat32 in rarely used, other order in wishlist....
 Seem cheaper to buy drives when old ones get fragmented or pay a programmer to do a defrag as my soul and good sense feel it should be:
-small
-simple to use, complex in file placement
-100% defragmentation on unlocked drives in windows nomatter what fat or ntfs.

 After long explanations about the imposibility to move folders in fat32 drives, like a fool, trusting you it can't be done, I waste days and nights, many weeks, health included. Hope no penalties in the same package !
 All this to go to the realty that the stuff is available, free to use, robust enough to recover lost data and enough documented or documentable by direct contact with the writer.

 All this mambo-jambo to tell me
Quote
I do not need example code, I already know how to do it
Not fair if you ask me. But as usual I am ignored.
 Let this stupid, TeDDy if I remember to crash his head. Maybe she is give up this days.
 Ohhh, NO ! Ok let's tell him I know and don't want !

 I am still on my feets !
 And not enough offensed to give up !

 If you want(and can) to make some separate defrag, or implement in the main Mydefrag, defaulted to "NO" and enable it by a secret switch known only by you, me and other dedicated tester, I can afford to use separate fat drives to test and imagine the most dangerous scenarios:
- continuous data access to folders and files
- random/burst writes/creations for files and folders
- continuous defrag with permanent run for fragmentor
- cutting power in the middle of the operations
- ANYTHING you (or another guru) can imagine more than this as worse case scenario for ONLINE TOTAL DEFRAGMENTATION of fat32 non-system booted drives.

 Should not take you more than a week for online low level access only for folders on fat32.
 I am not making plans with your time, just begging you to consider my used one.

 No obligation from your part. Just do it.

 I will make the tests, under whatever conditions you want, for how long you consider necessary to be sure it is safe, and post logs and corruptions of files if they are.
 If you can manage to run 2 instances, I can run it with same scenarios on fat+ntfs drives to see how big the differences on safety can be.

 Unfortunetly, I am affraid I have not much more to offer.
« Last Edit: May 01, 2009, 09:22:47 pm by TeDDy » Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7156



View Profile WWW
« Reply #35 on: May 02, 2009, 09:02:24 am »

I am sorry to disappoint you. In the original thread (see here) I told you very early on that I thought the search would be "fruitless", that "I do not know enough about Windows to build the necessary checks to safely move directories on FAT disks", and "Absolutely not ok is any solution that can result in a corrupted disk, even with the smallest of chances". I have never asked for example code for moving directories on FAT disks with direct disk access, and as soon as I saw you were going in that direction I have tried to tell you not to go there, several times in fact.

The best solution would be if you can find a way to use the Microsoft defragmentation API, perhaps with different parameters or with some kind of preparation such as stopping a service. The first step in finding such a solution is to find out exactly why the API refuses to move directories, and that can be done with the Microsoft debugger. As I said before, "I am sure Microsoft will not sue anyone for using a debugger to find out why directories are not moved on FAT disks".

Allow me to remind you that it's very easy to convert from FAT to NTFS, see How to use Convert.exe to convert a partition to the NTFS file system.
Logged
TeDDy
JkDefrag Hero
*****
Posts: 158


View Profile WWW
« Reply #36 on: May 02, 2009, 11:34:13 am »

 Well, you can't convince me that moving folders by direct drive access in windows, fat32, windows online can be dangerous or corrupt data.
 With less stable w9x I never has troubles. Only few if windows freezes by other reasons or lost electrical power.
 If working on the defragged drive the analizer restarts often.

 How can be more dangerous or unsafe to directly move them under a much stable OS ?

 Apart that, the folder is a cluster with filenames, >99% of time used in READ operations.
 The very few programs really locking a folder are explorer type or folder create from inside a program.
 Using a file inside a folder does not make the folder untouchable.
 Try to lock a file inside a fat32 folder by some program, then use http://ccollomb.free.fr/unlocker/unlocker1.8.7.exe to rename the folder to whatever, then rename it back to original name. See if you can save file modifications. Are you corrupting data this way ?

 I think it is a waste of time to invent and implement many ways to select files by the most weird criterias sometimes, move them in almost any place on drive if the most important factor for performance and drive life remains unsolved.
 It's no use to move very frequently accessed files to front when folders pointing to the files are spread to the end.
 For almost every file access the parent folder get a hit. The seek time is much bigger than read/write for the last cluster on drive.

 If folders can't be moved, better move the files around them to reduce seek times.

 I risk to tell you things you can already know.
 Windows kernel has exports for functions to find active handles to items, pause process.
 Finding who lock the folder is not so difficult.
 And if NOTHING locked it how unsafe can be to move it by direct drive access in few milliseconds.
 I don't get it !
 As I believe, the folder creation is controlled by kernel. Creating it by other method permit the existance of 2 folders with same content and same name for a very short time, just the time needed for the rename-new - delete old operation.
 If unlikely system crash, the last folder created is repaired by chkdsk, so where can be the corruption ?
 BTW, on ntfs, the folders are moved differently ?
 Try to put your computer to rar 10 folders with many contents, in same time unrar other 10 big archives. Pause them when in the middle of their multithread job. Unpause them until you have 20 active threads running on drive ant unplug the power cable. Please try this on unimportant fat32 and ntfs drives. After, try to see the damages.
 Personally I've tried with 20 rar, 20 unrar, Kaspersky scan and windows defrag, all in same time.
 The fat32 and  ntfs drives contained ONLY rar archives(to be able to easy check their integrity after).
 I run the test on old pIII/450 MHz with w2k. When it was unable to move the mouse without pauses I've cut the power. Many times repeated the test+repairs+recheck all the archives.
 From first to second test, I get more lost/corrupted files on ntfs compared to fat32.
 After the third try, the ntfs drive structure was unrecoverable.
 I stop the ntfs testing to 3 because about 30% of drive contents was unrecoverable even by offline tools and the third test give me thousands of unlinked files.

 The fat32 testing was stopped before 5 or 6 passes. Apart more passes, about 10-15% of files was not repaired by chkdsk or offline recovery software.

 The percents are estimative because I made this testings about 7-8 years ago, as a bet/decission about the safety, speed of use and recoverability of lost data.

 I wasn't mentioned before to not be considered crazy, because only crazy person risk to destroy 2 drives to take a conclusion, but...

 I know how to convert from fat to ntfs. Even better than MS Convert is Partition Magic from PowerQuest for example. I am using it since 1998 I remember.

 From my point the ntfs is not a solution for the portable drives wich I must plug in computers running w95/98
 Also windows is much more faster on small fat32 partitions (around 5 GiB) and can be 100% defragmented by rebooting to w98 with SpeedDisk.
 BTW, this method using direct drive access never corrupted my second NT OS and defrag drives >10 times faster.
 But it is sometimes disturbing because I must fix some files/folders names before reboot as w98 is unable to understand them by his limitations.
 So, shoot me but I've tested this food, living with it about 7-8 years.
 Normally, I prefer to use it on my 2k/XP machines without the manual rename+reboot phases only for fat32 (wich I can't leave).

 So I can test the unsafeties for you and help the fixes if you spent less than a week to plug it, locked by default for the usual users, and unlockable by a secret switch so I can test it.


_And, YES, all my posts come from closely, repetitive testings, calculations and benchmarks.
 I am not inventing the things I write on this forum.
 They come from guessing firstly followed by close observation, verifications, calculs, reverifications and benchmarking.

 I can only be amused how people enjoy the possibilities to spread their files on drive, mixing files accessed today, once with files accessed hundred times daily.
 Also, I am very sad, sometimes frustrated like, to see that ABSOLUTELY NONE of my verified conclusions, verbosely explained passed from wishlist to usable features.
 I feel like an old man talking about benefits of football play for the health when, in best cases I get reply's that it's more fun to watch football on TV. Ah, if TV crash, I will consider to buy a ball as a priority, untill then...

 But, nothing that can't be fixed in the future.
« Last Edit: May 02, 2009, 01:59:39 pm by TeDDy » Logged
Pages: 1 2 [3]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!