summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_mount.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2009-02-05 15:03:35 +0000
committerattilio <attilio@FreeBSD.org>2009-02-05 15:03:35 +0000
commitbeddfe59b032db4229498b2f018c8d86779f5536 (patch)
tree4277c54fab730182787561f09af4ab3cec231f96 /sys/kern/vfs_mount.c
parent3e0f2e8d7e08942b9442712121698c9c59506563 (diff)
downloadFreeBSD-src-beddfe59b032db4229498b2f018c8d86779f5536.zip
FreeBSD-src-beddfe59b032db4229498b2f018c8d86779f5536.tar.gz
Add more KTR_VFS logging point in order to have a more effective tracing.
Reviewed by: brueffer, kib Tested by: Gianni Trematerra <giovanni D trematerra A gmail D com>
Diffstat (limited to 'sys/kern/vfs_mount.c')
-rw-r--r--sys/kern/vfs_mount.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 2b870f0..1f767a3 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -386,6 +386,8 @@ nmount(td, uap)
u_int iovcnt;
AUDIT_ARG(fflags, uap->flags);
+ CTR4(KTR_VFS, "%s: iovp %p with iovcnt %d and flags %d", __func__,
+ uap->iovp, uap->iovcnt, uap->flags);
/*
* Filter out MNT_ROOTFS. We do not want clients of nmount() in
@@ -400,16 +402,24 @@ nmount(td, uap)
* Check that we have an even number of iovec's
* and that we have at least two options.
*/
- if ((iovcnt & 1) || (iovcnt < 4))
+ if ((iovcnt & 1) || (iovcnt < 4)) {
+ CTR2(KTR_VFS, "%s: failed for invalid iovcnt %d", __func__,
+ uap->iovcnt);
return (EINVAL);
+ }
error = copyinuio(uap->iovp, iovcnt, &auio);
- if (error)
+ if (error) {
+ CTR2(KTR_VFS, "%s: failed for invalid uio op with %d errno",
+ __func__, error);
return (error);
+ }
iov = auio->uio_iov;
for (i = 0; i < iovcnt; i++) {
if (iov->iov_len > MMAXOPTIONLEN) {
free(auio, M_IOV);
+ CTR1(KTR_VFS, "%s: failed for invalid new auio",
+ __func__);
return (EINVAL);
}
iov++;
@@ -429,6 +439,7 @@ void
vfs_ref(struct mount *mp)
{
+ CTR2(KTR_VFS, "%s: mp %p", __func__, mp);
MNT_ILOCK(mp);
MNT_REF(mp);
MNT_IUNLOCK(mp);
@@ -438,6 +449,7 @@ void
vfs_rel(struct mount *mp)
{
+ CTR2(KTR_VFS, "%s: mp %p", __func__, mp);
MNT_ILOCK(mp);
MNT_REL(mp);
MNT_IUNLOCK(mp);
OpenPOWER on IntegriCloud