All of lore.kernel.org
 help / color / mirror / Atom feed
* AutoFS expire/timeout semantics
@ 2009-05-25 13:08 Leonardo Chiquitto
  2009-05-26 13:42 ` Ian Kent
  0 siblings, 1 reply; 3+ messages in thread
From: Leonardo Chiquitto @ 2009-05-25 13:08 UTC (permalink / raw)
  To: autofs

Hello,

I'm running some tests against AutoFS 5 and when I set a mount
point with a short expire timeout (let's say 2 minutes), I'm observing
the following behavior:

- Keeping an open file in the mount point will prevent it to expire.
  This is expected, of course, as the file system is busy.
- Setting a cron job to run "ls" or read some file from the mount point
  won't prevent the file system to expire and be unmounted after
  the 2 minutes timeout. This comes a bit as a surprise to me, as
  I was expecting every access to files in the mount point to reset
  the expire timeout.

Question is: what operations (if any) resets the expiration timeout?

Thanks,
Leonardo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: AutoFS expire/timeout semantics
  2009-05-25 13:08 AutoFS expire/timeout semantics Leonardo Chiquitto
@ 2009-05-26 13:42 ` Ian Kent
  2009-05-26 14:20   ` Leonardo Chiquitto
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Kent @ 2009-05-26 13:42 UTC (permalink / raw)
  To: Leonardo Chiquitto; +Cc: autofs

Leonardo Chiquitto wrote:
> Hello,
> 
> I'm running some tests against AutoFS 5 and when I set a mount
> point with a short expire timeout (let's say 2 minutes), I'm observing
> the following behavior:
> 
> - Keeping an open file in the mount point will prevent it to expire.
>   This is expected, of course, as the file system is busy.
> - Setting a cron job to run "ls" or read some file from the mount point
>   won't prevent the file system to expire and be unmounted after
>   the 2 minutes timeout. This comes a bit as a surprise to me, as
>   I was expecting every access to files in the mount point to reset
>   the expire timeout.
> 
> Question is: what operations (if any) resets the expiration timeout?

It's not operations that cause the counter to be updated.
It isn't possible to update the counter based on specific operations.
It isn't possible to update the counter for all mount types based upon
access only, such as listing a directory.

The counter is updated during each expire check and is updated if the
file system covering (for direct or offset mounts), or within (indirect
mounts) the autofs file system has an elevated reference count. So, if
there are open files or process working directories, or a path lookup is
in progress at the time of the check, that is sufficient for the mount
to be considered busy and the counter updated.

Ian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: AutoFS expire/timeout semantics
  2009-05-26 13:42 ` Ian Kent
@ 2009-05-26 14:20   ` Leonardo Chiquitto
  0 siblings, 0 replies; 3+ messages in thread
From: Leonardo Chiquitto @ 2009-05-26 14:20 UTC (permalink / raw)
  To: Ian Kent; +Cc: autofs

> It's not operations that cause the counter to be updated.
> It isn't possible to update the counter based on specific operations.
> It isn't possible to update the counter for all mount types based upon
> access only, such as listing a directory.
>
> The counter is updated during each expire check and is updated if the
> file system covering (for direct or offset mounts), or within (indirect
> mounts) the autofs file system has an elevated reference count. So, if
> there are open files or process working directories, or a path lookup is
> in progress at the time of the check, that is sufficient for the mount
> to be considered busy and the counter updated.

Thanks for the detailed explanation, Ian, this really helps.

Leonardo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-05-26 14:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-25 13:08 AutoFS expire/timeout semantics Leonardo Chiquitto
2009-05-26 13:42 ` Ian Kent
2009-05-26 14:20   ` Leonardo Chiquitto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.