Hi all,
I'm running "fsfreeze --freeze /mnt" (/mnt is mounted with an ext2 partition)
and getting "fsfreeze: /mnt: freeze failed: Operation not supported":
the strace log shows:
open("/mnt", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
ioctl(3, FIFREEZE, 0) = -1 EOPNOTSUPP (Operation not supported)
My kernel is 3.16.2.
I know ext3/4 support fs freeze, but I'm not sure about ext2.
Though the above experiment shows it's not supported, but I do see
struct super_operations ext2_sops defines an ext2_freeze() and the
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 think I must miss something. Please point it out.
Thanks!
-- Dexuan
Dexuan Cui <decui <at> microsoft.com> writes:
> Hi Ted,
> Thanks very much for the clarification!
>
> And thanks a lot for implementing this -- I've seen the patches you
sent out
> several hours ago.
>
> IMO it's useful to have such compatibility, e.g.,
> Hyper-V guest has a fsfreeze-based feature to back up the data; the
feature
> works fine for ext4 partition, but Ubuntu's installer can create /boot
> of ext2 partition by default and hence the feature can't work:
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1362574
>
> I believe the bug will go away after Ubuntu integrates your patches.
>
> Thanks!
Hi Theodore,
CAn you please tell me where can i find these patches. I am unable to
locate it. or the steps the install it ?
Do we have to install it every system that doesnt support fsfreeze in
the ext2 fs.
Your help will be deeply appreciated
thanks in advance
On 6/5/15 6:23 AM, Syed Imtiaz wrote:
> Dexuan Cui <decui <at> microsoft.com> writes:
>> Hi Ted,
>> Thanks very much for the clarification!
>>
>> And thanks a lot for implementing this -- I've seen the patches you
> sent out
>> several hours ago.
>>
>> IMO it's useful to have such compatibility, e.g.,
>> Hyper-V guest has a fsfreeze-based feature to back up the data; the
> feature
>> works fine for ext4 partition, but Ubuntu's installer can create /boot
>> of ext2 partition by default and hence the feature can't work:
>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1362574
>>
>> I believe the bug will go away after Ubuntu integrates your patches.
>>
>> Thanks!
>
>
> Hi Theodore,
> CAn you please tell me where can i find these patches. I am unable to
> locate it. or the steps the install it ?
> Do we have to install it every system that doesnt support fsfreeze in
> the ext2 fs.
To be clear, the patches were only for ext2-mounted-with-ext4.ko.
The native ext2 driver freezes w/o any problem.
The upstream commit is here:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=bb04457
and has been fixed upstream since kernel v3.18
-Eric