Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Apr 2004 07:38:00 +0300
From:      Alex Lyashkov <umka@sevinter.net>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern vfs_syscalls.c
Message-ID:  <1082867880.8241.4.camel@berloga.shadowland>
In-Reply-To: <20040422233154.GY24376@darkness.comp.waw.pl>
References:  <200404221540.i3MFeSIM038514@repoman.freebsd.org> <20040422231910.GB709@timesink.dyndns.org> <20040422233154.GY24376@darkness.comp.waw.pl>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-aBprndndgqMWVhZvYLjE
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable

=F7 =F0=D4=CE, 23.04.2004, =D7 02:31, Pawel Jakub Dawidek =D0=C9=DB=C5=D4:
> On Fri, Apr 23, 2004 at 01:19:10AM +0200, Thomas Moestl wrote:
> +> On Thu, 2004/04/22 at 08:40:28 -0700, Pawel Jakub Dawidek wrote:
> +> > pjd         2004/04/22 08:40:27 PDT
> +> >=20
> +> >   FreeBSD src repository
> +> >=20
> +> >   Modified files:
> +> >     sys/kern             vfs_syscalls.c=20
> +> >   Log:
> +> >   Look out! vn_start_write() is able to return 0 and NULL 'mp'.
> +>=20
> +> Hmmm, I'm not sure, but wasn't the real bug to use the struct mount *
> +> that vn_start_write() returns instead of nd.ni_vp->v_mount (or at
> +> least, not using nd.ni_vp->v_mount if mp turns out to be NULL)?=20
> +> extattrctl() chooses that way.
> +> It seems that file systems are not required to implement
> +> VOP_GETWRITEMOUNT(), but could choose to implement VFS_QUOTACTL()
> +> anyway (although IIRC there currently are none that maintain this
> +> combination), so unconditionally returning EOPNOTSUPP would be too
> +> strict.
> +>=20
> +> The only case where the mount point of the vnode and the mount point
> +> returned by vn_start_write() should differ is when unionfs is
> +> involved; in that case, the correct semantics of quotactl() is a bit
> +> doubtful, and so unionfs does not support quotactl() at all; thus
> +> using the mount point of the vnode should not break anything.
>=20
> Yes. Even quotactl(2) in RELENG_4 is using nd.ni_vp->v_mount.
> Anyone want to test this patch:
>=20
> 	http://people.freebsd.org/~pjd/patches/vfs_syscalls.c.3.patch
After I apply this patch my test box have a panic with message "negative
refs" at vn_finish_write.
I rewrite patch for ommit this situations.=20

--=20
Alex Lyashkov <umka@sevinter.net>
Home

--=-aBprndndgqMWVhZvYLjE
Content-Description: 
Content-Disposition: attachment; filename=quota_patch.diff
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: base64

PyBsb2cNCkluZGV4OiB2ZnNfc3lzY2FsbHMuYw0KPT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KUkNTIGZpbGU6IC9tbnQv
c3RvcmFnZS9mcmVlYnNkLWN2cy9zcmMvc3lzL2tlcm4vdmZzX3N5c2NhbGxzLmMsdg0KcmV0cmll
dmluZyByZXZpc2lvbiAxLjM0NA0KZGlmZiAtdSAtcjEuMzQ0IHZmc19zeXNjYWxscy5jDQotLS0g
dmZzX3N5c2NhbGxzLmMJMjIgQXByIDIwMDQgMTU6NDA6MjcgLTAwMDAJMS4zNDQNCisrKyB2ZnNf
c3lzY2FsbHMuYwkyNCBBcHIgMjAwNCAxODoxNjowMyAtMDAwMA0KQEAgLTE4NCw2ICsxODQsNyBA
QA0KIAl9ICovICp1YXA7DQogew0KIAlzdHJ1Y3QgbW91bnQgKm1wOw0KKwlzdHJ1Y3QgbW91bnQg
KnF1b3RhX2FyZ3M7DQogCWludCBlcnJvcjsNCiAJc3RydWN0IG5hbWVpZGF0YSBuZDsNCiANCkBA
IC0xOTQsMTIgKzE5NSwxMSBAQA0KIAkJcmV0dXJuIChlcnJvcik7DQogCU5ERlJFRSgmbmQsIE5E
Rl9PTkxZX1BOQlVGKTsNCiAJZXJyb3IgPSB2bl9zdGFydF93cml0ZShuZC5uaV92cCwgJm1wLCBW
X1dBSVQgfCBQQ0FUQ0gpOw0KKwlxdW90YV9hcmdzID0gbXAgIT0gTlVMTCA/IG1wIDogbmQubmlf
dnAtPnZfbW91bnQ7CQ0KIAl2cmVsZShuZC5uaV92cCk7DQogCWlmIChlcnJvcikNCi0JCXJldHVy
biAoZXJyb3IpOw0KLQlpZiAobXAgPT0gTlVMTCkNCi0JCXJldHVybiAoRU9QTk9UU1VQUCk7DQot
CWVycm9yID0gVkZTX1FVT1RBQ1RMKG1wLCB1YXAtPmNtZCwgdWFwLT51aWQsIHVhcC0+YXJnLCB0
ZCk7DQorCQlyZXR1cm4gKGVycm9yKTsJCQ0KKwllcnJvciA9IFZGU19RVU9UQUNUTChxdW90YV9h
cmdzLCB1YXAtPmNtZCwgdWFwLT51aWQsIHVhcC0+YXJnLCB0ZCk7DQogCXZuX2ZpbmlzaGVkX3dy
aXRlKG1wKTsNCiAJcmV0dXJuIChlcnJvcik7DQogfQ0K

--=-aBprndndgqMWVhZvYLjE--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1082867880.8241.4.camel>