LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jeff Moyer <jmoyer@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Ian Kent <raven@themaw.net>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	autofs@linux.kernel.org
Subject: Re: [PATCH 4/6] autofs4 - make autofs type usage explicit
Date: Tue, 28 Oct 2008 09:24:00 -0400	[thread overview]
Message-ID: <x49tzaw6efj.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <20081027134050.c85a28dd.akpm@linux-foundation.org> (Andrew Morton's message of "Mon, 27 Oct 2008 13:40:50 -0700")

Andrew Morton <akpm@linux-foundation.org> writes:

> On Thu, 23 Oct 2008 10:35:32 +0800
> Ian Kent <raven@themaw.net> wrote:
>
>> This patch further improves autofs mount type usage and provides
>> supplementry explanation of the changes made in the previous patch
>> "autofs4 - cleanup autofs mount type usage".
>> 
>> Changes introduced in "autofs4 - cleanup autofs mount type usage":
>> 
>> - the type assigned at mount when no type is given is changed
>>   from 0 to AUTOFS_TYPE_INDIRECT. This was done because 0 and
>>   AUTOFS_TYPE_INDIRECT were being treated implicitly as the same
>>   type.
>> 
>> - previously, an offset mount had it's type set to
>>   AUTOFS_TYPE_DIRECT|AUTOFS_TYPE_OFFSET but the mount control
>>   re-implementation needs to be able distinguish all three types.
>>   So this was changed to make the type setting explicit.
>> 
>> - a type AUTOFS_TYPE_ANY was added for use by the re-implementation
>>   when checking if a given path is a mountpoint. It's not really a
>>   type as we use this to ask if a given path is a mountpoint in the
>>   autofs_dev_ioctl_ismountpoint() function.
>> 
>> Changes introduced in this patch:
>> 
>> - macros to set and test the autofs mount types have been added to
>>   improve readability and make the type usage explicit.
>
>     ^^^^^^^^^^^^^^^^^^^  <<-- ??

Just for some background, I requested a change here.  The reason is that
I ran into problems in the user space daemon where there was this notion
of a bitfield that wasn't always treated as a bitfield.  So
AUTOFS_TYPE_ANY should be all bits set, right?  Nope.  Some places in
the code tested with binary operators, others with ==.  It was confusing
and error-prone.  The accessor functions at least normalize the interface.

Cheers,

Jeff

  parent reply	other threads:[~2008-10-28 14:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-23  2:35 [PATCH 1/6] autofs4 - correct offset mount expire check Ian Kent
2008-10-23  2:35 ` [PATCH 2/6] autofs4 - remove string terminator check Ian Kent
2008-10-27 20:31   ` Andrew Morton
2008-10-28  0:27     ` Ian Kent
2008-10-28  0:55       ` Andrew Morton
2008-10-28  1:04         ` Ian Kent
2008-10-28  1:02       ` Ian Kent
2008-10-23  2:35 ` [PATCH 3/6] autofs4 - collect version check return Ian Kent
2008-10-23  2:35 ` [PATCH 4/6] autofs4 - make autofs type usage explicit Ian Kent
2008-10-27 20:40   ` Andrew Morton
2008-10-28  0:28     ` Ian Kent
2008-10-28 13:24     ` Jeff Moyer [this message]
2008-10-23  2:35 ` [PATCH 5/6] autofs4 - improve parameter usage Ian Kent
2008-10-23  2:35 ` [PATCH 6/6] autofs4 - cleanup expire code duplication Ian Kent

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x49tzaw6efj.fsf@segfault.boston.devel.redhat.com \
    --to=jmoyer@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=autofs@linux.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raven@themaw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).