Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jul 2013 13:30:25 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Andriy Gapon <avg@FreeBSD.org>
Cc:        freebsd-fs@FreeBSD.org, Adrian Chadd <adrian@FreeBSD.org>
Subject:   Re: Deadlock in nullfs/zfs somewhere
Message-ID:  <20130719103025.GJ5991@kib.kiev.ua>
In-Reply-To: <51E91277.3070309@FreeBSD.org>
References:  <CAJ-VmokctCmV4%2By17uvqO9wXEyh0s%2BaXZ9nggvoAgP5%2BZHSgFA@mail.gmail.com> <51E59FD9.4020103@FreeBSD.org> <CAJ-VmokR8jJpdRc_kBJzhW4_R1pJnj3UPfsG5ANpq-kEGwCP9g@mail.gmail.com> <51E67F54.9080800@FreeBSD.org> <CAJ-Vmonk2HAzX38-mbL8hwxiUfL6JyJrMTq0dTBctW=P4dfyEQ@mail.gmail.com> <51E7B686.4090509@FreeBSD.org> <20130718112814.GA5991@kib.kiev.ua> <51E7F05A.5020609@FreeBSD.org> <20130718185215.GE5991@kib.kiev.ua> <51E91277.3070309@FreeBSD.org>

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

--WHG05yakhlzm8Hk1
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Jul 19, 2013 at 01:18:31PM +0300, Andriy Gapon wrote:
> on 18/07/2013 21:52 Konstantin Belousov said the following:
> > There is VFS method VFS_SUSP_CLEAN, called when the suspension is
> > lifted.  UFS uses it to clean the back-queue of work which were
> > not performed during the suspend, mostly inactivate the postponed
> > inactive vnodes.  ZFS probably does not need it, since it does
> > not check for MNTK_SUSPEND, but if it starts care, there is a place
> > to put the code.
>=20
> I will keep this in mind.
>=20
> > On the other hand, I believe that your patch is notoriously incomplete,
> > because there should be a lot of threads which mutate ZFS mounts state
> > and which do not call vn_start_write() around the mutations.  I.e.
> > all ZFS top-level code which calls into ZFS ops and which is not
> > coming from VFS.
>=20
> I agree.  What I am trying to fix right now is VFS<->ZFS interaction.  I =
think
> that ZFS<->ZFS should already be fine - it's protected by internal ZFS lo=
cking.
> OTOH, perhaps my understanding of what you said is incomplete or incorrec=
t,
> because VFS suspension mechanism is completely unknown to me yet.
>=20
I think that you should satisfy the VFS invariants, and prevent mutators
=66rom operating on the filesystem when MNTK_SUSPEND is set, for the
case mutators are running outside the context where VFS could call
vn_start_write() around.

--WHG05yakhlzm8Hk1
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iQIcBAEBAgAGBQJR6RVAAAoJEJDCuSvBvK1Bjq4P/2tWXpxKdyvuEJiqeer5wEsm
DfErzv7U3fE9tDE0XNUgzDroXTWEQATJr3brdxUTpOvBVcQYKGWVR2jEAavZaWz9
YIH8tbat783yjiem0mvULlNRUJ7QRY12yPLMzetJkgmZAt3ocH4P6k+aHgqyisVu
InzNL+Ekc1+0uD4AqEShuueQ2raypLUnY8B7FfAM6APcSO4ARvo8O8Z808hjXk4g
cO8VGwvwwFxVT8j+7Woocs0pypRXyQkIhR6xVeBjst81VOzPdvvut8Ic9EH0nOdu
62YPkq4zwGQnyNLoYlWWYMYqNoA1D8AyzPpnmrT2PlVI6lZ3uBcRTRVIKxoQ37b9
h8zIrkHZK7f0o/f8X77VDVlFgzxQst637CjtDio+t9FKWYh5fG3DnR5kFqetXM6G
uRuGjn2f2YLKfL2om2bYNdb0CQePdwhehnnegiIA/atAnPGHY6+YZTLi/CTD1Aal
3RwGChQuVsFecZuhlCdaEAeiWMCj+e2wuJEnkX5zzwrWc93t7QYUqBPMXLvYEcEy
RwSlm2oN1HO3NX5q7vn9bWlRCyiYQILB4iGC5TIEM8RxYI46kQC8/+NVnIP5AC+n
JzWd7cS99E8QdCBkr1DLmEa8H9dQMAtpJegeN6pILtzh56DmASFtXgcKo58PkIHj
S8rrSKhnP9Cu5faDKVS2
=9m4K
-----END PGP SIGNATURE-----

--WHG05yakhlzm8Hk1--



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