mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Add vn_mode_to_vtype/vn_vtype to_mode helpers
Add simple helpers to convert a vnode->v_type to a inode->i_mode. These should be used sparingly but they are handy to have.
This commit is contained in:
@@ -25,4 +25,8 @@
|
||||
#ifndef _SPL_MODE_H
|
||||
#define _SPL_MODE_H
|
||||
|
||||
#define IFTOVT(mode) vn_mode_to_vtype(mode)
|
||||
#define VTTOIF(vtype) vn_vtype_to_mode(vtype)
|
||||
#define MAKEIMODE(T, M) (VTTOIF(T) | ((M) & ~S_IFMT))
|
||||
|
||||
#endif /* SPL_MODE_H */
|
||||
|
||||
@@ -202,6 +202,8 @@ typedef struct caller_context {
|
||||
|
||||
extern vnode_t *vn_alloc(int flag);
|
||||
void vn_free(vnode_t *vp);
|
||||
extern vtype_t vn_mode_to_vtype(mode_t);
|
||||
extern mode_t vn_vtype_to_mode(vtype_t);
|
||||
extern int vn_open(const char *path, uio_seg_t seg, int flags, int mode,
|
||||
vnode_t **vpp, int x1, void *x2);
|
||||
extern int vn_openat(const char *path, uio_seg_t seg, int flags, int mode,
|
||||
|
||||
Reference in New Issue
Block a user