Re: Wrong free clusters count on FAT32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



    Hi Ogawa :)

 * OGAWA Hirofumi <[email protected]> dixit:
> DervishD <[email protected]> writes:
> > The problem is that if a program writes a file onto the filesystem
> > without using statfs first to check for free space, the free_clusters
> > entry won't have the real value and the driver may report "disk full" (I
> > haven't read the code for the vfat driver, sorry, so I'm not sure about
> > this) when really there are plenty of clusters to write the new file.
> 
> No need to worry about it. If we ignored the ->free_clusters in
> FSINFO, the fat drivers counts the current free clusters by scaning
> FAT entries if needed.

    Cool! :)

> > Probably it's stupid to update the free clusters count at mount time
> > (sorry if so...) but it looks like a good idea to me. And of course, I
> > don't mean to update the value _on disk_, but the kernel's idea of free
> > clusters (so even FAT filesystems mounted R/O will report correct
> > values).
> 
> It would add the limitation to following simple usage,
> 
> 	# mount -t vfat /dev/sda1 /mnt
>         # cp -a * /mnt
>         # umount
> 
> if /dev/sda1 was the large and slow device, "mount" will need several
> minutes to counts free clusters. I think the user will be hard to
> accept the several minutes at "mount".


    I can carry some tests, but if Windows does that tasks lightning
fast, Linux surely does it faster ;) I don't think, anyway, that having
a huge USB disk is a common practice when using "modest" machines.

    If you want, I can perform a couple of tests. I have a 80GB disk
that I can connect using an USB adapter and my machine is AMD Athlon XP
1900+ with 1GB of RAM, which looks pretty slow nowadays O:)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux