Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Nov 2017 17:28:05 +0000
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Emmanuel Vadot <manu@bidouilliste.com>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, FreeBSD Current <freebsd-current@freebsd.org>, "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>
Subject:   Re: Switch vfs.nfsd.issue_delegations to TUNABLE ?
Message-ID:  <YTXPR0101MB217489EADB0945CFCD608E73DD3B0@YTXPR0101MB2174.CANPRD01.PROD.OUTLOOK.COM>
In-Reply-To: <20171129144040.29a10234aa5fb1cfa2611bfc@bidouilliste.com>
References:  <20171128114136.10e44d5bcfd563e9b4ab5453@bidouilliste.com> <20171128110428.GN2272@kib.kiev.ua> <20171128142610.6ab535b0b8c6b5d372cd3f27@bidouilliste.com> <20171128134009.GQ2272@kib.kiev.ua> <YTOPR0101MB2172BE15A55BCA881F805AE6DD3A0@YTOPR0101MB2172.CANPRD01.PROD.OUTLOOK.COM> <20171128164132.290bf07218b16164db613242@bidouilliste.com> <YTOPR0101MB217255A72DD5E8555DF001E9DD3A0@YTOPR0101MB2172.CANPRD01.PROD.OUTLOOK.COM> <YTOPR0101MB217218369849273146801292DD3A0@YTOPR0101MB2172.CANPRD01.PROD.OUTLOOK.COM> <YTOPR0101MB21721E82EF605249D38064A1DD3A0@YTOPR0101MB2172.CANPRD01.PROD.OUTLOOK.COM>, <20171129144040.29a10234aa5fb1cfa2611bfc@bidouilliste.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Emmanuel Vadot wrote:
[stuff snipped]
> I haven't test by I can say that it will work, I actually wondered at
>first doing that. The problem with this patch is what I tried to
>describe in my first and following mails, since you can turn on and off
>delegation you can still have delegation (so nfsrv_delegatecnt > 0)
>even if the sysctl is =3D=3D 0. That's why I went to the tunable way, seem=
s
>cleaner to me as disabling delegation doesn't really disable them for
>current client.
Yes, if you have delegations enabled and then disable them, there will
be delegations issued for a "while".
During that time, the code in nfsrv_checkgetattr() does need to check for
them.
Since no new delegations will be issued, the outstanding ones will go
away when the client chooses to return them. (You can force this on the
client by doing a dismount/mount, at least for the FreeBSD client.)
Alternately, rebooting the server forces the clients to "recover" delegatio=
ns
and, if they are disabled, that fails. (Actually the recover succeeds, but =
with
a flag set that tells the client it must return them asap.)

All the tunable does is make it impossible to disable them without
rebooting, but otherwise the effect is the same.

I have a patch that keeps a separate counter for write delegations
(which are the ones you care about) using atomics to maintain the
value. (That will be similar but somewhat better than what this patch does.=
)

rick
[lots more snipped]=



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