Re: [PATCH 4/6] autofs4 - make autofs type usage explicit

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

 



Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> writes:

> On Thu, 23 Oct 2008 10:35:32 +0800
> Ian Kent <raven@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux