svn commit: r335808 - in head/sys/ufs: ffs ufs

Konstantin Belousov kostikbel at gmail.com
Sat Jun 30 12:04:55 UTC 2018


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.


More information about the svn-src-all mailing list