autofs4 - rename autofs4 to autofs
Subsystems (3)
Ian Kent
maintainercover autofs4 - rename autofs4 to autofs
The autofs4 kernel module provides function for autofs version 3, 4 and 5 and autofs module has long since been removed. Now we're left with a misnamed module. Appart from the name another problem this presents is that module autoload doesn't work because of the mismatch of the directory name and the name of the file system provided by the module.
So autofs4 should be renamed to autofs but I've held back doing it because of the potential disruption that could occur with a change like this.
The issues are somewhat reduced now because systemd needs the autofs module at startup, and because of the autoload issue it's easier to just compile the module into the kernel, which is what is often done.
Changes since the last posting of the series:
- removed the patches that updated the configs to use CONFIG_AUTOFS_FS instead of CONFIG_AUTOFS4_FS, as recommended by Stephen Rothwell.
- Broke up large patches to meet list post size requirements.
By leaving a Kconfig and Makefile in fs/autofs4 (to build autofs4.ko) with a deprication message sub-system maintainers and other users will make any needed changes before these are removed after two kernel versions. IMHO the presence of the warning is reason enough to leave a build stub rather than do a straight out rename.
Any comments on the rename are welcome.
---
Ian Kent (10):
autofs4 - coding style fixes
autofs4 - fix string.h include in auto_dev-ioctl.h autofs4 - move linux/auto_dev-ioctl.h to uapi/linux autofs - merge auto_fs.h and auto_fs4.h autofs - use autofs instead of autofs4 everywhere autofs - copy autofs4 to autofs
autofs - create autofs Kconfig and Makefile autofs - update fs/autofs4/Kconfig
autofs - update fs/autofs4/Makefile
autofs - delete fs/autofs4
fs/Kconfig | 1 fs/Makefile | 1 fs/autofs/Kconfig | 19 + fs/autofs/Makefile | 7 fs/autofs/autofs_i.h | 341 +++++++++++++ fs/autofs/dev-ioctl.c | 759 ++++++++++++++++++++++++++++++ fs/autofs/expire.c | 561 ++++++++++++++++++++++ fs/autofs/init.c | 49 ++ fs/autofs/inode.c | 368 ++++++++++++++ fs/autofs/root.c | 898 +++++++++++++++++++++++++++++++++++ fs/autofs/symlink.c | 21 + fs/autofs/waitq.c | 570 ++++++++++++++++++++++ fs/autofs4/Kconfig | 30 + fs/autofs4/Makefile | 4 fs/autofs4/autofs_i.h | 341 ------------- fs/autofs4/dev-ioctl.c | 760 ------------------------------ fs/autofs4/expire.c | 562 ---------------------- fs/autofs4/init.c | 52 -- fs/autofs4/inode.c | 371 -------------- fs/autofs4/root.c | 898 ----------------------------------- fs/autofs4/symlink.c | 24 - fs/autofs4/waitq.c | 572 ---------------------- fs/compat_ioctl.c | 1 include/linux/auto_dev-ioctl.h | 229 --------- include/linux/auto_fs.h | 5 include/uapi/linux/auto_dev-ioctl.h | 224 +++++++++ include/uapi/linux/auto_fs.h | 156 ++++++ include/uapi/linux/auto_fs4.h | 158 ------ 28 files changed, 3991 insertions(+), 3991 deletions(-) create mode 100644 fs/autofs/Kconfig create mode 100644 fs/autofs/Makefile create mode 100644 fs/autofs/autofs_i.h create mode 100644 fs/autofs/dev-ioctl.c create mode 100644 fs/autofs/expire.c create mode 100644 fs/autofs/init.c create mode 100644 fs/autofs/inode.c create mode 100644 fs/autofs/root.c create mode 100644 fs/autofs/symlink.c create mode 100644 fs/autofs/waitq.c delete mode 100644 fs/autofs4/autofs_i.h delete mode 100644 fs/autofs4/dev-ioctl.c delete mode 100644 fs/autofs4/expire.c delete mode 100644 fs/autofs4/init.c delete mode 100644 fs/autofs4/inode.c delete mode 100644 fs/autofs4/root.c delete mode 100644 fs/autofs4/symlink.c delete mode 100644 fs/autofs4/waitq.c delete mode 100644 include/linux/auto_dev-ioctl.h create mode 100644 include/uapi/linux/auto_dev-ioctl.h
Signature · 1 line
Ian
Ian Kent
maintainerPATCH 1/10 autofs4 - coding style fixes
Try and make the coding style completely consistent throughtout the autofs module and inline with kernel coding style recommendations.
--- fs/autofs4/autofs_i.h | 30 +++++++++++++++--------------- fs/autofs4/expire.c | 38 +++++++++++++++++++------------------- fs/autofs4/init.c | 5 +---- fs/autofs4/inode.c | 5 +---- fs/autofs4/root.c | 22 +++++++++++----------- fs/autofs4/symlink.c | 5 +---- fs/autofs4/waitq.c | 14 ++++++-------- include/linux/auto_fs.h | 5 +---- 8 files changed, 55 insertions(+), 69 deletions(-)
fs/autofs4/autofs_i.h +15 -15
@@ -1,7 +1,4 @@ -/* -*- c -*- ------------------------------------------------------------- * -* -* linux/fs/autofs/autofs_i.h -* +/* * Copyright 1997-1998 Transmeta Corporation - All Rights Reserved * Copyright 2005-2006 Ian Kent <[email protected]> *
@@ -51,12 +48,14 @@printk (KERN_ERR "pid %d: %s: " fmt"\n" , \ current->pid, __func__, ##__VA_ARGS__) -/* Unified info structure. This is pointed to by both the dentry and -inode structures. Each file in the filesystem has an instance of this -structure. It holds a reference to the dentry, so dentries are never -flushed while the file exists. All name lookups are dealt with at the -dentry level, although the filesystem can interfere in the validation - process. Readdir is implemented by traversing the dentry lists. */ +/* +* Unified info structure. This is pointed to by both the dentry and +* inode structures. Each file in the filesystem has an instance of this +* structure. It holds a reference to the dentry, so dentries are never +* flushed while the file exists. All name lookups are dealt with at the +* dentry level, although the filesystem can interfere in the validation +* process. Readdir is implemented by traversing the dentry lists. + */struct autofs_info {struct dentry *dentry;struct inode *inode;
@@ -78,7 +77,7 @@ struct autofs_info {kgid_t gid; }; -#define AUTOFS_INF_EXPIRING (1<<0)/* dentry is in the process of expiring */ +#define AUTOFS_INF_EXPIRING (1<<0)/* dentry in the process of expiring */ #define AUTOFS_INF_PENDING (1<<2)/* dentry pending mount */ struct autofs_wait_queue {
@@ -138,7 +137,8 @@ static inline struct autofs_info *autofs4_dentry_ino(struct dentry *dentry)processes which do manipulations for us in user space sees the raw filesystem without "magic".) */ -static inline int autofs4_oz_mode (struct autofs_sb_info *sbi) { +static inline int autofs4_oz_mode (struct autofs_sb_info *sbi) +{return sbi->catatonic ||task_pgrp (current) == sbi->oz_pgrp; }
@@ -163,12 +163,12 @@ void autofs4_free_ino(struct autofs_info *);int is_autofs4_dentry (struct dentry *);int autofs4_expire_wait (struct dentry *dentry);int autofs4_expire_run (struct super_block *,struct vfsmount *, -struct autofs_sb_info *, -struct autofs_packet_expire __user *); +struct autofs_sb_info *, +struct autofs_packet_expire __user *);int autofs4_do_expire_multi (struct super_block *sb,struct vfsmount *mnt,struct autofs_sb_info *sbi,int when);int autofs4_expire_multi (struct super_block *,struct vfsmount *, -struct autofs_sb_info *,int __user *); +struct autofs_sb_info *,int __user *);struct dentry *autofs4_expire_direct (struct super_block *sb,struct vfsmount *mnt,struct autofs_sb_info *sbi,int how);
fs/autofs4/expire.c +19 -19
@@ -1,7 +1,4 @@ -/* -*- c -*- --------------------------------------------------------------- * -* -* linux/fs/autofs/expire.c -* +/* * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved * Copyright 1999-2000 Jeremy Fitzhardinge <[email protected]> * Copyright 2001-2006 Ian Kent <[email protected]>
@@ -18,7 +15,7 @@ static unsigned long now;/* Check if a dentry can be expired */ static inline int autofs4_can_expire (struct dentry *dentry, -unsigned long timeout,int do_now) +unsigned long timeout,int do_now) {struct autofs_info *ino =autofs4_dentry_ino (dentry);
@@ -81,7 +78,7 @@ done:* Calculate and dget next entry in the subdirs list under root. */ static struct dentry *get_next_positive_subdir (struct dentry *prev, -struct dentry *root) +struct dentry *root) {struct autofs_sb_info *sbi =autofs4_sbi (root->d_sb);struct list_head *next;
@@ -128,7 +125,7 @@ cont:* Calculate and dget next entry in top down tree traversal. */ static struct dentry *get_next_positive_dentry (struct dentry *prev, -struct dentry *root) +struct dentry *root) {struct autofs_sb_info *sbi =autofs4_sbi (root->d_sb);struct list_head *next;
@@ -194,9 +191,9 @@ again:* autofs submounts. */ static int autofs4_direct_busy (struct vfsmount *mnt, -struct dentry *top, -unsigned long timeout, -int do_now) +struct dentry *top, +unsigned long timeout, +int do_now) {DPRINTK ("top %p %.*s" , top, (int ) top->d_name.len, top->d_name.name);
@@ -216,7 +213,8 @@ static int autofs4_direct_busy(struct vfsmount *mnt,return 0 ; } -/* Check a directory tree of mount points for busyness +/* +* Check a directory tree of mount points for busyness * The tree is not busy iff no mountpoints are busy */ static int autofs4_tree_busy(struct vfsmount *mnt,
@@ -387,8 +385,8 @@ struct dentry *autofs4_expire_indirect(struct super_block *sb,* offset (autofs-5.0+). */ if (d_mountpoint (dentry)) { -DPRINTK ("checking mountpoint %p %.*s" , - dentry, (int )dentry->d_name.len, dentry->d_name.name); +DPRINTK ("checking mountpoint %p %.*s" , dentry, + (int )dentry->d_name.len, dentry->d_name.name);/* Can we umount this guy */ if (autofs4_mount_busy (mnt, dentry))
@@ -485,9 +483,9 @@ int autofs4_expire_wait(struct dentry *dentry)/* Perform an expiry operation */ int autofs4_expire_run (struct super_block *sb, -struct vfsmount *mnt, -struct autofs_sb_info *sbi, -struct autofs_packet_expire __user *pkt_p) +struct vfsmount *mnt, +struct autofs_sb_info *sbi, +struct autofs_packet_expire __user *pkt_p) {struct autofs_packet_expire pkt;struct autofs_info *ino;
@@ -507,7 +505,7 @@ int autofs4_expire_run(struct super_block *sb, pkt.name[pkt.len] ='\0' ;dput (dentry); -if (copy_to_user (pkt_p, &pkt,sizeof (struct autofs_packet_expire )) ) +if (copy_to_user (pkt_p, &pkt,sizeof (struct autofs_packet_expire ))) ret = -EFAULT ;spin_lock (&sbi->fs_lock);
@@ -547,8 +545,10 @@ int autofs4_do_expire_multi(struct super_block *sb, struct vfsmount *mnt,return ret; } -/* Call repeatedly until it returns -EAGAIN, meaning there's nothing -more to be done */ +/* +* Call repeatedly until it returns -EAGAIN, meaning there's nothing +* more to be done. +*/ int autofs4_expire_multi (struct super_block *sb,struct vfsmount *mnt,struct autofs_sb_info *sbi,int __user *arg) {
fs/autofs4/init.c +1 -4
@@ -1,7 +1,4 @@ -/* -*- c -*- --------------------------------------------------------------- * -* -* linux/fs/autofs/init.c -* +/* * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved * * This file is part of the Linux kernel and is made available under
fs/autofs4/inode.c +1 -4
@@ -1,7 +1,4 @@ -/* -*- c -*- --------------------------------------------------------------- * -* -* linux/fs/autofs/inode.c -* +/* * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved * Copyright 2005-2006 Ian Kent <[email protected]> *
fs/autofs4/root.c +11 -11
@@ -1,7 +1,4 @@ -/* -*- c -*- --------------------------------------------------------------- * -* -* linux/fs/autofs/root.c -* +/* * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved * Copyright 1999-2000 Jeremy Fitzhardinge <[email protected]> * Copyright 2001-2006 Ian Kent <[email protected]>
@@ -466,7 +463,8 @@ static int autofs4_d_manage(struct dentry *dentry, bool rcu_walk) }/* Lookups in the root directory */ -static struct dentry *autofs4_lookup (struct inode *dir,struct dentry *dentry,unsigned int flags) +static struct dentry *autofs4_lookup (struct inode *dir, +struct dentry *dentry,unsigned int flags) {struct autofs_sb_info *sbi;struct autofs_info *ino;
@@ -743,7 +741,7 @@ static int autofs4_dir_mkdir(struct inode *dir, struct dentry *dentry, umode_t m/* Get/set timeout ioctl() operation */ #ifdef CONFIG_COMPAT static inline int autofs4_compat_get_set_timeout (struct autofs_sb_info *sbi, -compat_ulong_t __user *p) +compat_ulong_t __user *p) {int rv;unsigned long ntimeout;
@@ -762,7 +760,7 @@ static inline int autofs4_compat_get_set_timeout(struct autofs_sb_info *sbi,#endif static inline int autofs4_get_set_timeout (struct autofs_sb_info *sbi, -unsigned long __user *p) +unsigned long __user *p) {int rv;unsigned long ntimeout;
@@ -780,13 +778,15 @@ static inline int autofs4_get_set_timeout(struct autofs_sb_info *sbi, }/* Return protocol version */ -static inline int autofs4_get_protover (struct autofs_sb_info *sbi,int __user *p) +static inline int autofs4_get_protover (struct autofs_sb_info *sbi, +int __user *p) {return put_user (sbi->version, p); }/* Return protocol sub version */ -static inline int autofs4_get_protosubver (struct autofs_sb_info *sbi,int __user *p) +static inline int autofs4_get_protosubver (struct autofs_sb_info *sbi, +int __user *p) {return put_user (sbi->sub_version, p); }
@@ -882,7 +882,7 @@ static long autofs4_root_ioctl(struct file *filp,#ifdef CONFIG_COMPAT static long autofs4_root_compat_ioctl (struct file *filp, -unsigned int cmd,unsigned long arg) +unsigned int cmd,unsigned long arg) {struct inode *inode =file_inode (filp);int ret;
@@ -891,7 +891,7 @@ static long autofs4_root_compat_ioctl(struct file *filp, ret =autofs4_root_ioctl_unlocked (inode, filp, cmd, arg); else ret =autofs4_root_ioctl_unlocked (inode, filp, cmd, - (unsigned long )compat_ptr (arg)); + (unsigned long )compat_ptr (arg));return ret; }
fs/autofs4/symlink.c +1 -4
@@ -1,7 +1,4 @@ -/* -*- c -*- --------------------------------------------------------------- * -* -* linux/fs/autofs/symlink.c -* +/* * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved * * This file is part of the Linux kernel and is made available under
fs/autofs4/waitq.c +6 -8
@@ -1,7 +1,4 @@ -/* -*- c -*- --------------------------------------------------------------- * -* -* linux/fs/autofs/waitq.c -* +/* * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved * Copyright 2001-2006 Ian Kent <[email protected]> *
@@ -103,7 +100,8 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,size_t pktsz;DPRINTK ("wait id = 0x%08lx, name = %.*s, type=%d" , - (unsigned long ) wq->wait_queue_token, wq->name.len, wq->name.name, type); + (unsigned long ) wq->wait_queue_token, + wq->name.len, wq->name.name, type);memset (&pkt,0 ,sizeof pkt);/* For security reasons */
@@ -237,7 +235,7 @@ autofs4_find_wait(struct autofs_sb_info *sbi, struct qstr *qstr)if (wq->name.hash == qstr->hash && wq->name.len == qstr->len && wq->name.name && - !memcmp (wq->name.name, qstr->name, qstr->len)) + !memcmp (wq->name.name, qstr->name, qstr->len))break ; }return wq;
@@ -346,8 +344,8 @@ static int validate_request(struct autofs_wait_queue **wait,return 1 ; } -int autofs4_wait (struct autofs_sb_info *sbi,struct dentry *dentry, -enum autofs_notify notify) +int autofs4_wait (struct autofs_sb_info *sbi, +struct dentry *dentry,enum autofs_notify notify) {struct autofs_wait_queue *wq;struct qstr qstr;
include/linux/auto_fs.h +1 -4
@@ -1,7 +1,4 @@ -/* -*- linux-c -*- ------------------------------------------------------- * -* -* linux/include/linux/auto_fs.h -* +/* * Copyright 1997 Transmeta Corporation - All Rights Reserved * * This file is part of the Linux kernel and is made available under
Ian Kent
maintainerPATCH 2/10 autofs4 - fix string.h include in auto_dev-ioctl.h
In reply to Ian KentSince including linux/string.h will now do the right thing remove the conditional check.
--- include/linux/auto_dev-ioctl.h | 5 ----- 1 file changed, 5 deletions(-)
include/linux/auto_dev-ioctl.h +0 -5
@@ -11,12 +11,7 @@#define _LINUX_AUTO_DEV_IOCTL_H#include <linux/auto_fs.h> - -#ifdef __KERNEL__#include <linux/string.h> -#else -#include <string.h> -#endif /* __KERNEL__ */ #define AUTOFS_DEVICE_NAME "autofs"
Ian Kent
maintainerPATCH 3/10 autofs4 - move linux/auto_dev-ioctl.h to uapi/linux
In reply to Ian KentSince linux/auto_dev-ioctl.h wasn't included in include/linux/Kbuild (although I should have added it) it wasn't moved to uapi/linux as part of the uapi series.
--- include/linux/auto_dev-ioctl.h | 224 ----------------------------------- include/uapi/linux/auto_dev-ioctl.h | 224 +++++++++++++++++++++++++++++++++++ 2 files changed, 224 insertions(+), 224 deletions(-) delete mode 100644 include/linux/auto_dev-ioctl.h create mode 100644 include/uapi/linux/auto_dev-ioctl.h
include/linux/auto_dev-ioctl.h deleted +0 -224
@@ -1,224 +0,0 @@ -/* -* Copyright 2008 Red Hat, Inc. All rights reserved. -* Copyright 2008 Ian Kent <[email protected]> -* -* This file is part of the Linux kernel and is made available under -* the terms of the GNU General Public License, version 2, or at your -* option, any later version, incorporated herein by reference. -*/ - -#ifndef _LINUX_AUTO_DEV_IOCTL_H -#define _LINUX_AUTO_DEV_IOCTL_H - -#include <linux/auto_fs.h> -#include <linux/string.h> - -#define AUTOFS_DEVICE_NAME "autofs" - -#define AUTOFS_DEV_IOCTL_VERSION_MAJOR 1 -#define AUTOFS_DEV_IOCTL_VERSION_MINOR 0 - -#define AUTOFS_DEVID_LEN 16 - -#define AUTOFS_DEV_IOCTL_SIZE sizeof(struct autofs_dev_ioctl) - -/* -* An ioctl interface for autofs mount point control. -*/ - -struct args_protover { -__u32 version; -}; - -struct args_protosubver { -__u32 sub_version; -}; - -struct args_openmount { -__u32 devid; -}; - -struct args_ready { -__u32 token; -}; - -struct args_fail { -__u32 token; -__s32 status; -}; - -struct args_setpipefd { -__s32 pipefd; -}; - -struct args_timeout { -__u64 timeout; -}; - -struct args_requester { -__u32 uid; -__u32 gid; -}; - -struct args_expire { -__u32 how; -}; - -struct args_askumount { -__u32 may_umount; -}; - -struct args_ismountpoint { -union { -struct args_in { -__u32 type; - } in; -struct args_out { -__u32 devid; -__u32 magic; - } out; - }; -}; - -/* -* All the ioctls use this structure. -* When sending a path size must account for the total length -* of the chunk of memory otherwise is is the size of the -* structure. -*/ - -struct autofs_dev_ioctl { -__u32 ver_major; -__u32 ver_minor; -__u32 size;/* total size of data passed in -* including this struct */ -__s32 ioctlfd;/* automount command fd */ - -/* Command parameters */ - -union { -struct args_protover protover; -struct args_protosubver protosubver; -struct args_openmount openmount; -struct args_ready ready; -struct args_fail fail; -struct args_setpipefd setpipefd; -struct args_timeout timeout; -struct args_requester requester; -struct args_expire expire; -struct args_askumount askumount; -struct args_ismountpoint ismountpoint; - }; - -char path[0 ]; -}; - -static inline void init_autofs_dev_ioctl (struct autofs_dev_ioctl *in) -{ -memset (in,0 ,sizeof (struct autofs_dev_ioctl )); - in->ver_major =AUTOFS_DEV_IOCTL_VERSION_MAJOR ; - in->ver_minor =AUTOFS_DEV_IOCTL_VERSION_MINOR ; - in->size =sizeof (struct autofs_dev_ioctl ); - in->ioctlfd =-1 ; -return ; -} - -/* -* If you change this make sure you make the corresponding change -* to autofs-dev-ioctl.c:lookup_ioctl() -*/ -enum { -/* Get various version info */ -AUTOFS_DEV_IOCTL_VERSION_CMD =0x71 , -AUTOFS_DEV_IOCTL_PROTOVER_CMD , -AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD , - -/* Open mount ioctl fd */ -AUTOFS_DEV_IOCTL_OPENMOUNT_CMD , - -/* Close mount ioctl fd */ -AUTOFS_DEV_IOCTL_CLOSEMOUNT_CMD , - -/* Mount/expire status returns */ -AUTOFS_DEV_IOCTL_READY_CMD , -AUTOFS_DEV_IOCTL_FAIL_CMD , - -/* Activate/deactivate autofs mount */ -AUTOFS_DEV_IOCTL_SETPIPEFD_CMD , -AUTOFS_DEV_IOCTL_CATATONIC_CMD , - -/* Expiry timeout */ -AUTOFS_DEV_IOCTL_TIMEOUT_CMD , - -/* Get mount last requesting uid and gid */ -AUTOFS_DEV_IOCTL_REQUESTER_CMD , - -/* Check for eligible expire candidates */ -AUTOFS_DEV_IOCTL_EXPIRE_CMD , - -/* Request busy status */ -AUTOFS_DEV_IOCTL_ASKUMOUNT_CMD , - -/* Check if path is a mountpoint */ -AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD , -}; - -#define AUTOFS_IOCTL 0x93 - -#define AUTOFS_DEV_IOCTL_VERSION \ - _IOWR(AUTOFS_IOCTL, \ - AUTOFS_DEV_IOCTL_VERSION_CMD, struct autofs_dev_ioctl) - -#define AUTOFS_DEV_IOCTL_PROTOVER \ - _IOWR(AUTOFS_IOCTL, \ - AUTOFS_DEV_IOCTL_PROTOVER_CMD, struct autofs_dev_ioctl) - -#define AUTOFS_DEV_IOCTL_PROTOSUBVER \ - _IOWR(AUTOFS_IOCTL, \ - AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD, struct autofs_dev_ioctl) - -#define AUTOFS_DEV_IOCTL_OPENMOUNT \ - _IOWR(AUTOFS_IOCTL, \ - AUTOFS_DEV_IOCTL_OPENMOUNT_CMD, struct autofs_dev_ioctl) - -#define AUTOFS_DEV_IOCTL_CLOSEMOUNT \ - _IOWR(AUTOFS_IOCTL, \ - AUTOFS_DEV_IOCTL_CLOSEMOUNT_CMD, struct autofs_dev_ioctl) - -#define AUTOFS_DEV_IOCTL_READY \ - _IOWR(AUTOFS_IOCTL, \ - AUTOFS_DEV_IOCTL_READY_CMD, struct autofs_dev_ioctl) - -#define AUTOFS_DEV_IOCTL_FAIL \ - _IOWR(AUTOFS_IOCTL, \ - AUTOFS_DEV_IOCTL_FAIL_CMD, struct autofs_dev_ioctl) - -#define AUTOFS_DEV_IOCTL_SETPIPEFD \ - _IOWR(AUTOFS_IOCTL, \ - AUTOFS_DEV_IOCTL_SETPIPEFD_CMD, struct autofs_dev_ioctl) - -#define AUTOFS_DEV_IOCTL_CATATONIC \ - _IOWR(AUTOFS_IOCTL, \ - AUTOFS_DEV_IOCTL_CATATONIC_CMD, struct autofs_dev_ioctl) - -#define AUTOFS_DEV_IOCTL_TIMEOUT \ - _IOWR(AUTOFS_IOCTL, \ - AUTOFS_DEV_IOCTL_TIMEOUT_CMD, struct autofs_dev_ioctl) - -#define AUTOFS_DEV_IOCTL_REQUESTER \ - _IOWR(AUTOFS_IOCTL, \ - AUTOFS_DEV_IOCTL_REQUESTER_CMD, struct autofs_dev_ioctl) - -#define AUTOFS_DEV_IOCTL_EXPIRE \ - _IOWR(AUTOFS_IOCTL, \ - AUTOFS_DEV_IOCTL_EXPIRE_CMD, struct autofs_dev_ioctl) - -#define AUTOFS_DEV_IOCTL_ASKUMOUNT \ - _IOWR(AUTOFS_IOCTL, \ - AUTOFS_DEV_IOCTL_ASKUMOUNT_CMD, struct autofs_dev_ioctl) - -#define AUTOFS_DEV_IOCTL_ISMOUNTPOINT \ - _IOWR(AUTOFS_IOCTL, \ - AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD, struct autofs_dev_ioctl) - -#endif /* _LINUX_AUTO_DEV_IOCTL_H */
include/uapi/linux/auto_dev-ioctl.h new file +224 -0
224 lines not on this page · raw message
Ian Kent
maintainerPATCH 4/10 autofs - merge auto_fs.h and auto_fs4.h
In reply to Ian KentThe autofs module has long since been removed so there's no need to have two separate include files for autofs.
--- fs/autofs4/autofs_i.h | 2 - fs/compat_ioctl.c | 1 include/uapi/linux/auto_fs.h | 156 +++++++++++++++++++++++++++++++++++++--- include/uapi/linux/auto_fs4.h | 158 +---------------------------------------- 4 files changed, 149 insertions(+), 168 deletions(-)
fs/autofs4/autofs_i.h +1 -1
@@ -10,7 +10,7 @@/* Internal header file for autofs */ -#include <linux/auto_fs4.h> +#include <linux/auto_fs.h> #include <linux/auto_dev-ioctl.h> #include <linux/mutex.h> #include <linux/spinlock.h>
fs/compat_ioctl.c +0 -1
@@ -38,7 +38,6 @@#include <linux/if_pppox.h> #include <linux/mtio.h> #include <linux/auto_fs.h> -#include <linux/auto_fs4.h> #include <linux/tty.h> #include <linux/vt_kern.h> #include <linux/fb.h>
include/uapi/linux/auto_fs.h +144 -12
176 lines not on this page · raw message
include/uapi/linux/auto_fs4.h +4 -154
167 lines not on this page · raw message
Ian Kent
maintainerPATCH 5/10 autofs - use autofs instead of autofs4 everywhere
In reply to Ian KentUpdate naming within autofs source to be consistent by changing occurrences of autofs4 to autofs.
--- fs/autofs4/autofs_i.h | 92 +++++++++-------- fs/autofs4/dev-ioctl.c | 18 ++- fs/autofs4/expire.c | 128 ++++++++++++------------ fs/autofs4/init.c | 12 +- fs/autofs4/inode.c | 46 ++++----- fs/autofs4/root.c | 256 ++++++++++++++++++++++++------------------------ fs/autofs4/symlink.c | 6 + fs/autofs4/waitq.c | 55 +++++----- 8 files changed, 307 insertions(+), 306 deletions(-)
fs/autofs4/autofs_i.h +46 -46
@@ -123,29 +123,29 @@ struct autofs_sb_info {struct list_head expiring_list; }; -static inline struct autofs_sb_info *autofs4_sbi (struct super_block *sb) +static inline struct autofs_sb_info *autofs_sbi (struct super_block *sb) {return (struct autofs_sb_info *)(sb->s_fs_info); } -static inline struct autofs_info *autofs4_dentry_ino (struct dentry *dentry) +static inline struct autofs_info *autofs_dentry_ino (struct dentry *dentry) {return (struct autofs_info *)(dentry->d_fsdata); } -/* autofs4_oz_mode(): do we see the man behind the curtain? (The +/* autofs_oz_mode(): do we see the man behind the curtain? (The processes which do manipulations for us in user space sees the raw filesystem without "magic".) */ -static inline int autofs4_oz_mode (struct autofs_sb_info *sbi) +static inline int autofs_oz_mode (struct autofs_sb_info *sbi) {return sbi->catatonic ||task_pgrp (current) == sbi->oz_pgrp; }/* Does a dentry have some pending activity? */ -static inline int autofs4_ispending (struct dentry *dentry) +static inline int autofs_ispending (struct dentry *dentry) { -struct autofs_info *inf =autofs4_dentry_ino (dentry); +struct autofs_info *inf =autofs_dentry_ino (dentry);if (inf->flags &AUTOFS_INF_PENDING )return 1 ;
@@ -156,25 +156,25 @@ static inline int autofs4_ispending(struct dentry *dentry)return 0 ; } -struct inode *autofs4_get_inode (struct super_block *,umode_t ); -void autofs4_free_ino (struct autofs_info *); +struct inode *autofs_get_inode (struct super_block *,umode_t ); +void autofs_free_ino (struct autofs_info *);/* Expiration */ -int is_autofs4_dentry (struct dentry *); -int autofs4_expire_wait (struct dentry *dentry); -int autofs4_expire_run (struct super_block *,struct vfsmount *, -struct autofs_sb_info *, -struct autofs_packet_expire __user *); -int autofs4_do_expire_multi (struct super_block *sb,struct vfsmount *mnt, -struct autofs_sb_info *sbi,int when); -int autofs4_expire_multi (struct super_block *,struct vfsmount *, -struct autofs_sb_info *,int __user *); -struct dentry *autofs4_expire_direct (struct super_block *sb, -struct vfsmount *mnt, -struct autofs_sb_info *sbi,int how); -struct dentry *autofs4_expire_indirect (struct super_block *sb, -struct vfsmount *mnt, -struct autofs_sb_info *sbi,int how); +int is_autofs_dentry (struct dentry *); +int autofs_expire_wait (struct dentry *dentry); +int autofs_expire_run (struct super_block *,struct vfsmount *, +struct autofs_sb_info *, +struct autofs_packet_expire __user *); +int autofs_do_expire_multi (struct super_block *sb,struct vfsmount *mnt, +struct autofs_sb_info *sbi,int when); +int autofs_expire_multi (struct super_block *,struct vfsmount *, +struct autofs_sb_info *,int __user *); +struct dentry *autofs_expire_direct (struct super_block *sb, +struct vfsmount *mnt, +struct autofs_sb_info *sbi,int how); +struct dentry *autofs_expire_indirect (struct super_block *sb, +struct vfsmount *mnt, +struct autofs_sb_info *sbi,int how);/* Device node initialization */
@@ -183,11 +183,11 @@ void autofs_dev_ioctl_exit(void);/* Operations structures */ -extern const struct inode_operations autofs4_symlink_inode_operations; -extern const struct inode_operations autofs4_dir_inode_operations; -extern const struct file_operations autofs4_dir_operations; -extern const struct file_operations autofs4_root_operations; -extern const struct dentry_operations autofs4_dentry_operations; +extern const struct inode_operations autofs_symlink_inode_operations; +extern const struct inode_operations autofs_dir_inode_operations; +extern const struct file_operations autofs_dir_operations; +extern const struct file_operations autofs_root_operations; +extern const struct dentry_operations autofs_dentry_operations;/* VFS automount flags management functions */
@@ -265,9 +265,9 @@ static inline void managed_dentry_clear_managed(struct dentry *dentry)/* Initializing function */ -int autofs4_fill_super (struct super_block *,void *,int ); -struct autofs_info *autofs4_new_ino (struct autofs_sb_info *); -void autofs4_clean_ino (struct autofs_info *); +int autofs_fill_super (struct super_block *,void *,int ); +struct autofs_info *autofs_new_ino (struct autofs_sb_info *); +void autofs_clean_ino (struct autofs_info *);static inline int autofs_prepare_pipe (struct file *pipe) {
@@ -282,16 +282,16 @@ static inline int autofs_prepare_pipe(struct file *pipe)/* Queue management functions */ -int autofs4_wait (struct autofs_sb_info *,struct dentry *,enum autofs_notify ); -int autofs4_wait_release (struct autofs_sb_info *,autofs_wqt_t ,int ); -void autofs4_catatonic_mode (struct autofs_sb_info *); +int autofs_wait (struct autofs_sb_info *,struct dentry *,enum autofs_notify ); +int autofs_wait_release (struct autofs_sb_info *,autofs_wqt_t ,int ); +void autofs_catatonic_mode (struct autofs_sb_info *); -static inline u32 autofs4_get_dev (struct autofs_sb_info *sbi) +static inline u32 autofs_get_dev (struct autofs_sb_info *sbi) {return new_encode_dev (sbi->sb->s_dev); } -static inline u64 autofs4_get_ino (struct autofs_sb_info *sbi) +static inline u64 autofs_get_ino (struct autofs_sb_info *sbi) {return sbi->sb->s_root->d_inode->i_ino; }
@@ -301,10 +301,10 @@ static inline int simple_positive(struct dentry *dentry)return dentry->d_inode && !d_unhashed (dentry); } -static inline void __autofs4_add_expiring (struct dentry *dentry) +static inline void __autofs_add_expiring (struct dentry *dentry) { -struct autofs_sb_info *sbi =autofs4_sbi (dentry->d_sb); -struct autofs_info *ino =autofs4_dentry_ino (dentry); +struct autofs_sb_info *sbi =autofs_sbi (dentry->d_sb); +struct autofs_info *ino =autofs_dentry_ino (dentry);if (ino) {if (list_empty (&ino->expiring))list_add (&ino->expiring, &sbi->expiring_list);
@@ -312,10 +312,10 @@ static inline void __autofs4_add_expiring(struct dentry *dentry)return ; } -static inline void autofs4_add_expiring (struct dentry *dentry) +static inline void autofs_add_expiring (struct dentry *dentry) { -struct autofs_sb_info *sbi =autofs4_sbi (dentry->d_sb); -struct autofs_info *ino =autofs4_dentry_ino (dentry); +struct autofs_sb_info *sbi =autofs_sbi (dentry->d_sb); +struct autofs_info *ino =autofs_dentry_ino (dentry);if (ino) {spin_lock (&sbi->lookup_lock);if (list_empty (&ino->expiring))
@@ -325,10 +325,10 @@ static inline void autofs4_add_expiring(struct dentry *dentry)return ; } -static inline void autofs4_del_expiring (struct dentry *dentry) +static inline void autofs_del_expiring (struct dentry *dentry) { -struct autofs_sb_info *sbi =autofs4_sbi (dentry->d_sb); -struct autofs_info *ino =autofs4_dentry_ino (dentry); +struct autofs_sb_info *sbi =autofs_sbi (dentry->d_sb); +struct autofs_info *ino =autofs_dentry_ino (dentry);if (ino) {spin_lock (&sbi->lookup_lock);if (!list_empty (&ino->expiring))
@@ -338,4 +338,4 @@ static inline void autofs4_del_expiring(struct dentry *dentry)return ; } -extern void autofs4_kill_sb (struct super_block *); +extern void autofs_kill_sb (struct super_block *);
fs/autofs4/dev-ioctl.c +9 -9
@@ -160,7 +160,7 @@ static struct autofs_sb_info *autofs_dev_ioctl_sbi(struct file *f)if (f) { inode =file_inode (f); - sbi =autofs4_sbi (inode->i_sb); + sbi =autofs_sbi (inode->i_sb); }return sbi; }
@@ -217,7 +217,7 @@ static int test_by_dev(struct path *path, void *p)static int test_by_type (struct path *path,void *p) { -struct autofs_info *ino =autofs4_dentry_ino (path->dentry); +struct autofs_info *ino =autofs_dentry_ino (path->dentry);return ino && ino->sbi->type & *(unsigned *)p; }
@@ -309,7 +309,7 @@ static int autofs_dev_ioctl_ready(struct file *fp,autofs_wqt_t token; token = (autofs_wqt_t ) param->ready.token; -return autofs4_wait_release (sbi, token,0 ); +return autofs_wait_release (sbi, token,0 ); }/*
@@ -325,7 +325,7 @@ static int autofs_dev_ioctl_fail(struct file *fp, token = (autofs_wqt_t ) param->fail.token; status = param->fail.status ? param->fail.status : -ENOENT ; -return autofs4_wait_release (sbi, token, status); +return autofs_wait_release (sbi, token, status); }/*
@@ -397,7 +397,7 @@ static int autofs_dev_ioctl_catatonic(struct file *fp,struct autofs_sb_info *sbi, struct autofs_dev_ioctl *param) { -autofs4_catatonic_mode (sbi ); +autofs_catatonic_mode (sbi );return 0 ; }
@@ -444,10 +444,10 @@ static int autofs_dev_ioctl_requester(struct file *fp,if (err) goto out; - ino =autofs4_dentry_ino (path.dentry); + ino =autofs_dentry_ino (path.dentry);if (ino) { err =0 ; -autofs4_expire_wait (path.dentry); +autofs_expire_wait (path.dentry);spin_lock (&sbi->fs_lock); param->requester.uid =from_kuid_munged (current_user_ns (), ino->uid); param->requester.gid =from_kgid_munged (current_user_ns (), ino->gid);
@@ -472,7 +472,7 @@ static int autofs_dev_ioctl_expire(struct file *fp, how = param->expire.how; mnt = fp->f_path.mnt; -return autofs4_do_expire_multi (sbi->sb, mnt, sbi, how); +return autofs_do_expire_multi (sbi->sb, mnt, sbi, how); }/* Check if autofs mount point is in use */
@@ -686,7 +686,7 @@ static int _autofs_dev_ioctl(unsigned int command, struct autofs_dev_ioctl __use* Admin needs to be able to set the mount catatonic in * order to be able to perform the re-open. */ -if (!autofs4_oz_mode (sbi) && +if (!autofs_oz_mode (sbi) && cmd !=AUTOFS_DEV_IOCTL_CATATONIC_CMD ) { err = -EACCES ;fput (fp);
fs/autofs4/expire.c +64 -64
334 lines not on this page · raw message
fs/autofs4/init.c +6 -6
@@ -14,18 +14,18 @@static struct dentry *autofs_mount (struct file_system_type *fs_type,int flags,const char *dev_name,void *data) { -return mount_nodev (fs_type, flags, data, autofs4_fill_super); +return mount_nodev (fs_type, flags, data, autofs_fill_super); }static struct file_system_type autofs_fs_type = { .owner =THIS_MODULE , .name ="autofs" , .mount = autofs_mount, - .kill_sb = autofs4_kill_sb, + .kill_sb = autofs_kill_sb, };MODULE_ALIAS_FS ("autofs" ); -static int __init init_autofs4_fs (void ) +static int __init init_autofs_fs (void ) {int err;
@@ -38,12 +38,12 @@ static int __init init_autofs4_fs(void)return err; } -static void __exit exit_autofs4_fs(void) +static void __exit exit_autofs_fs(void) {autofs_dev_ioctl_exit ();unregister_filesystem (&autofs_fs_type); } -module_init(init_autofs4_fs) -module_exit(exit_autofs4_fs) +module_init(init_autofs_fs) +module_exit(exit_autofs_fs) MODULE_LICENSE("GPL");
fs/autofs4/inode.c +23 -23
132 lines not on this page · raw message
fs/autofs4/root.c +128 -128
644 lines not on this page · raw message
fs/autofs4/symlink.c +3 -3
@@ -9,13 +9,13 @@#include "autofs_i.h" -static void *autofs4_follow_link (struct dentry *dentry,struct nameidata *nd) +static void *autofs_follow_link (struct dentry *dentry,struct nameidata *nd) {nd_set_link (nd, dentry->d_inode->i_private);return NULL ; } -const struct inode_operations autofs4_symlink_inode_operations = { +const struct inode_operations autofs_symlink_inode_operations = { .readlink = generic_readlink, - .follow_link = autofs4_follow_link + .follow_link = autofs_follow_link };
fs/autofs4/waitq.c +28 -27
160 lines not on this page · raw message
Ian Kent
maintainerPATCH 6/10 autofs - copy autofs4 to autofs
In reply to Ian KentCopy source files from the autofs4 directory to the autofs directory.
--- fs/autofs/autofs_i.h | 341 +++++++++++++++++++ fs/autofs/dev-ioctl.c | 759 +++++++++++++++++++++++++++++++++++++++++ fs/autofs/expire.c | 561 +++++++++++++++++++++++++++++++ fs/autofs/init.c | 49 +++ fs/autofs/inode.c | 368 ++++++++++++++++++++ fs/autofs/root.c | 898 +++++++++++++++++++++++++++++++++++++++++++++++++ fs/autofs/symlink.c | 21 + fs/autofs/waitq.c | 570 +++++++++++++++++++++++++++++++ 8 files changed, 3567 insertions(+) create mode 100644 fs/autofs/autofs_i.h create mode 100644 fs/autofs/dev-ioctl.c create mode 100644 fs/autofs/expire.c create mode 100644 fs/autofs/init.c create mode 100644 fs/autofs/inode.c create mode 100644 fs/autofs/root.c create mode 100644 fs/autofs/symlink.c create mode 100644 fs/autofs/waitq.c
fs/autofs/autofs_i.h new file +341 -0
@@ -0,0 +1,341 @@ +/* +* Copyright 1997-1998 Transmeta Corporation - All Rights Reserved +* Copyright 2005-2006 Ian Kent <[email protected]> +* +* This file is part of the Linux kernel and is made available under +* the terms of the GNU General Public License, version 2, or at your +* option, any later version, incorporated herein by reference. +* +* ----------------------------------------------------------------------- */ + +/* Internal header file for autofs */ + +#include <linux/auto_fs.h> +#include <linux/auto_dev-ioctl.h> +#include <linux/mutex.h> +#include <linux/spinlock.h> +#include <linux/list.h> + +/* This is the range of ioctl() numbers we claim as ours */ +#define AUTOFS_IOC_FIRST AUTOFS_IOC_READY +#define AUTOFS_IOC_COUNT 32 + +#define AUTOFS_DEV_IOCTL_IOC_FIRST (AUTOFS_DEV_IOCTL_VERSION) +#define AUTOFS_DEV_IOCTL_IOC_COUNT (AUTOFS_IOC_COUNT - 11) + +#include <linux/kernel.h> +#include <linux/slab.h> +#include <linux/time.h> +#include <linux/string.h> +#include <linux/wait.h> +#include <linux/sched.h> +#include <linux/mount.h> +#include <linux/namei.h> +#include <asm/current.h> +#include <asm/uaccess.h> + +/* #define DEBUG */ + +#define DPRINTK (fmt, ...) \ + pr_debug("pid %d: %s: " fmt "\n", \ + current->pid, __func__, ##__VA_ARGS__) + +#define AUTOFS_WARN (fmt, ...) \ + printk(KERN_WARNING "pid %d: %s: " fmt "\n", \ + current->pid, __func__, ##__VA_ARGS__) + +#define AUTOFS_ERROR (fmt, ...) \ + printk(KERN_ERR "pid %d: %s: " fmt "\n", \ + current->pid, __func__, ##__VA_ARGS__) + +/* +* Unified info structure. This is pointed to by both the dentry and +* inode structures. Each file in the filesystem has an instance of this +* structure. It holds a reference to the dentry, so dentries are never +* flushed while the file exists. All name lookups are dealt with at the +* dentry level, although the filesystem can interfere in the validation +* process. Readdir is implemented by traversing the dentry lists. +*/ +struct autofs_info { +struct dentry *dentry; +struct inode *inode; + +int flags; + +struct completion expire_complete; + +struct list_head active; +int active_count; + +struct list_head expiring; + +struct autofs_sb_info *sbi; +unsigned long last_used; +atomic_t count; + +kuid_t uid; +kgid_t gid; +}; + +#define AUTOFS_INF_EXPIRING (1<<0)/* dentry in the process of expiring */ +#define AUTOFS_INF_PENDING (1<<2)/* dentry pending mount */ + +struct autofs_wait_queue { +wait_queue_head_t queue; +struct autofs_wait_queue *next; +autofs_wqt_t wait_queue_token; +/* We use the following to see what we are waiting for */ +struct qstr name; +u32 dev; +u64 ino; +kuid_t uid; +kgid_t gid; +pid_t pid; +pid_t tgid; +/* This is for status reporting upon return */ +int status; +unsigned int wait_ctr; +}; + +#define AUTOFS_SBI_MAGIC 0x6d4a556d + +struct autofs_sb_info { +u32 magic; +int pipefd; +struct file *pipe; +struct pid *oz_pgrp; +int catatonic; +int version; +int sub_version; +int min_proto; +int max_proto; +unsigned long exp_timeout; +unsigned int type; +int reghost_enabled; +int needs_reghost; +struct super_block *sb; +struct mutex wq_mutex; +struct mutex pipe_mutex; +spinlock_t fs_lock; +struct autofs_wait_queue *queues;/* Wait queue pointer */ +spinlock_t lookup_lock; +struct list_head active_list; +struct list_head expiring_list; +}; + +static inline struct autofs_sb_info *autofs_sbi (struct super_block *sb) +{ +return (struct autofs_sb_info *)(sb->s_fs_info); +} + +static inline struct autofs_info *autofs_dentry_ino (struct dentry *dentry) +{ +return (struct autofs_info *)(dentry->d_fsdata); +} + +/* autofs_oz_mode(): do we see the man behind the curtain? (The +processes which do manipulations for us in user space sees the raw +filesystem without "magic".) */ + +static inline int autofs_oz_mode (struct autofs_sb_info *sbi) +{ +return sbi->catatonic ||task_pgrp (current) == sbi->oz_pgrp; +} + +/* Does a dentry have some pending activity? */ +static inline int autofs_ispending (struct dentry *dentry) +{ +struct autofs_info *inf =autofs_dentry_ino (dentry); + +if (inf->flags &AUTOFS_INF_PENDING ) +return 1 ; + +if (inf->flags &AUTOFS_INF_EXPIRING ) +return 1 ; + +return 0 ; +} + +struct inode *autofs_get_inode (struct super_block *,umode_t ); +void autofs_free_ino (struct autofs_info *); + +/* Expiration */ +int is_autofs_dentry (struct dentry *); +int autofs_expire_wait (struct dentry *dentry); +int autofs_expire_run (struct super_block *,struct vfsmount *, +struct autofs_sb_info *, +struct autofs_packet_expire __user *); +int autofs_do_expire_multi (struct super_block *sb,struct vfsmount *mnt, +struct autofs_sb_info *sbi,int when); +int autofs_expire_multi (struct super_block *,struct vfsmount *, +struct autofs_sb_info *,int __user *); +struct dentry *autofs_expire_direct (struct super_block *sb, +struct vfsmount *mnt, +struct autofs_sb_info *sbi,int how); +struct dentry *autofs_expire_indirect (struct super_block *sb, +struct vfsmount *mnt, +struct autofs_sb_info *sbi,int how); + +/* Device node initialization */ + +int autofs_dev_ioctl_init (void ); +void autofs_dev_ioctl_exit (void ); + +/* Operations structures */ + +extern const struct inode_operations autofs_symlink_inode_operations; +extern const struct inode_operations autofs_dir_inode_operations; +extern const struct file_operations autofs_dir_operations; +extern const struct file_operations autofs_root_operations; +extern const struct dentry_operations autofs_dentry_operations; + +/* VFS automount flags management functions */ + +static inline void __managed_dentry_set_automount (struct dentry *dentry) +{ + dentry->d_flags |=DCACHE_NEED_AUTOMOUNT ; +} + +static inline void managed_dentry_set_automount (struct dentry *dentry) +{ +spin_lock (&dentry->d_lock); +__managed_dentry_set_automount (dentry); +spin_unlock (&dentry->d_lock); +} + +static inline void __managed_dentry_clear_automount (struct dentry *dentry) +{ + dentry->d_flags &= ~DCACHE_NEED_AUTOMOUNT ; +} + +static inline void managed_dentry_clear_automount (struct dentry *dentry) +{ +spin_lock (&dentry->d_lock); +__managed_dentry_clear_automount (dentry); +spin_unlock (&dentry->d_lock); +} + +static inline void __managed_dentry_set_transit (struct dentry *dentry) +{ + dentry->d_flags |=DCACHE_MANAGE_TRANSIT ; +} + +static inline void managed_dentry_set_transit (struct dentry *dentry) +{ +spin_lock (&dentry->d_lock); +__managed_dentry_set_transit (dentry); +spin_unlock (&dentry->d_lock); +} + +static inline void __managed_dentry_clear_transit (struct dentry *dentry) +{ + dentry->d_flags &= ~DCACHE_MANAGE_TRANSIT ; +} + +static inline void managed_dentry_clear_transit (struct dentry *dentry) +{ +spin_lock (&dentry->d_lock); +__managed_dentry_clear_transit (dentry); +spin_unlock (&dentry->d_lock); +} + +static inline void __managed_dentry_set_managed (struct dentry *dentry) +{ + dentry->d_flags |= (DCACHE_NEED_AUTOMOUNT |DCACHE_MANAGE_TRANSIT ); +} + +static inline void managed_dentry_set_managed (struct dentry *dentry) +{ +spin_lock (&dentry->d_lock); +__managed_dentry_set_managed (dentry); +spin_unlock (&dentry->d_lock); +} + +static inline void __managed_dentry_clear_managed (struct dentry *dentry) +{ + dentry->d_flags &= ~(DCACHE_NEED_AUTOMOUNT |DCACHE_MANAGE_TRANSIT ); +} + +static inline void managed_dentry_clear_managed (struct dentry *dentry) +{ +spin_lock (&dentry->d_lock); +__managed_dentry_clear_managed (dentry); +spin_unlock (&dentry->d_lock); +} + +/* Initializing function */ + +int autofs_fill_super (struct super_block *,void *,int ); +struct autofs_info *autofs_new_ino (struct autofs_sb_info *); +void autofs_clean_ino (struct autofs_info *); + +static inline int autofs_prepare_pipe (struct file *pipe) +{ +if (!pipe->f_op || !pipe->f_op->write) +return -EINVAL ; +if (!S_ISFIFO (file_inode (pipe)->i_mode)) +return -EINVAL ; +/* We want a packet pipe */ + pipe->f_flags |=O_DIRECT ; +return 0 ; +} + +/* Queue management functions */ + +int autofs_wait (struct autofs_sb_info *,struct dentry *,enum autofs_notify ); +int autofs_wait_release (struct autofs_sb_info *,autofs_wqt_t ,int ); +void autofs_catatonic_mode (struct autofs_sb_info *); + +static inline u32 autofs_get_dev (struct autofs_sb_info *sbi) +{ +return new_encode_dev (sbi->sb->s_dev); +} + +static inline u64 autofs_get_ino (struct autofs_sb_info *sbi) +{ +return sbi->sb->s_root->d_inode->i_ino; +} + +static inline int simple_positive (struct dentry *dentry) +{ +return dentry->d_inode && !d_unhashed (dentry); +} + +static inline void __autofs_add_expiring (struct dentry *dentry) +{ +struct autofs_sb_info *sbi =autofs_sbi (dentry->d_sb); +struct autofs_info *ino =autofs_dentry_ino (dentry); +if (ino) { +if (list_empty (&ino->expiring)) +list_add (&ino->expiring, &sbi->expiring_list); + } +return ; +} + +static inline void autofs_add_expiring (struct dentry *dentry) +{ +struct autofs_sb_info *sbi =autofs_sbi (dentry->d_sb); +struct autofs_info *ino =autofs_dentry_ino (dentry); +if (ino) { +spin_lock (&sbi->lookup_lock); +if (list_empty (&ino->expiring)) +list_add (&ino->expiring, &sbi->expiring_list); +spin_unlock (&sbi->lookup_lock); + } +return ; +} + +static inline void autofs_del_expiring (struct dentry *dentry) +{ +struct autofs_sb_info *sbi =autofs_sbi (dentry->d_sb); +struct autofs_info *ino =autofs_dentry_ino (dentry); +if (ino) { +spin_lock (&sbi->lookup_lock); +if (!list_empty (&ino->expiring)) +list_del_init (&ino->expiring); +spin_unlock (&sbi->lookup_lock); + } +return ; +} + +extern void autofs_kill_sb (struct super_block *);
fs/autofs/dev-ioctl.c new file +759 -0
759 lines not on this page · raw message
fs/autofs/expire.c new file +561 -0
561 lines not on this page · raw message
fs/autofs/init.c new file +49 -0
49 lines not on this page · raw message
fs/autofs/inode.c new file +368 -0
368 lines not on this page · raw message
fs/autofs/root.c new file +898 -0
898 lines not on this page · raw message
fs/autofs/symlink.c new file +21 -0
@@ -0,0 +1,21 @@ +/* +* Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved +* +* This file is part of the Linux kernel and is made available under +* the terms of the GNU General Public License, version 2, or at your +* option, any later version, incorporated herein by reference. +* +* ------------------------------------------------------------------------- */ + +#include "autofs_i.h" + +static void *autofs_follow_link (struct dentry *dentry,struct nameidata *nd) +{ +nd_set_link (nd, dentry->d_inode->i_private); +return NULL ; +} + +const struct inode_operations autofs_symlink_inode_operations = { + .readlink = generic_readlink, + .follow_link = autofs_follow_link +};
fs/autofs/waitq.c new file +570 -0
3 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Ian Kent
maintainerPATCH 7/10 autofs - create autofs Kconfig and Makefile
In reply to Ian KentCreate Makefile and Kconfig for autofs module.
--- fs/Kconfig | 1 + fs/Makefile | 1 + fs/autofs/Kconfig | 19 +++++++++++++++++++ fs/autofs/Makefile | 7 +++++++ 4 files changed, 28 insertions(+) create mode 100644 fs/autofs/Kconfig create mode 100644 fs/autofs/Makefile
fs/Kconfig +1 -0
@@ -65,6 +65,7 @@ source "fs/notify/Kconfig" source "fs/quota/Kconfig" +source "fs/autofs/Kconfig" source "fs/autofs4/Kconfig" source "fs/fuse/Kconfig"
fs/Makefile +1 -0
@@ -102,6 +102,7 @@ obj-$(CONFIG_AFFS_FS) += affs/ obj-$(CONFIG_ROMFS_FS) += romfs/ obj-$(CONFIG_QNX4FS_FS) += qnx4/ obj-$(CONFIG_QNX6FS_FS) += qnx6/ +obj-$(CONFIG_AUTOFS_FS) += autofs/ obj-$(CONFIG_AUTOFS4_FS) += autofs4/ obj-$(CONFIG_ADFS_FS) += adfs/ obj-$(CONFIG_FUSE_FS) += fuse/
fs/autofs/Kconfig new file +19 -0
@@ -0,0 +1,19 @@ +config AUTOFS_FS + tristate "Kernel automounter support (supports v3, v4 and v5)" + help + The automounter is a tool to automatically mount remote file systems + on demand. This implementation is partially kernel-based to reduce + overhead in the already-mounted case; this is unlike the BSD + automounter (amd), which is a pure user space daemon. + + To use the automounter you need the user-space tools from + <ftp://ftp.kernel.org/pub/linux/daemons/autofs/>; you also want + to answer Y to "NFS file system support", below. + + To compile this support as a module, choose M here: the module will be + called autofs. + + If you are not a part of a fairly large, distributed network or + don't have a laptop which needs to dynamically reconfigure to the + local network, you probably do not need an automounter, and can say + N here.
fs/autofs/Makefile new file +7 -0
@@ -0,0 +1,7 @@ +# +# Makefile for the linux autofs-filesystem routines. +# + +obj-$(CONFIG_AUTOFS_FS) += autofs.o + +autofs-objs := init.o inode.o root.o symlink.o waitq.o expire.o dev-ioctl.o
Ian Kent
maintainerPATCH 8/10 autofs - update fs/autofs4/Kconfig
In reply to Ian KentUpdate Kconfig and add a depricated warning.
--- fs/autofs4/Kconfig | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-)
fs/autofs4/Kconfig +20 -10
@@ -1,5 +1,5 @@ config AUTOFS4_FS - tristate "Kernel automounter version 4 support (also supports v3)" + tristate "Kernel automounter support (supports v3, v4 and v5)" help The automounter is a tool to automatically mount remote file systems on demand. This implementation is partially kernel-based to reduce
@@ -7,14 +7,24 @@ config AUTOFS4_FS automounter (amd), which is a pure user space daemon. To use the automounter you need the user-space tools from - <ftp://ftp.kernel.org/pub/linux/daemons/autofs/v4/>; you also - want to answer Y to "NFS file system support", below. + <ftp://ftp.kernel.org/pub/linux/daemons/autofs/>; you also want + to answer Y to "NFS file system support", below. - To compile this support as a module, choose M here: the module will be - called autofs4. You will need to add "alias autofs autofs4" to your - modules configuration file. + This module is in the process of being renamed from autofs4 to autofs + since is now the only module that provides the autofs file system and + the module is not version 4 specific. - If you are not a part of a fairly large, distributed network or - don't have a laptop which needs to dynamically reconfigure to the - local network, you probably do not need an automounter, and can say - N here. + It is now built from the source located in fs/autofs and this directory + and the configuration entry will be removed two kernel version from the + inclusion of this change. + + Changes that will need to be made should be limited to: + - source include statments should be changed from autofs_fs4.h to + autofs_fs.h since these two header file have been merged. + - user space scripts that manually load autofs4.ko should be changed + to load autofs.ko. Since the module directory name and the module + name itself are the same now there is no need to manually load + module. + - any "alias autofs autofs4" will need to be removed. + + Please configure AUTOFS_FS instead of AUTOFS4_FS from now on.
Ian Kent
maintainerPATCH 9/10 autofs - update fs/autofs4/Makefile
In reply to Ian KentUpdate Makefile to build from source in fs/autofs instead of fs/autofs4.
--- fs/autofs4/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/autofs4/Makefile +3 -1
@@ -4,4 +4,6 @@ obj-$(CONFIG_AUTOFS4_FS) += autofs4.o -autofs4-objs := init.o inode.o root.o symlink.o waitq.o expire.o dev-ioctl.o +autofs4-objs := ../autofs/init.o ../autofs/inode.o ../autofs/root.o \ + ../autofs/symlink.o ../autofs/waitq.o ../autofs/expire.o \ + ../autofs/dev-ioctl.o
Ian Kent
maintainerPATCH 10/10 autofs - delete fs/autofs4
In reply to Ian KentDeleting the now unused autofs4 module files.
--- fs/autofs4/autofs_i.h | 341 ------------------ fs/autofs4/dev-ioctl.c | 760 ----------------------------------------- fs/autofs4/expire.c | 562 ------------------------------ fs/autofs4/init.c | 49 --- fs/autofs4/inode.c | 368 -------------------- fs/autofs4/root.c | 898 ------------------------------------------------ fs/autofs4/symlink.c | 21 - fs/autofs4/waitq.c | 571 ------------------------------- 8 files changed, 3570 deletions(-) delete mode 100644 fs/autofs4/autofs_i.h delete mode 100644 fs/autofs4/dev-ioctl.c delete mode 100644 fs/autofs4/expire.c delete mode 100644 fs/autofs4/init.c delete mode 100644 fs/autofs4/inode.c delete mode 100644 fs/autofs4/root.c delete mode 100644 fs/autofs4/symlink.c delete mode 100644 fs/autofs4/waitq.c
fs/autofs4/autofs_i.h deleted +0 -341
@@ -1,341 +0,0 @@ -/* -* Copyright 1997-1998 Transmeta Corporation - All Rights Reserved -* Copyright 2005-2006 Ian Kent <[email protected]> -* -* This file is part of the Linux kernel and is made available under -* the terms of the GNU General Public License, version 2, or at your -* option, any later version, incorporated herein by reference. -* -* ----------------------------------------------------------------------- */ - -/* Internal header file for autofs */ - -#include <linux/auto_fs.h> -#include <linux/auto_dev-ioctl.h> -#include <linux/mutex.h> -#include <linux/spinlock.h> -#include <linux/list.h> - -/* This is the range of ioctl() numbers we claim as ours */ -#define AUTOFS_IOC_FIRST AUTOFS_IOC_READY -#define AUTOFS_IOC_COUNT 32 - -#define AUTOFS_DEV_IOCTL_IOC_FIRST (AUTOFS_DEV_IOCTL_VERSION) -#define AUTOFS_DEV_IOCTL_IOC_COUNT (AUTOFS_IOC_COUNT - 11) - -#include <linux/kernel.h> -#include <linux/slab.h> -#include <linux/time.h> -#include <linux/string.h> -#include <linux/wait.h> -#include <linux/sched.h> -#include <linux/mount.h> -#include <linux/namei.h> -#include <asm/current.h> -#include <asm/uaccess.h> - -/* #define DEBUG */ - -#define DPRINTK (fmt, ...) \ - pr_debug("pid %d: %s: " fmt "\n", \ - current->pid, __func__, ##__VA_ARGS__) - -#define AUTOFS_WARN (fmt, ...) \ - printk(KERN_WARNING "pid %d: %s: " fmt "\n", \ - current->pid, __func__, ##__VA_ARGS__) - -#define AUTOFS_ERROR (fmt, ...) \ - printk(KERN_ERR "pid %d: %s: " fmt "\n", \ - current->pid, __func__, ##__VA_ARGS__) - -/* -* Unified info structure. This is pointed to by both the dentry and -* inode structures. Each file in the filesystem has an instance of this -* structure. It holds a reference to the dentry, so dentries are never -* flushed while the file exists. All name lookups are dealt with at the -* dentry level, although the filesystem can interfere in the validation -* process. Readdir is implemented by traversing the dentry lists. -*/ -struct autofs_info { -struct dentry *dentry; -struct inode *inode; - -int flags; - -struct completion expire_complete; - -struct list_head active; -int active_count; - -struct list_head expiring; - -struct autofs_sb_info *sbi; -unsigned long last_used; -atomic_t count; - -kuid_t uid; -kgid_t gid; -}; - -#define AUTOFS_INF_EXPIRING (1<<0)/* dentry in the process of expiring */ -#define AUTOFS_INF_PENDING (1<<2)/* dentry pending mount */ - -struct autofs_wait_queue { -wait_queue_head_t queue; -struct autofs_wait_queue *next; -autofs_wqt_t wait_queue_token; -/* We use the following to see what we are waiting for */ -struct qstr name; -u32 dev; -u64 ino; -kuid_t uid; -kgid_t gid; -pid_t pid; -pid_t tgid; -/* This is for status reporting upon return */ -int status; -unsigned int wait_ctr; -}; - -#define AUTOFS_SBI_MAGIC 0x6d4a556d - -struct autofs_sb_info { -u32 magic; -int pipefd; -struct file *pipe; -struct pid *oz_pgrp; -int catatonic; -int version; -int sub_version; -int min_proto; -int max_proto; -unsigned long exp_timeout; -unsigned int type; -int reghost_enabled; -int needs_reghost; -struct super_block *sb; -struct mutex wq_mutex; -struct mutex pipe_mutex; -spinlock_t fs_lock; -struct autofs_wait_queue *queues;/* Wait queue pointer */ -spinlock_t lookup_lock; -struct list_head active_list; -struct list_head expiring_list; -}; - -static inline struct autofs_sb_info *autofs_sbi (struct super_block *sb) -{ -return (struct autofs_sb_info *)(sb->s_fs_info); -} - -static inline struct autofs_info *autofs_dentry_ino (struct dentry *dentry) -{ -return (struct autofs_info *)(dentry->d_fsdata); -} - -/* autofs_oz_mode(): do we see the man behind the curtain? (The -processes which do manipulations for us in user space sees the raw -filesystem without "magic".) */ - -static inline int autofs_oz_mode (struct autofs_sb_info *sbi) -{ -return sbi->catatonic ||task_pgrp (current) == sbi->oz_pgrp; -} - -/* Does a dentry have some pending activity? */ -static inline int autofs_ispending (struct dentry *dentry) -{ -struct autofs_info *inf =autofs_dentry_ino (dentry); - -if (inf->flags &AUTOFS_INF_PENDING ) -return 1 ; - -if (inf->flags &AUTOFS_INF_EXPIRING ) -return 1 ; - -return 0 ; -} - -struct inode *autofs_get_inode (struct super_block *,umode_t ); -void autofs_free_ino (struct autofs_info *); - -/* Expiration */ -int is_autofs_dentry (struct dentry *); -int autofs_expire_wait (struct dentry *dentry); -int autofs_expire_run (struct super_block *,struct vfsmount *, -struct autofs_sb_info *, -struct autofs_packet_expire __user *); -int autofs_do_expire_multi (struct super_block *sb,struct vfsmount *mnt, -struct autofs_sb_info *sbi,int when); -int autofs_expire_multi (struct super_block *,struct vfsmount *, -struct autofs_sb_info *,int __user *); -struct dentry *autofs_expire_direct (struct super_block *sb, -struct vfsmount *mnt, -struct autofs_sb_info *sbi,int how); -struct dentry *autofs_expire_indirect (struct super_block *sb, -struct vfsmount *mnt, -struct autofs_sb_info *sbi,int how); - -/* Device node initialization */ - -int autofs_dev_ioctl_init (void ); -void autofs_dev_ioctl_exit (void ); - -/* Operations structures */ - -extern const struct inode_operations autofs_symlink_inode_operations; -extern const struct inode_operations autofs_dir_inode_operations; -extern const struct file_operations autofs_dir_operations; -extern const struct file_operations autofs_root_operations; -extern const struct dentry_operations autofs_dentry_operations; - -/* VFS automount flags management functions */ - -static inline void __managed_dentry_set_automount (struct dentry *dentry) -{ - dentry->d_flags |=DCACHE_NEED_AUTOMOUNT ; -} - -static inline void managed_dentry_set_automount (struct dentry *dentry) -{ -spin_lock (&dentry->d_lock); -__managed_dentry_set_automount (dentry); -spin_unlock (&dentry->d_lock); -} - -static inline void __managed_dentry_clear_automount (struct dentry *dentry) -{ - dentry->d_flags &= ~DCACHE_NEED_AUTOMOUNT ; -} - -static inline void managed_dentry_clear_automount (struct dentry *dentry) -{ -spin_lock (&dentry->d_lock); -__managed_dentry_clear_automount (dentry); -spin_unlock (&dentry->d_lock); -} - -static inline void __managed_dentry_set_transit (struct dentry *dentry) -{ - dentry->d_flags |=DCACHE_MANAGE_TRANSIT ; -} - -static inline void managed_dentry_set_transit (struct dentry *dentry) -{ -spin_lock (&dentry->d_lock); -__managed_dentry_set_transit (dentry); -spin_unlock (&dentry->d_lock); -} - -static inline void __managed_dentry_clear_transit (struct dentry *dentry) -{ - dentry->d_flags &= ~DCACHE_MANAGE_TRANSIT ; -} - -static inline void managed_dentry_clear_transit (struct dentry *dentry) -{ -spin_lock (&dentry->d_lock); -__managed_dentry_clear_transit (dentry); -spin_unlock (&dentry->d_lock); -} - -static inline void __managed_dentry_set_managed (struct dentry *dentry) -{ - dentry->d_flags |= (DCACHE_NEED_AUTOMOUNT |DCACHE_MANAGE_TRANSIT ); -} - -static inline void managed_dentry_set_managed (struct dentry *dentry) -{ -spin_lock (&dentry->d_lock); -__managed_dentry_set_managed (dentry); -spin_unlock (&dentry->d_lock); -} - -static inline void __managed_dentry_clear_managed (struct dentry *dentry) -{ - dentry->d_flags &= ~(DCACHE_NEED_AUTOMOUNT |DCACHE_MANAGE_TRANSIT ); -} - -static inline void managed_dentry_clear_managed (struct dentry *dentry) -{ -spin_lock (&dentry->d_lock); -__managed_dentry_clear_managed (dentry); -spin_unlock (&dentry->d_lock); -} - -/* Initializing function */ - -int autofs_fill_super (struct super_block *,void *,int ); -struct autofs_info *autofs_new_ino (struct autofs_sb_info *); -void autofs_clean_ino (struct autofs_info *); - -static inline int autofs_prepare_pipe (struct file *pipe) -{ -if (!pipe->f_op || !pipe->f_op->write) -return -EINVAL ; -if (!S_ISFIFO (file_inode (pipe)->i_mode)) -return -EINVAL ; -/* We want a packet pipe */ - pipe->f_flags |=O_DIRECT ; -return 0 ; -} - -/* Queue management functions */ - -int autofs_wait (struct autofs_sb_info *,struct dentry *,enum autofs_notify ); -int autofs_wait_release (struct autofs_sb_info *,autofs_wqt_t ,int ); -void autofs_catatonic_mode (struct autofs_sb_info *); - -static inline u32 autofs_get_dev (struct autofs_sb_info *sbi) -{ -return new_encode_dev (sbi->sb->s_dev); -} - -static inline u64 autofs_get_ino (struct autofs_sb_info *sbi) -{ -return sbi->sb->s_root->d_inode->i_ino; -} - -static inline int simple_positive (struct dentry *dentry) -{ -return dentry->d_inode && !d_unhashed (dentry); -} - -static inline void __autofs_add_expiring (struct dentry *dentry) -{ -struct autofs_sb_info *sbi =autofs_sbi (dentry->d_sb); -struct autofs_info *ino =autofs_dentry_ino (dentry); -if (ino) { -if (list_empty (&ino->expiring)) -list_add (&ino->expiring, &sbi->expiring_list); - } -return ; -} - -static inline void autofs_add_expiring (struct dentry *dentry) -{ -struct autofs_sb_info *sbi =autofs_sbi (dentry->d_sb); -struct autofs_info *ino =autofs_dentry_ino (dentry); -if (ino) { -spin_lock (&sbi->lookup_lock); -if (list_empty (&ino->expiring)) -list_add (&ino->expiring, &sbi->expiring_list); -spin_unlock (&sbi->lookup_lock); - } -return ; -} - -static inline void autofs_del_expiring (struct dentry *dentry) -{ -struct autofs_sb_info *sbi =autofs_sbi (dentry->d_sb); -struct autofs_info *ino =autofs_dentry_ino (dentry); -if (ino) { -spin_lock (&sbi->lookup_lock); -if (!list_empty (&ino->expiring)) -list_del_init (&ino->expiring); -spin_unlock (&sbi->lookup_lock); - } -return ; -} - -extern void autofs_kill_sb (struct super_block *);
fs/autofs4/dev-ioctl.c deleted +0 -760
760 lines not on this page · raw message
fs/autofs4/expire.c deleted +0 -562
562 lines not on this page · raw message
fs/autofs4/init.c deleted +0 -49
49 lines not on this page · raw message
fs/autofs4/inode.c deleted +0 -368
368 lines not on this page · raw message
fs/autofs4/root.c deleted +0 -898
898 lines not on this page · raw message
fs/autofs4/symlink.c deleted +0 -21
@@ -1,21 +0,0 @@ -/* -* Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved -* -* This file is part of the Linux kernel and is made available under -* the terms of the GNU General Public License, version 2, or at your -* option, any later version, incorporated herein by reference. -* -* ------------------------------------------------------------------------- */ - -#include "autofs_i.h" - -static void *autofs_follow_link (struct dentry *dentry,struct nameidata *nd) -{ -nd_set_link (nd, dentry->d_inode->i_private); -return NULL ; -} - -const struct inode_operations autofs_symlink_inode_operations = { - .readlink = generic_readlink, - .follow_link = autofs_follow_link -};
fs/autofs4/waitq.c deleted +0 -571
1 line not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
31.08.2013 15:42, Ian Kent wrote:
[...]
Quoted 5 lines
By leaving a
KconfigandMakefilein fs/autofs4 (to build autofs4.ko) with a deprication message sub-system maintainers and other users will make any needed changes before these are removed after two kernel versions. IMHO the presence of the warning is reason enough to leave a build stub rather than do a straight out rename.
Why do you want to continue building autofs4.ko? (or allowing to) What's actually wrong with a stright rename?
If the new module can be auto-loaded by both name (by providing an alias), there's no need to keep ability to build autofs4.ko, I think.
Well, maybe except of the case when autofs is needed in initramfs (like for systemd). For this, indeed, you can keep autofs4.ko which is a dummy depending on autofs.ko...
Quoted 11 lines
Ian Kent (10):
autofs4 - coding style fixes
autofs4 - fixstring.hinclude inauto_dev-ioctl.hautofs4 - movelinux/auto_dev-ioctl.hto uapi/linux autofs - mergeauto_fs.handauto_fs4.hautofs - use autofs instead of autofs4 everywhere autofs - copy autofs4 to autofs
autofs - create autofsKconfigandMakefileautofs - updatefs/autofs4/Kconfig
autofs - updatefs/autofs4/Makefile
autofs - delete fs/autofs4
By doing it this way, you're losing all git history. If you perform stright rename and git detects it, you can use, eg, git log --follow to see whole hostory across rename. This way you create new files without history.
So I strongly shuggest actually renaming the subdirectory (together with appropriate kconfig/makefile changes so things are bisectable), and creating the stubs after this.
Thanks,
/mjt
Ian Kent
maintainerQuoted 8 lines · Michael Tokarev
31.08.2013 15:42, Ian Kent wrote:
[...]Quoted 5 lines
By leaving a
KconfigandMakefilein fs/autofs4 (to build autofs4.ko) with a deprication message sub-system maintainers and other users will make any needed changes before these are removed after two kernel versions. IMHO the presence of the warning is reason enough to leave a build stub rather than do a straight out rename.
Quoted 4 lines
Why do you want to continue building autofs4.ko? (or allowing to) What's actually wrong with a stright rename?
If the new module can be auto-loaded by both name (by providing an alias), there's no need to keep ability to build autofs4.ko, I think.
The hope is that within two subsequent kernel versions, when it is removed, people that need to change will have noticed this and made the needed changes. That's scripts that may have looked for autofs4.ko to work around the auto-load problem, aliases that won't work now, kernel configurations, etc...
The configuration message for autofs4 now says these things and says the module is going to be removed.
Quoted 34 lines
Well, maybe except of the case when autofs is needed in initramfs (like for systemd). For this, indeed, you can keep autofs4.ko which is a dummy depending on autofs.ko...
Quoted 11 lines
Ian Kent (10):
autofs4 - coding style fixes
autofs4 - fixstring.hinclude inauto_dev-ioctl.hautofs4 - movelinux/auto_dev-ioctl.hto uapi/linux autofs - mergeauto_fs.handauto_fs4.hautofs - use autofs instead of autofs4 everywhere autofs - copy autofs4 to autofs
autofs - create autofsKconfigandMakefileautofs - updatefs/autofs4/Kconfig
autofs - updatefs/autofs4/Makefile
autofs - delete fs/autofs4By doing it this way, you're losing all git history. If you perform stright rename and git detects it, you can use, eg, git log --follow to see whole hostory across rename. This way you create new files without history.
So I strongly shuggest actually renaming the subdirectory (together with appropriate kconfig/makefile changes so things are bisectable), and creating the stubs after this.
Thanks,
/mjt
--
To unsubscribe from this list: send the line "unsubscribe autofs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html