From owner-freebsd-fs@FreeBSD.ORG Fri Jul 19 10:19:31 2013 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CC5088D4; Fri, 19 Jul 2013 10:19:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E07A5EB2; Fri, 19 Jul 2013 10:19:30 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA07949; Fri, 19 Jul 2013 13:19:27 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1V07mZ-0009cr-FX; Fri, 19 Jul 2013 13:19:27 +0300 Message-ID: <51E91277.3070309@FreeBSD.org> Date: Fri, 19 Jul 2013 13:18:31 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130708 Thunderbird/17.0.7 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: Deadlock in nullfs/zfs somewhere References: <51DCFEDA.1090901@FreeBSD.org> <51E59FD9.4020103@FreeBSD.org> <51E67F54.9080800@FreeBSD.org> <51E7B686.4090509@FreeBSD.org> <20130718112814.GA5991@kib.kiev.ua> <51E7F05A.5020609@FreeBSD.org> <20130718185215.GE5991@kib.kiev.ua> In-Reply-To: <20130718185215.GE5991@kib.kiev.ua> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org, Adrian Chadd X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jul 2013 10:19:31 -0000 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. I will keep this in mind. > 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. 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 locking. OTOH, perhaps my understanding of what you said is incomplete or incorrect, because VFS suspension mechanism is completely unknown to me yet. -- Andriy Gapon