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

Re: apt and network smb-cdrom problems



From: "Jason Gunthorpe" <jgg@debian.org>
> > loop. There is a comment that says that directory entries
> > might go in different orders on different directory readings,
> > so let's make the order persistent. To do this, let's read the entire
> > directory listing (names) into
> 
> I think that is unlikely to be your problem, can you check to be sure?

I've checked it and found out that my assumption was wrong. CDROM
directory entries reading order does not change. Instead, the time
(stat::st_mtime) on CD dirs changed every time. The bug shows up
when Debian Woody system mounts smb share from Win98 system.
If CD server runs WinNT, Win2000 or Linux - the problem does not trigger.
This bug also shows up even with ls. If I mount a share from Win98
machine and do "ls -l --full-time", I get the CURRENT time on
directories from this share. The time on files is ok. atime is also broken
(set to current time). The only constant time is ctime.

I've made a workaround patch, it might be useful for someone who
reads this maillist and experience the same problem. It's a temporary
solution though and I don't propose to apply the patch to official apt tree.

I've done a little questionaire among debian-russian maillist subscribers
to find out what is broken - kernel or samba? I've got two responses,
each telling that the bug does not trigger on their systems, and they have
samba from Woody (as me), but self-built kernel (2.2.19 and 2.4.17). I used
vanilla kernel from Woody distribution. Thus, it seems to be a Debian
Woody default kernel bug.

However, I think, apt should behave more gracefully in such situations.
Imagine that a new filesystem will appear that knows nothing at all about times.
I propose to store CDROM ID info actually on this CDROM in some file. For
example, we can calculate md5 sum of [cdrom]/.disk/info file contents. If
this file does not exist, we can fallback to older method. What do you think
about it?

Regards,
Alexei.

Attachment: apt-0.5.4-smb-cdrom-on-w98-mtime-bug-workaround-patch.diff
Description: Binary data


Reply to: