[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <EE124450C0AAF944A40DD71E61F878C99CE2C3@SINEX14MBXC418.southpacific.corp.microsoft.com>
Date: Thu, 18 Sep 2014 06:46:21 +0000
From: Dexuan Cui <decui@...rosoft.com>
To: "linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>
Subject: RE: Is ext2 freezable?
> -----Original Message-----
> From: Dexuan Cui
> Sent: Thursday, September 18, 2014 13:16 PM
> To: linux-ext4@...r.kernel.org
> Subject: Is ext2 freezable?
>
> Hi all,
> I'm running "fsfreeze --freeze /mnt" (/mnt is mounted with an ext2 partition)
> and getting "fsfreeze: /mnt: freeze failed: Operation not supported":
> ...
> code of ioctl_fsfreeze() is:
>
> static int ioctl_fsfreeze(struct file *filp)
> {
> struct super_block *sb = file_inode(filp)->i_sb;
>
> if (!capable(CAP_SYS_ADMIN))
> return -EPERM;
>
> /* If filesystem doesn't support freeze feature, return. */
> if (sb->s_op->freeze_fs == NULL)
> return -EOPNOTSUPP;
>
> /* Freeze */
> return freeze_super(sb);
> }
>
> It seems here sb->s_op->freeze_fs is NULL??? why?
I've got the answer:
ext2.ko itself does support fsfreeze, but typical linux distros don't supply
ext2.ko at all now -- instead, they usually supply ext3.ko and have ext4 builtin.
So when I mount an ext2 partition, actually the kernel is registering the ext4
driver as an ext2 driver and in this case the ext2's s_op->freeze_fs is NULL --
but, why did ext4 choose this behavior for ext2?
Thanks,
-- Dexuan
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists