From owner-svn-src-all@freebsd.org Sat Jun 30 12:04:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 647A6102D220; Sat, 30 Jun 2018 12:04:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B66DF7B13E; Sat, 30 Jun 2018 12:04:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTP id w5UC4dLu027207; Sat, 30 Jun 2018 15:04:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w5UC4dLu027207 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w5UC4dpS027206; Sat, 30 Jun 2018 15:04:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 30 Jun 2018 15:04:39 +0300 From: Konstantin Belousov To: Kirk McKusick Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335808 - in head/sys/ufs: ffs ufs Message-ID: <20180630120439.GQ2430@kib.kiev.ua> References: <201806292224.w5TMOfSi062643@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201806292224.w5TMOfSi062643@repo.freebsd.org> User-Agent: Mutt/1.10.0 (2018-05-17) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 12:04:55 -0000 On Fri, Jun 29, 2018 at 10:24:41PM +0000, Kirk McKusick wrote: > Author: mckusick > Date: Fri Jun 29 22:24:41 2018 > New Revision: 335808 > URL: https://svnweb.freebsd.org/changeset/base/335808 > > Log: > Create um_flags in the ufsmount structure to hold flags for a UFS filesystem. > Convert integer structure flags to use um_flags: > > int um_candelete; /* devvp supports TRIM */ > int um_writesuspended; /* suspension in progress */ > > become: > > #define UM_CANDELETE 0x00000001 /* devvp supports TRIM */ > #define UM_WRITESUSPENDED 0x00000002 /* suspension in progress */ > > This is in preparation for adding other flags to indicate forcible > unmount in progress after a disk failure and possibly forcible > downgrade to read-only. > > No functional change intended. I think there is a functional change there, or at least something must be changed to make this flags field useful. What is the locking protocol for the um_flags ? IM_CANDELETE is only set at mount time. um_writesuspended indicated a state that was protected by the ffs_susp_lock. UM_WRITESUSPENDED is a literal replacement for the um_writesuspended, so the manipilations of um_flags require ffs_susp_lock.