[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
du: fts and vfat
From: |
Justin Pryzby |
Subject: |
du: fts and vfat |
Date: |
Sat, 24 Nov 2007 20:44:54 -0500 |
User-agent: |
Mutt/1.5.16 (2007-06-11) |
It appears that fts uses some stat data which doesn't work as expected
for fat32 filesystems.
|$ time nice ./src/du -sh /mnt/1/ 2>&1 |sed -e 2q
|1328
|./src/du: `/mnt/1/BACKUP 12-8-05/Fran\'s folder': No such file or directory
|real 1m11.352s
|
|$ time nice ./src/du -sh /mnt/1/ 2>&1 |sed -e 2q
|1328
|./src/du: `/mnt/1/BACKUP 12-8-05/moved downloads': No such file or directory
|real 1m17.916s
Here "1328" is my debug line in coreutils fts.c:
| if (p->fts_statp->st_dev != sb.st_dev
| || p->fts_statp->st_ino != sb.st_ino) {
|fprintf(stderr, "%d\n", __LINE__);
| __set_errno (ENOENT); /* disinformation */
| ret = -1;
| goto bail;
| }
Since the output changes on each invocation of the program, I'm of the
impression this is a bug in the filesystem driver (an apparent result
of generating data to fill the structure fields to appease the
traditional system calls when the filesystem doesn't natively use
those values).
The same problem occurs even when the FS is remounted readonly, but
disappears if the FTS_NOCHDIR option is set. Here's a diff fragment
of strace -v demonstrating the d_ino field differing between
invocations.
-getdents64(4, {{d_ino=645569, d_off=32, d_type=DT_DIR, d_reclen=24,
d_name="."} {d_ino=185378, d_off=64, d_type=DT_DIR, d_reclen=24, d_name=".."}
{d_ino=648015, d_off=32768, d_type=DT_DIR, d_reclen=24, d_name="Ram"}}, 32768)
= 72
+getdents64(4, {{d_ino=645569, d_off=32, d_type=DT_DIR, d_reclen=24,
d_name="."} {d_ino=185378, d_off=64, d_type=DT_DIR, d_reclen=24, d_name=".."}
{d_ino=648014, d_off=32768, d_type=DT_DIR, d_reclen=24, d_name="Ram"}}, 32768)
= 72
Justin
- du: fts and vfat,
Justin Pryzby <=
- Re: du: fts and vfat, Jim Meyering, 2007/11/25
- Re: du: fts and vfat, Justin Pryzby, 2007/11/25
- Re: du: fts and vfat, Jim Meyering, 2007/11/25
- Re: du: fts and vfat, Phillip Susi, 2007/11/26
- Re: du: fts and vfat, Jim Meyering, 2007/11/26
- Re: du: fts and vfat, Al Viro, 2007/11/26
- Re: du: fts and vfat, Jim Meyering, 2007/11/26