Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
parted seems to have the ability to resize a fat32 partition, i wonder what shrinking/regrowing would accomplish ;-\
-- OR --
Rather than attempting to understand fat32 well enough to write a defragger, I wonder if it could be done like this:
1. Modify the Linux fat32 driver so that it has the option of allocating file space near the high cyls, rather than near cyl 0 as someone mentioned it does. Look at the code snippet from fat_add_cluster() pasted below. Could it be as easy as changing the loop to run from high to low?
2. Mount the filesystem with the "high-alloc" option enabled, and one-by-one copy each file and remove the old one. This process should empty all the low cylinders.
3. Remount the filesystem with the "high-alloc" disabled, and repeat the copy process. As the files move back to the low cylinders, there are no existing files to get in their way, so they are allocated contiguously.
nr = limit; /* to keep GCC happy */
for (count = 0; count < limit; count++) {
nr = ((count + MSDOS_SB(sb)->prev_free) % limit) + 2;
if (fat_access(sb, nr, -1) == 0)
break;
}
Originally posted by Bert "A word to the wise: a credentials dicksize war is usually a bad idea on the net."
(David Parsons in c.o.l.development.system, about coding in C.)
Ext3 does fragment and there is a defragging tool,too.It's called defrag.But you better check it out good - I am not sure if it also works with ext3.It's originally for ext2.
Yeah, ext3 frags to such a small extent, however, that it is not really worth mentioning. You could reduce the amount of fragmenting by reducing the block-size, but that trades off the amount of space you'll have to store files. Swings and roundabouts. For all intents and purposes, ext3 does not fragment.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.