* vfat32 Free Cluster Count Update
@ 2008-02-16 17:43 Gunter Ohrner
2008-02-19 10:23 ` OGAWA Hirofumi
0 siblings, 1 reply; 5+ messages in thread
From: Gunter Ohrner @ 2008-02-16 17:43 UTC (permalink / raw)
To: linux-kernel
Hi!
Doesn't the Linux vfat driver update the FAT32's free cluster summary count?
Zweiblum:~# dosfsck /dev/sda11
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
/dev/sda11: 2451 files, 28218/1918827 clusters
Zweiblum:~# mount /dev/sda11 /mnt/win_daten/
Zweiblum:~# cp /etc/motd /mnt/win_daten/
Zweiblum:~# umount /mnt/win_daten/
Zweiblum:~# dosfsck /dev/sda11
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
Free cluster summary wrong (1890609 vs. really 1890608)
1) Correct
2) Don't correct
? ^C
Zweiblum:~# uname -a
Linux Zweiblum 2.6.24-1-686 #1 SMP Mon Feb 11 14:37:45 UTC 2008 i686
GNU/Linux
Greetings,
Gunter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: vfat32 Free Cluster Count Update
2008-02-16 17:43 vfat32 Free Cluster Count Update Gunter Ohrner
@ 2008-02-19 10:23 ` OGAWA Hirofumi
2008-02-20 0:33 ` Valdis.Kletnieks
2008-02-20 10:35 ` Jan Engelhardt
0 siblings, 2 replies; 5+ messages in thread
From: OGAWA Hirofumi @ 2008-02-19 10:23 UTC (permalink / raw)
To: Gunter Ohrner; +Cc: linux-kernel
Gunter Ohrner <G.Ohrner@post.rwth-aachen.de> writes:
> Doesn't the Linux vfat driver update the FAT32's free cluster summary count?
>
> Zweiblum:~# dosfsck /dev/sda11
> dosfsck 2.11, 12 Mar 2005, FAT32, LFN
> /dev/sda11: 2451 files, 28218/1918827 clusters
>
> Zweiblum:~# mount /dev/sda11 /mnt/win_daten/
>
> Zweiblum:~# cp /etc/motd /mnt/win_daten/
>
> Zweiblum:~# umount /mnt/win_daten/
>
> Zweiblum:~# dosfsck /dev/sda11
> dosfsck 2.11, 12 Mar 2005, FAT32, LFN
> Free cluster summary wrong (1890609 vs. really 1890608)
> 1) Correct
> 2) Don't correct
> ? ^C
This problem was introduced by it ignores a free cluster count (not
"usefree"). If we was not using "usefree" option, FAT doesn't trust the
"free cluster count" anymore.
So, it doesn't update until re-count. Um.. yes, it's a bit
problem. Ah.. it can fix "we can trust now"-flag or something.
I'll dig it more, later. And for right now, please run "df" command, it
will fix free cluster count.
Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: vfat32 Free Cluster Count Update
2008-02-19 10:23 ` OGAWA Hirofumi
@ 2008-02-20 0:33 ` Valdis.Kletnieks
2008-02-20 2:09 ` OGAWA Hirofumi
2008-02-20 10:35 ` Jan Engelhardt
1 sibling, 1 reply; 5+ messages in thread
From: Valdis.Kletnieks @ 2008-02-20 0:33 UTC (permalink / raw)
To: OGAWA Hirofumi; +Cc: Gunter Ohrner, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 458 bytes --]
On Tue, 19 Feb 2008 19:23:12 +0900, OGAWA Hirofumi said:
> I'll dig it more, later. And for right now, please run "df" command, it
> will fix free cluster count.
Wow, that's a real kick in the head for all of us who have a mental concept
of 'df' being basically a read-only program, and "fixing counts" to be more
the job of 'fsck'.... :)
(Or is 'df' simply a known way to force execution of a code path that ends up
fixing the counts as a side-effect?)
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: vfat32 Free Cluster Count Update
2008-02-20 0:33 ` Valdis.Kletnieks
@ 2008-02-20 2:09 ` OGAWA Hirofumi
0 siblings, 0 replies; 5+ messages in thread
From: OGAWA Hirofumi @ 2008-02-20 2:09 UTC (permalink / raw)
To: Valdis.Kletnieks; +Cc: Gunter Ohrner, linux-kernel
Valdis.Kletnieks@vt.edu writes:
> (Or is 'df' simply a known way to force execution of a code path that ends up
> fixing the counts as a side-effect?)
Yes. df calls statfs(2), and FAT counts free clusters for ->f_ffree for
it. Then, the free clusters count is fixed as a side-effect.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: vfat32 Free Cluster Count Update
2008-02-19 10:23 ` OGAWA Hirofumi
2008-02-20 0:33 ` Valdis.Kletnieks
@ 2008-02-20 10:35 ` Jan Engelhardt
1 sibling, 0 replies; 5+ messages in thread
From: Jan Engelhardt @ 2008-02-20 10:35 UTC (permalink / raw)
To: OGAWA Hirofumi; +Cc: Gunter Ohrner, linux-kernel
On Feb 19 2008 19:23, OGAWA Hirofumi wrote:
>
>This problem was introduced by it ignores a free cluster count (not
>"usefree"). If we was not using "usefree" option, FAT doesn't trust the
>"free cluster count" anymore.
>
>So, it doesn't update until re-count. Um.. yes, it's a bit
>problem. Ah.. it can fix "we can trust now"-flag or something.
>
>I'll dig it more, later. And for right now, please run "df" command, it
>will fix free cluster count.
>
Ah, _that's_ why the first invocation `df` command after a fresh boot
always takes so long!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-02-20 10:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-16 17:43 vfat32 Free Cluster Count Update Gunter Ohrner
2008-02-19 10:23 ` OGAWA Hirofumi
2008-02-20 0:33 ` Valdis.Kletnieks
2008-02-20 2:09 ` OGAWA Hirofumi
2008-02-20 10:35 ` Jan Engelhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).