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
This commit is contained in:
Robert Watson 2001-01-07 23:27:58 +00:00
parent 4786e00b40
commit 9d5703550d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70773

View file

@ -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;