On Fri, 2009-01-16 at 13:22 +0900, Ian Kent wrote:
> >         
> >         diff --git a/daemon/lookup.c b/daemon/lookup.c
> >         index 741d846..b954045 100644
> >         --- a/daemon/lookup.c
> >         +++ b/daemon/lookup.c
> >         @@ -283,10 +283,13 @@ static int do_read_map(struct
> >         autofs_point *ap, struct map_source *map, time_t a
> >                 * for the fail cases to function correctly and to
> >         cache the
> >                 * lookup handle.
> >                 *
> >         -        * We always need to whole map for direct mounts in
> >         order to
> >         -        * mount the triggers.
> >         +        * We always need to read the whole map for direct
> >         mounts in
> >         +        * order to mount the triggers. We also want to read
> >         the whole
> >         +        * map if it's a file map to avoid potentially lengthy
> >         linear
> >         +        * file scanning.
> >                 */
> >         -       if (!(ap->flags & MOUNT_FLAG_GHOST) && ap->type !=
> >         LKP_DIRECT)
> >         +       if (strcmp(map->type, "file") ||
> > 
> > I suspect that you want && instead.
> 
> Yeah, I think that isn't quite right but I also think that && won't fix
> it. I'll think on that one again.

On second thoughts, I think you were right the first time, && it is.

But the real question is whether we are willing to put up with the
overhead of file scan lookups while we wait for the a map read to
complete. That probably won't happen all that often so I'm thinking
maybe it's ok.

Ian


_______________________________________________
autofs mailing list
autofs@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to