Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Oct 2016 03:22:57 -0700
From:      Julian Elischer <julian@freebsd.org>
To:        "freebsd-fs@freebsd.org" <freebsd-fs@FreeBSD.org>
Subject:   oddness in 10,3 .. mnt_ref leak?
Message-ID:  <58942da1-0b65-2b34-d91b-2fafcfa7d86b@freebsd.org>

next in thread | raw e-mail | index | archive | help
I'm runnign 10.3 in our appliance and by chance I added code to print 
out the mnt-ref values of struct mount as htey are being changed..

to my surprise that reference count seems to be wildly wrong..

I added the following code to be run when it is decremented:

#define MNT_REL(mp)     do {                                            \
         if ((mp)->mnt_ref > 0) {                                        \
(mp)->mnt_ref--;                                        \
         } else {                                                        \
                 printf("### %s (%s) negative mnt_ref, %d\n", __func__ 
,mp->mnt_stat.f_mntonname, mp->mnt_ref);  \
                 (mp->mnt_ref = 0);                                      \
} \
         if ((mp)->mnt_ref == 0)                                         \
wakeup((mp));                                           \
} while (0)

and I see this every few seconds:

### vfs_unbusy (/opt/pixel8/master_config) negative mnt_ref, 0


is there a chance that vfs_unbusy has no balancing MNT_REF when the 
file system becomes active again?

I've looked through our patches (we do have some)  but don't see a 
reason for this in them.


Julian




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?58942da1-0b65-2b34-d91b-2fafcfa7d86b>