X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=libsysio%2Finclude%2Finode.h;h=baedc507af50ef2453ae861fb3694d766bcf9337;hb=7c3d518d72446846c27539c0886a847a78ed8235;hp=e6d98437344fccbb31b95bfcee35c52784a8b885;hpb=567285197e592000b7a713d65b66e27314a11c2f;p=fs%2Flustre-release.git diff --git a/libsysio/include/inode.h b/libsysio/include/inode.h index e6d9843..baedc50 100644 --- a/libsysio/include/inode.h +++ b/libsysio/include/inode.h @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2003 Sandia Corporation. + * Cplant(TM) Copyright 1998-2006 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -86,10 +86,10 @@ struct inode_ops { struct inode *ino, unsigned mask, struct intnl_stat *stbuf); - ssize_t (*inop_getdirentries)(struct inode *ino, - char *buf, - size_t nbytes, - _SYSIO_OFF_T *basep); + ssize_t (*inop_filldirentries)(struct inode *ino, + _SYSIO_OFF_T *posp, + char *buf, + size_t nbytes); int (*inop_mkdir)(struct pnode *pno, mode_t mode); int (*inop_rmdir)(struct pnode *pno); int (*inop_symlink)(struct pnode *pno, const char *data); @@ -323,8 +323,9 @@ struct nameidata { /* * Values for nameidata flags field. */ -#define ND_NOFOLLOW 0x01 /* no follow symlinks */ -#define ND_NEGOK 0x02 /* last missing is ok */ +#define ND_NOFOLLOW 0x01 /* no follow symlinks */ +#define ND_NEGOK 0x02 /* last missing is ok */ +#define ND_NOPERMCHECK 0x04 /* don't check perms */ #ifdef AUTOMOUNT_FILE_NAME #define _ND_INIT_AUTOMOUNT(nd) ((nd)->nd_amcnt = 0) @@ -399,16 +400,10 @@ struct ioctx { } while (0) /* - * Return whether a pnode/inode is on a read-only mount or file system. + * Return whether access to a pnode is read-only. */ -#define IS_RDONLY(pno, ino) \ - ((((struct pnode *)(pno)) && \ - ((((struct pnode *)(pno))->p_mount->mnt_flags & MOUNT_F_RO) || \ - (((struct pnode *)(pno))->p_base->pb_ino && \ - (((struct pnode *)(pno))->p_base->pb_ino->i_fs->fs_flags & \ - FS_F_RO)))) || \ - (((struct inode *)(ino)) && \ - (((struct inode *)(ino))->i_fs->fs_flags & FS_F_RO))) +#define IS_RDONLY(pno) \ + ((pno)->p_mount->mnt_flags & MOUNT_F_RO) extern struct pnode *_sysio_root; @@ -416,7 +411,7 @@ extern TAILQ_HEAD(inodes_head, inode) _sysio_inodes; extern TAILQ_HEAD(pnodes_head, pnode) _sysio_pnodes; extern int _sysio_i_init(void); -#if ZERO_SUM_MEMORY +#ifdef ZERO_SUM_MEMORY extern void _sysio_i_shutdown(void); #endif extern struct inode *_sysio_i_new(struct filesys *fs, @@ -463,7 +458,7 @@ extern int _sysio_path_walk(struct pnode *parent, struct nameidata *nd); #ifdef AUTOMOUNT_FILE_NAME extern void _sysio_next_component(const char *path, struct qstr *name); #endif -extern int _sysio_permitted(struct inode *ino, int amode); +extern int _sysio_permitted(struct pnode *pno, int amode); extern int _sysio_namei(struct pnode *pno, const char *path, unsigned flags, @@ -483,6 +478,9 @@ extern int _sysio_ioctx_cb(struct ioctx *ioctx, void *data); extern void _sysio_ioctx_cb_free(struct ioctx_callback *cb); extern struct ioctx *_sysio_ioctx_find(void *id); +extern int _sysio_ioctx_done(struct ioctx *ioctx); extern ssize_t _sysio_ioctx_wait(struct ioctx *ioctx); extern void _sysio_ioctx_complete(struct ioctx *ioctx); extern int _sysio_open(struct pnode *pno, int flags, mode_t mode); +extern int _sysio_mkdir(struct pnode *where, mode_t mode); +extern int _sysio_mknod(struct pnode *where, mode_t mode, dev_t dev);