'\" t .\" Title: freeze_bdev .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: The Linux VFS .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "FREEZE_BDEV" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "The Linux VFS" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" freeze_bdev \- \- lock a filesystem and force it into a consistent state .SH "SYNOPSIS" .HP \w'struct\ super_block\ *\ freeze_bdev('u .BI "struct super_block * freeze_bdev(struct\ block_device\ *\ " "bdev" ");" .SH "ARGUMENTS" .PP \fIbdev\fR .RS 4 blockdevice to lock .RE .SH "DESCRIPTION" .PP If a superblock is found on this device, we take the s_umount semaphore on it to make sure nobody unmounts until the snapshot creation is done\&. The reference counter (bd_fsfreeze_count) guarantees that only the last unfreeze process can unfreeze the frozen filesystem actually when multiple freeze requests arrive simultaneously\&. It counts up in \fBfreeze_bdev\fR and count down in \fBthaw_bdev\fR\&. When it becomes 0, \fBthaw_bdev\fR will unfreeze actually\&. .SH "COPYRIGHT" .br