diff options
author | rwatson <rwatson@FreeBSD.org> | 2001-01-07 23:27:58 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2001-01-07 23:27:58 +0000 |
commit | d0fa22cb5d8a8da1477b47ea97cbe7053b7b9842 (patch) | |
tree | b34ab54af90612677439ff117df508b74c4d17b7 /sys | |
parent | 01950c7ecf456a572d221cc676b88124a239e333 (diff) | |
download | FreeBSD-src-d0fa22cb5d8a8da1477b47ea97cbe7053b7b9842.zip FreeBSD-src-d0fa22cb5d8a8da1477b47ea97cbe7053b7b9842.tar.gz |
o Add an additional EA inconsistency reporting opportunity in
ufs_extattr_rm.
o Make both reporting locations report the function name where the
inconsistency is discovered, as well as the inode number in question.
Reviewed by: jedgar
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ufs/ufs/ufs_extattr.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/ufs/ufs/ufs_extattr.c b/sys/ufs/ufs/ufs_extattr.c index b61d1ff..7d06bfb 100644 --- a/sys/ufs/ufs/ufs_extattr.c +++ b/sys/ufs/ufs/ufs_extattr.c @@ -574,8 +574,8 @@ ufs_extattr_get(struct vnode *vp, const char *name, struct uio *uio, * is to coerce this to undefined, and let it get cleaned * up by the next write or extattrctl clean. */ - printf("ufs_extattr: inode number inconsistency (%d, %d)\n", - ueh.ueh_i_gen, ip->i_gen); + printf("ufs_extattr_get: inode %lu inconsistency (%d, %d)\n", + (u_long)ip->i_number, ueh.ueh_i_gen, ip->i_gen); error = ENOENT; goto vopunlock_exit; } @@ -829,6 +829,20 @@ ufs_extattr_rm(struct vnode *vp, const char *name, struct ucred *cred, goto vopunlock_exit; } + /* Valid for the current inode generation? */ + if (ueh.ueh_i_gen != ip->i_gen) { + /* + * The inode itself has a different generation number than + * the attribute data. For now, the best solution is to + * coerce this to undefined, and let it get cleaned up by + * the next write or extattrctl clean. + */ + printf("ufs_extattr_rm: inode %lu inconsistency (%d, %d)\n", + (u_long)ip->i_number, ueh.ueh_i_gen, ip->i_gen); + error = ENOENT; + goto vopunlock_exit; + } + /* flag it as not in use */ ueh.ueh_flags = 0; |