version 1.41, 2005/02/26 22:32:20 |
version 1.41.4.3, 2008/01/21 09:48:15 |
|
|
|
|
#define SHORTLINK(ip) \ |
#define SHORTLINK(ip) \ |
(((ip)->i_ump->um_fstype == UFS1) ? \ |
(((ip)->i_ump->um_fstype == UFS1) ? \ |
(caddr_t)(ip)->i_ffs1_db : (caddr_t)(ip)->i_ffs2_db) |
(void *)(ip)->i_ffs1_db : (void *)(ip)->i_ffs2_db) |
|
|
|
|
/* |
/* |
|
|
#define VTOI(vp) ((struct inode *)(vp)->v_data) |
#define VTOI(vp) ((struct inode *)(vp)->v_data) |
#define ITOV(ip) ((ip)->i_vnode) |
#define ITOV(ip) ((ip)->i_vnode) |
|
|
#define FFS_ITIMES(ip, acc, mod, cre) { \ |
|
if ((ip)->i_flag & (IN_ACCESS | IN_CHANGE | IN_UPDATE | IN_MODIFY)) {\ |
|
if ((ip)->i_flag & IN_ACCESS) { \ |
|
DIP_ASSIGN(ip, atime, (acc)->tv_sec); \ |
|
DIP_ASSIGN(ip, atimensec, (acc)->tv_nsec); \ |
|
} \ |
|
if ((ip)->i_flag & (IN_UPDATE | IN_MODIFY)) { \ |
|
if (((ip)->i_flags & SF_SNAPSHOT) == 0) { \ |
|
DIP_ASSIGN(ip, mtime, (mod)->tv_sec); \ |
|
DIP_ASSIGN(ip, mtimensec, (mod)->tv_nsec); \ |
|
} \ |
|
(ip)->i_modrev++; \ |
|
} \ |
|
if ((ip)->i_flag & (IN_CHANGE | IN_MODIFY)) { \ |
|
DIP_ASSIGN(ip, ctime, (cre)->tv_sec); \ |
|
DIP_ASSIGN(ip, ctimensec, (cre)->tv_nsec); \ |
|
} \ |
|
if ((ip)->i_flag & (IN_ACCESS | IN_MODIFY)) \ |
|
ip->i_flag |= IN_ACCESSED; \ |
|
if ((ip)->i_flag & (IN_UPDATE | IN_CHANGE)) \ |
|
ip->i_flag |= IN_MODIFIED; \ |
|
(ip)->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_UPDATE | IN_MODIFY); \ |
|
} \ |
|
} |
|
|
|
#define EXT2FS_ITIMES(ip, acc, mod, cre) { \ |
|
if ((ip)->i_flag & (IN_ACCESS | IN_CHANGE | IN_UPDATE | IN_MODIFY)) {\ |
|
if ((ip)->i_flag & IN_ACCESS) { \ |
|
(ip)->i_e2fs_atime = (acc)->tv_sec; \ |
|
} \ |
|
if ((ip)->i_flag & (IN_UPDATE | IN_MODIFY)) { \ |
|
(ip)->i_e2fs_mtime = (mod)->tv_sec; \ |
|
(ip)->i_modrev++; \ |
|
} \ |
|
if ((ip)->i_flag & (IN_CHANGE | IN_MODIFY)) { \ |
|
(ip)->i_e2fs_ctime = (cre)->tv_sec; \ |
|
} \ |
|
if ((ip)->i_flag & (IN_ACCESS | IN_MODIFY)) \ |
|
(ip)->i_flag |= IN_ACCESSED; \ |
|
if ((ip)->i_flag & (IN_UPDATE | IN_CHANGE)) \ |
|
(ip)->i_flag |= IN_MODIFIED; \ |
|
(ip)->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_UPDATE | IN_MODIFY); \ |
|
} \ |
|
} |
|
|
|
#define ITIMES(ip, acc, mod, cre) { \ |
|
if (IS_EXT2_VNODE((ip)->i_vnode)) \ |
|
EXT2FS_ITIMES(ip, acc, mod, cre) \ |
|
else \ |
|
FFS_ITIMES(ip, acc, mod, cre) \ |
|
} |
|
|
|
/* Determine if soft dependencies are being done */ |
/* Determine if soft dependencies are being done */ |
#define DOINGSOFTDEP(vp) ((vp)->v_mount->mnt_flag & MNT_SOFTDEP) |
#define DOINGSOFTDEP(vp) ((vp)->v_uflag & VU_SOFTDEP) |
|
|
/* This overlays the fid structure (see mount.h). */ |
/* This overlays the fid structure (see fstypes.h). */ |
struct ufid { |
struct ufid { |
u_int16_t ufid_len; /* Length of structure. */ |
u_int16_t ufid_len; /* Length of structure. */ |
u_int16_t ufid_pad; /* Force 32-bit alignment. */ |
u_int16_t ufid_pad; /* Force 32-bit alignment. */ |
ino_t ufid_ino; /* File number (ino). */ |
u_int32_t ufid_ino; /* File number (ino). */ |
int32_t ufid_gen; /* Generation number. */ |
int32_t ufid_gen; /* Generation number. */ |
}; |
}; |
#endif /* _KERNEL */ |
#endif /* _KERNEL */ |