lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 03 Jan 2008 20:52:53 +1100
From:	Nigel Cunningham <nigel@...el.suspend2.net>
To:	Oliver Neukum <oliver@...kum.org>
CC:	"Rafael J. Wysocki" <rjw@...k.pl>, Pavel Machek <pavel@....cz>,
	Kyle Moffett <mrmacman_g4@....com>,
	Matthew Garrett <mjg59@...f.ucam.org>,
	David Chinner <dgc@....com>,
	Jeremy Fitzhardinge <jeremy@...p.org>, xfs-masters@....sgi.com,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: freeze vs freezer

Hi.

Oliver Neukum wrote:
> Am Donnerstag 03 Januar 2008 schrieb Nigel Cunningham:
>> On top of this, I made a (too simple at the moment) freeze_filesystems
>> function which iterates through &super_blocks in reverse order, freezing
>> fuse filesystems or ordinary ones. I say 'too simple' because it doesn't
>> currently allow for the possibility of someone mounting (say) ext3 on
>> fuse, but that would just be an extension of what's already done.
> 
> How do you deal with fuse server tasks using other fuse filesystems?

Since they're frozen in reverse order, the dependant one would be frozen
first.

> How does freeze_filesystems() look?

Removing my ugly debugging statements, it's currently:

/**
 * freeze_filesystems - lock all filesystems and force them into a
consistent
 * state
 */
void freeze_filesystems(int which)
{
        struct super_block *sb;

        lockdep_off();

        /*
         * Freeze in reverse order so filesystems dependant upon others are
         * frozen in the right order (eg. loopback on ext3).
         */
        list_for_each_entry_reverse(sb, &super_blocks, s_list) {
                if (sb->s_type->fs_flags & FS_IS_FUSE &&
                    sb->s_frozen == SB_UNFROZEN &&
                    which & FS_FREEZER_FUSE) {
                        sb->s_frozen = SB_FREEZE_TRANS;
                        sb->s_flags |= MS_FROZEN;
                        continue;
                }

                if (!sb->s_root || !sb->s_bdev ||
                    (sb->s_frozen == SB_FREEZE_TRANS) ||
                    (sb->s_flags & MS_RDONLY) ||
                    (sb->s_flags & MS_FROZEN) ||
                    !(which & FS_FREEZER_NORMAL))
                        continue;
                freeze_bdev(sb->s_bdev);
                sb->s_flags |= MS_FROZEN;
        }

        lockdep_on();
}

Nigel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ