Further to Problems with offline files and Explorer 'hangs'

John E. Malmberg malmberg at Encompasserve.org
Wed Mar 20 13:58:01 GMT 2002

On Wed, 20 Mar 2002, David Collier-Brown wrote:

> A bit of spec-grovelling didn't turn up any elegant and inexpensive
> ways to see if files were offline, short of opening them
> and/or doing ioctl(fd, <extended attribute stuff>) on them.

It would be a file system dependant attribute.
>  Let me throw out a possibility: we be able to set, via smb.conf
> 	1) a static offline=yes attribute for a share, and/or
>         2) a dynamic offline=<mechanism script> attribute,
>            also for a whole share, and/or possibly
> 	3) a globbing offline=/pattern/ attribute
>   I'll suggest that, if it is a credible thing to do, we return
> the offline attribute when asked for information about such files,
> but just try to open them when asked.
>   If the file is not offline, the open will succeed normally.
>   If the file is offline, the client will be paused until it
> becomes online and the smbd continues.

Unfortunately that will not work.

The nature of the shelved or offline files is that they are almost
transparent to the application.  The management software swaps them on
real disk as needed.

A stub file is left that for anything other than an open will look just
like the real file.

The problem comes in where the explorer shell (and other applications)
open the file looking for icons just for a pretty display.

That open, you do not want to do for a shelved (offline) file, as it will
badly hurt performance.  As one file is swapped in to the real disk,
another will be swapped out to make room.

So what you need is some way to tell the client that the file is shelved,
and not to open it unless it really needs the contents.

Unless the Samba Server has some way of determining when the client is
just opening the file for an icon check, and can instead substitute an
icon indicating the file state.

wb8tyw at qsl.network
Personal Opinion Only

More information about the samba-technical mailing list