FBSD: Handle missing vnode.v_tag

FreeBSD commit 478368ca410fbfe4ec98e187cae6317bf3d29498 (vfs:
eliminate v_tag from struct vnode) removed the v_tag field from struct
vnode. We only use this when printing out info about a vnode, so just
show "[]" when the v_tag field has been removed.

Change-Id: I112e38fd87f049421db08f43081fa7e25aaf3061
Reviewed-on: https://gerrit.openafs.org/15172
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
This commit is contained in:
Andrew Deason 2022-10-25 16:41:55 -05:00
parent ad7a5ba333
commit 1ea82f2e2b

View File

@ -1271,9 +1271,17 @@ afs_vop_print(ap)
{
struct vnode *vp = ap->a_vp;
struct vcache *vc = VTOAFS(ap->a_vp);
const char *tag;
int s = vc->f.states;
printf("vc %p vp %p tag %s, fid: %d.%d.%d.%d, opens %d, writers %d", vc, vp, vp->v_tag,
#if __FreeBSD_version >= 1300075
/* FreeBSD 1300075 removed the v_tag field. */
tag = "[]";
#else
tag = vp->v_tag;
#endif
printf("vc %p vp %p tag %s, fid: %d.%d.%d.%d, opens %d, writers %d", vc, vp, tag,
(int)vc->f.fid.Cell, (u_int) vc->f.fid.Fid.Volume,
(u_int) vc->f.fid.Fid.Vnode, (u_int) vc->f.fid.Fid.Unique, vc->opens,
vc->execsOrWriters);