lkml.org 
[lkml]   [2004]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 19/28] VFS: Mountpoint file descriptor expiry support
Date
From
This patch adds support for letting userspcae set the expiry information on a
given mountpoint.

Signed-off-by: Mike Waychison <michael.waychison@sun.com>
---

fs/mountfd.c | 10 ++++++++++
include/linux/fs.h | 1 +
2 files changed, 11 insertions(+)

Index: linux-2.6.9-quilt/include/linux/fs.h
===================================================================
--- linux-2.6.9-quilt.orig/include/linux/fs.h 2004-10-22 17:17:43.232891744 -0400
+++ linux-2.6.9-quilt/include/linux/fs.h 2004-10-22 17:17:43.766810576 -0400
@@ -228,6 +228,7 @@ extern int leases_enable, dir_notify_ena
#define MOUNTFD_IOC_GETFSTYPE _IOR('p', 0xa8, char [MOUNTFD_READSIZE])
#define MOUNTFD_IOC_GETVFSOPTIONS _IOR('p', 0xa9, char [MOUNTFD_READSIZE])
#define MOUNTFD_IOC_GETFSOPTIONS _IOR('p', 0xaa, char [MOUNTFD_READSIZE])
+#define MOUNTFD_IOC_SETVFSEXPIRE _IOW('p', 0xab, int)

#ifdef __KERNEL__

Index: linux-2.6.9-quilt/fs/mountfd.c
===================================================================
--- linux-2.6.9-quilt.orig/fs/mountfd.c 2004-10-22 17:17:43.230892048 -0400
+++ linux-2.6.9-quilt/fs/mountfd.c 2004-10-22 17:17:43.767810424 -0400
@@ -393,6 +393,14 @@ static long mfd_nextchild(struct file *m
return ret;
}

+static int mfd_vfsexpire(struct file *mountfilp, int arg)
+{
+ struct vfsmount *mnt;
+
+ mnt = VFSMOUNT(mountfilp);
+ return mnt_expire(mnt, arg);
+}
+
static int mfd_ioctl_reads(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg)
{
@@ -455,6 +463,8 @@ static int mfd_ioctl(struct inode *inode
return mfd_firstchild(filp);
case MOUNTFD_IOC_GETNEXTCHILD:
return mfd_nextchild(filp);
+ case MOUNTFD_IOC_SETVFSEXPIRE:
+ return mfd_vfsexpire(filp, (int)arg);
}
ret = mfd_ioctl_reads(inode, filp, cmd, arg);
return ret;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.047 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site