From owner-freebsd-fs@FreeBSD.ORG Fri Sep 24 07:05:20 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EE0E1065673 for ; Fri, 24 Sep 2010 07:05:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 9F2288FC0A for ; Fri, 24 Sep 2010 07:05:19 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o8O75Fru071564 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 24 Sep 2010 10:05:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o8O75F2N038023; Fri, 24 Sep 2010 10:05:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o8O75Fns038022; Fri, 24 Sep 2010 10:05:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 24 Sep 2010 10:05:15 +0300 From: Kostik Belousov To: Bruce Evans Message-ID: <20100924070515.GD34228@deviant.kiev.zoral.com.ua> References: <201009231938.09548.cal@linu.gs> <20100924083610.B714@delplex.bde.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KN5l+BnMqAQyZLvT" Content-Disposition: inline In-Reply-To: <20100924083610.B714@delplex.bde.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_20, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-fs Subject: Re: Strange behaviour with sappend flag set on ZFS X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2010 07:05:20 -0000 --KN5l+BnMqAQyZLvT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Sep 24, 2010 at 10:42:54AM +1000, Bruce Evans wrote: > ffs_write() is also missing the check for read-only mounts. This is subtle. > I think the fs cannot be mounted read-only if ffs_write() is reached -- > even if the file was opened for writing at a time when the mount was > read-write, the file must have been dowgraded to unwriteable of the mount > was successfully downgraded to read-only (takes a forced unmount which > tends to break applications but shouldn't break the file system). The files open for write are effectively closed on rw->ro downgrade. Technically, the vnodes are reclaimed at the time of remount, and still open file descriptors return appropriate deadfs errors on i/o ops, typically ENXIO or EIO. There is a known brokeness with remounts, where the writeable shared mappings of the vnodes are not accounted for the write count of vnode. I have lingering patch for the issue that is not committed for some reasons. --KN5l+BnMqAQyZLvT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkycTaoACgkQC3+MBN1Mb4j9rQCbB20GSAE77o7dqqRThCT8B5FA bs4An312pcGy9dGFHTT8iB5CE5s7xAwP =EXZ3 -----END PGP SIGNATURE----- --KN5l+BnMqAQyZLvT--